mirror of
https://github.com/NotAShelf/nvf.git
synced 2025-04-13 16:18:36 +00:00
language/nix: add option for nvf-queries
This commit is contained in:
parent
c93379b75b
commit
f084b74a56
1 changed files with 12 additions and 2 deletions
|
@ -140,6 +140,13 @@ in {
|
|||
treesitter = {
|
||||
enable = mkEnableOption "Nix treesitter" // {default = config.vim.languages.enableTreesitter;};
|
||||
package = mkGrammarOption pkgs "nix";
|
||||
|
||||
enableNvfQueries =
|
||||
mkEnableOption ''
|
||||
extra query files targetted at nvf configuration, e.g. injection rules
|
||||
for mkLuaInline and some options.
|
||||
''
|
||||
// {default = true;};
|
||||
};
|
||||
|
||||
lsp = {
|
||||
|
@ -212,8 +219,11 @@ in {
|
|||
}
|
||||
|
||||
(mkIf cfg.treesitter.enable {
|
||||
vim.treesitter.enable = true;
|
||||
vim.treesitter.grammars = [cfg.treesitter.package];
|
||||
vim = {
|
||||
treesitter.enable = true;
|
||||
treesitter.grammars = [cfg.treesitter.package];
|
||||
startPlugins = mkIf cfg.treesitter.enableNvfQueries ["nvf-queries"];
|
||||
};
|
||||
})
|
||||
|
||||
(mkIf cfg.lsp.enable {
|
||||
|
|
Loading…
Add table
Reference in a new issue