From 20d47fb2832d9c5b0fb18ab1ee0e01564dc0365c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ga=C3=A9tan=20Lepage?= <33058747+GaetanLepage@users.noreply.github.com> Date: Thu, 12 Jan 2023 20:17:43 +0100 Subject: [PATCH] treesitter: change default value for parserInstallDir (#117) * plugins/languages/treesitter: change default value for parserInstallDir * better document parserInstallDir Co-authored-by: Pedro Alves --- plugins/languages/treesitter.nix | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/plugins/languages/treesitter.nix b/plugins/languages/treesitter.nix index a76b44d8..da46b4dd 100644 --- a/plugins/languages/treesitter.nix +++ b/plugins/languages/treesitter.nix @@ -23,8 +23,15 @@ in parserInstallDir = mkOption { type = types.nullOr types.str; - default = null; - description = "Location of the parsers to be installed by the plugin (only needed when nixGrammars is disabled)"; + default = + 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 { @@ -74,7 +81,7 @@ in moduleConfig = mkOption { type = types.attrsOf types.anything; - default = {}; + default = { }; description = "This is the configuration for extra modules. It should not be used directly"; }; };