neovim: Add JS injections for maud

This commit is contained in:
Quentin Boyer 2025-01-06 22:40:57 +01:00
parent 9217b7690b
commit ac88302858
2 changed files with 18 additions and 0 deletions

View file

@ -231,6 +231,20 @@
};
};
extraFiles."queries/rust/injections.scm".text = ''
;; extends
(call_expression
function: ((identifier) @_func (#eq? @_func "JS"))
arguments: (arguments (raw_string_literal (string_content) @injection.content))
(#set! injection.language "javascript"))
(token_tree
(identifier) @_func (#eq? @_func "JS")
(token_tree (raw_string_literal (string_content) @injection.content))
(#set! injection.language "javascript"))
'';
plugins.treesitter = {
enable = true;
@ -262,6 +276,7 @@
groovy
html
ini
javascript
json
just
lalrpop

View file

@ -53,6 +53,9 @@
nargs = 1,
force = true,
})
-- rust-analyzer overrides injections
vim.api.nvim_set_hl(0, "@lsp.type.string.rust", {})
'';
# Language Servers