mirror of
https://github.com/NotAShelf/nvf.git
synced 2026-04-28 04:15:21 +00:00
treesitter: add filetype mappings
This commit is contained in:
parent
27b4dc9fb0
commit
9ff0dcb60c
3 changed files with 64 additions and 40 deletions
|
|
@ -4,7 +4,7 @@
|
|||
...
|
||||
}: let
|
||||
inherit (lib.options) mkOption mkEnableOption literalExpression;
|
||||
inherit (lib.types) listOf nullOr package bool str lines enum submodule oneOf;
|
||||
inherit (lib.types) listOf nullOr package bool str lines enum submodule oneOf attrsOf;
|
||||
|
||||
queriesType = submodule {
|
||||
options = {
|
||||
|
|
@ -111,5 +111,18 @@ in {
|
|||
default = [];
|
||||
description = "A list of Neovim treesitter queries to be registered.";
|
||||
};
|
||||
|
||||
filetypeMappings = mkOption {
|
||||
type = attrsOf (listOf str);
|
||||
default = {};
|
||||
example = {
|
||||
"sh" = ["ash" "dash"];
|
||||
};
|
||||
description = ''
|
||||
Register alternative parser names for a filetype.
|
||||
For more information see `:h vim.treesitter.language.register()`.
|
||||
See treesitter builtin mappings here: <https://github.com/nvim-treesitter/nvim-treesitter/blob/main/plugin/filetypes.lua>
|
||||
'';
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue