treesitter: change default value for parserInstallDir (#117)

* plugins/languages/treesitter: change default value for parserInstallDir

* better document parserInstallDir

Co-authored-by: Pedro Alves <pta2002@pta2002.com>
This commit is contained in:
Gaétan Lepage 2023-01-12 20:17:43 +01:00 committed by GitHub
parent 5c6ba55f8a
commit 20d47fb283
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -23,8 +23,15 @@ in
parserInstallDir = mkOption { parserInstallDir = mkOption {
type = types.nullOr types.str; type = types.nullOr types.str;
default = null; default =
description = "Location of the parsers to be installed by the plugin (only needed when nixGrammars is disabled)"; if cfg.nixGrammars
then null
else "$XDG_DATA_HOME/nvim/treesitter"
;
description = ''
Location of the parsers to be installed by the plugin (only needed when nixGrammars is disabled).
This default might not work on your own install, please make sure that $XDG_DATA_HOME is set if you want to use the default. Otherwise, change it to something that will work for you!
'';
}; };
ignoreInstall = mkOption { ignoreInstall = mkOption {
@ -74,7 +81,7 @@ in
moduleConfig = mkOption { moduleConfig = mkOption {
type = types.attrsOf types.anything; type = types.attrsOf types.anything;
default = {}; default = { };
description = "This is the configuration for extra modules. It should not be used directly"; description = "This is the configuration for extra modules. It should not be used directly";
}; };
}; };