1
0
Fork 0
mirror of https://github.com/nix-community/nixvim.git synced 2025-12-23 09:21:15 +01:00

plugins/treesitter: remove settingsOptions

This commit is contained in:
Austin Horstman 2025-12-15 15:49:21 -06:00
parent 0ef5923c84
commit 7b6824421a

View file

@ -189,102 +189,6 @@ lib.nixvim.plugins.mkNeovimPlugin {
enable = !config.plugins.treesitter.nixGrammars;
}) buildGrammarDeps;
settingsOptions = {
auto_install = lib.nixvim.defaultNullOpts.mkBool false ''
Whether to automatically install missing parsers when entering a buffer.
'';
highlight = {
additional_vim_regex_highlighting =
lib.nixvim.defaultNullOpts.mkNullableWithRaw (with lib.types; either bool (listOf (maybeRaw str)))
false
''
Setting this to true will run `syntax` and tree-sitter at the same time. \
Set this to `true` if you depend on 'syntax' being enabled (e.g. for indentation). \
See `:h syntax`.
Using this option may slow down your editor, and you may see some duplicate highlights. \
Instead of true, it can also be a list of languages.
'';
enable = lib.nixvim.defaultNullOpts.mkBool false ''
Whether to enable treesitter highlighting.
'';
disable = lib.nixvim.defaultNullOpts.mkStrLuaFnOr (with lib.types; listOf (maybeRaw str)) null ''
Can either be a list of the names of parsers you wish to disable or
a lua function that returns a boolean indicating the parser should be disabled.
'';
custom_captures = lib.nixvim.defaultNullOpts.mkAttrsOf types.str { } ''
Custom capture group highlighting.
'';
};
incremental_selection = {
enable = lib.nixvim.defaultNullOpts.mkBool false ''
Incremental selection based on the named nodes from the grammar.
'';
keymaps =
let
mkKeymap =
default:
lib.nixvim.defaultNullOpts.mkNullableWithRaw (
with types; either str bool
) default "Key shortcut or false to unset.";
in
{
init_selection = mkKeymap "gnn";
node_incremental = mkKeymap "grn";
scope_incremental = mkKeymap "grc";
node_decremental = mkKeymap "grm";
};
};
indent = {
enable = lib.nixvim.defaultNullOpts.mkBool false ''
Whether to enable treesitter indentation.
'';
};
ensure_installed = lib.nixvim.defaultNullOpts.mkNullable' {
type =
with lib.types;
oneOf [
(enum [ "all" ])
(listOf (maybeRaw str))
rawLua
];
pluginDefault = [ ];
description = ''
Either `"all"` or a list of languages to ensure installing.
'';
};
ignore_install = lib.nixvim.defaultNullOpts.mkListOf types.str [ ] ''
List of parsers to ignore installing. Used when `ensure_installed` is set to `"all"`.
'';
parser_install_dir = lib.nixvim.mkNullOrOption' {
type = with lib.types; maybeRaw str;
# Backport the default from nvim-treesitter 1.0
# The current default doesn't work on nix, as it is readonly
default.__raw = "vim.fs.joinpath(vim.fn.stdpath('data'), 'site')";
pluginDefault = lib.literalMD "the plugin's package directory";
description = ''
Location of the parsers to be installed by the plugin (only needed when `nixGrammars` is disabled).
By default, parsers are installed to the "site" dir.
If set to `null` the _plugin default_ is used, which will not work on nix.
'';
};
sync_install = lib.nixvim.defaultNullOpts.mkBool false ''
Install parsers synchronously (only applied to `ensure_installed`).
'';
};
settingsExample = {
auto_install = false;
ensure_installed = "all";