mirror of
https://github.com/nix-community/nixvim.git
synced 2025-07-25 13:14:37 +02:00
plugins/treesitter: fix ensure_installed
to allow "all"
The plugin allows passing either the string `"all"` or a list of languages.
This commit is contained in:
parent
89d74cdce1
commit
195978e627
1 changed files with 15 additions and 5 deletions
|
@ -134,12 +134,22 @@ helpers.neovim-plugin.mkNeovimPlugin config {
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
|
||||||
ensure_installed = helpers.defaultNullOpts.mkListOf types.str [ ] ''
|
ensure_installed = helpers.defaultNullOpts.mkNullable' {
|
||||||
Either "all" or a list of languages to ensure installing.
|
type =
|
||||||
'';
|
with helpers.nixvimTypes;
|
||||||
|
oneOf [
|
||||||
|
(enum [ "all" ])
|
||||||
|
(listOf (maybeRaw str))
|
||||||
|
rawLua
|
||||||
|
];
|
||||||
|
pluginDefault = [ ];
|
||||||
|
description = ''
|
||||||
|
Either `"all"` or a list of languages to ensure installing.
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
|
||||||
ignore_install = helpers.defaultNullOpts.mkListOf types.str [ ] ''
|
ignore_install = helpers.defaultNullOpts.mkListOf types.str [ ] ''
|
||||||
List of parsers to ignore installing. Used when `ensure_installed` is set to "all".
|
List of parsers to ignore installing. Used when `ensure_installed` is set to `"all"`.
|
||||||
'';
|
'';
|
||||||
|
|
||||||
parser_install_dir = helpers.mkNullOrOption' {
|
parser_install_dir = helpers.mkNullOrOption' {
|
||||||
|
@ -163,7 +173,7 @@ helpers.neovim-plugin.mkNeovimPlugin config {
|
||||||
|
|
||||||
settingsExample = {
|
settingsExample = {
|
||||||
auto_install = false;
|
auto_install = false;
|
||||||
ensure_installed = [ "all" ];
|
ensure_installed = "all";
|
||||||
ignore_install = [ "rust" ];
|
ignore_install = [ "rust" ];
|
||||||
parser_install_dir.__raw = "vim.fs.joinpath(vim.fn.stdpath('data'), 'treesitter')";
|
parser_install_dir.__raw = "vim.fs.joinpath(vim.fn.stdpath('data'), 'treesitter')";
|
||||||
sync_install = false;
|
sync_install = false;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue