mirror of
https://github.com/NotAShelf/nvf.git
synced 2025-04-15 00:58:37 +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 = {
|
treesitter = {
|
||||||
enable = mkEnableOption "Nix treesitter" // {default = config.vim.languages.enableTreesitter;};
|
enable = mkEnableOption "Nix treesitter" // {default = config.vim.languages.enableTreesitter;};
|
||||||
package = mkGrammarOption pkgs "nix";
|
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 = {
|
lsp = {
|
||||||
|
@ -212,8 +219,11 @@ in {
|
||||||
}
|
}
|
||||||
|
|
||||||
(mkIf cfg.treesitter.enable {
|
(mkIf cfg.treesitter.enable {
|
||||||
vim.treesitter.enable = true;
|
vim = {
|
||||||
vim.treesitter.grammars = [cfg.treesitter.package];
|
treesitter.enable = true;
|
||||||
|
treesitter.grammars = [cfg.treesitter.package];
|
||||||
|
startPlugins = mkIf cfg.treesitter.enableNvfQueries ["nvf-queries"];
|
||||||
|
};
|
||||||
})
|
})
|
||||||
|
|
||||||
(mkIf cfg.lsp.enable {
|
(mkIf cfg.lsp.enable {
|
||||||
|
|
Loading…
Add table
Reference in a new issue