mirror of
https://github.com/nvim-treesitter/nvim-treesitter.git
synced 2026-07-19 11:50:09 -04:00
feat(nix): misc cleanups + comment injection (#6418)
* fix(nix): highlight strings within interpolations * feat(nix): move `derivation` to function.builtin * fix(nix): removes all `priority` workarounds * feat(nix): arbitrary injections using `#` comments
This commit is contained in:
parent
46b587eb38
commit
e9321bb914
3 changed files with 37 additions and 24 deletions
|
|
@ -12,6 +12,18 @@
|
|||
(#gsub! @injection.language "/%*%s*([%w%p]+)%s*%*/" "%1")
|
||||
(#set! injection.combined))
|
||||
|
||||
; #-style Comments
|
||||
((comment) @injection.language
|
||||
. ; this is to make sure only adjacent comments are accounted for the injections
|
||||
[
|
||||
(string_expression
|
||||
(string_fragment) @injection.content)
|
||||
(indented_string_expression
|
||||
(string_fragment) @injection.content)
|
||||
]
|
||||
(#gsub! @injection.language "#%s*([%w%p]+)%s*" "%1")
|
||||
(#set! injection.combined))
|
||||
|
||||
(apply_expression
|
||||
function: (_) @_func
|
||||
argument: [
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue