mirror of
https://github.com/nix-community/nixvim.git
synced 2025-08-09 20:35:10 +02:00
plugins/treesitter: add an option to control if gcc should be installed
This commit is contained in:
parent
78276e91bb
commit
2785267b1b
1 changed files with 20 additions and 5 deletions
|
@ -30,6 +30,20 @@ in {
|
||||||
description = "Either \"all\" or a list of languages";
|
description = "Either \"all\" or a list of languages";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
gccPackage = mkOption {
|
||||||
|
type = with types; nullOr package;
|
||||||
|
default =
|
||||||
|
if cfg.nixGrammars
|
||||||
|
then null
|
||||||
|
else pkgs.gcc;
|
||||||
|
example = null;
|
||||||
|
description = ''
|
||||||
|
Which package (if any) to be added as the GCC compiler.
|
||||||
|
This is required to build grammars if you are not using `nixGrammars`.
|
||||||
|
To disable the installation of GCC, set this option to `null`.
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
|
||||||
parserInstallDir = mkOption {
|
parserInstallDir = mkOption {
|
||||||
type = types.nullOr types.str;
|
type = types.nullOr types.str;
|
||||||
default =
|
default =
|
||||||
|
@ -199,11 +213,12 @@ in {
|
||||||
if cfg.nixGrammars
|
if cfg.nixGrammars
|
||||||
then [(cfg.package.withPlugins (_: cfg.grammarPackages))]
|
then [(cfg.package.withPlugins (_: cfg.grammarPackages))]
|
||||||
else [cfg.package];
|
else [cfg.package];
|
||||||
extraPackages = with pkgs; [
|
extraPackages = with pkgs;
|
||||||
|
[
|
||||||
tree-sitter
|
tree-sitter
|
||||||
nodejs
|
nodejs
|
||||||
gcc
|
]
|
||||||
];
|
++ optional (cfg.gccPackage != null) cfg.gccPackage;
|
||||||
|
|
||||||
options = mkIf cfg.folding {
|
options = mkIf cfg.folding {
|
||||||
foldmethod = "expr";
|
foldmethod = "expr";
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue