mirror of
https://github.com/nix-community/nixvim.git
synced 2025-12-12 20:11:08 +01:00
plugins/treesitter: update injections to handle functions
Handle highlighting strings that occur after a function condition.
This commit is contained in:
parent
1efe549e2a
commit
507d48c3ae
1 changed files with 28 additions and 0 deletions
|
|
@ -13,6 +13,20 @@
|
|||
]
|
||||
(#match? @_path "(^(extraConfigLua(Pre|Post)?|__raw))$"))
|
||||
|
||||
(binding
|
||||
attrpath: (attrpath
|
||||
(identifier) @_path)
|
||||
expression: (apply_expression
|
||||
argument: [
|
||||
(string_expression
|
||||
((string_fragment) @injection.content
|
||||
(#set! injection.language "lua")))
|
||||
(indented_string_expression
|
||||
((string_fragment) @injection.content
|
||||
(#set! injection.language "lua")))
|
||||
])
|
||||
(#match? @_path "(^(extraConfigLua(Pre|Post)?|__raw))$"))
|
||||
|
||||
(apply_expression
|
||||
function: (_) @_func
|
||||
argument: [
|
||||
|
|
@ -38,6 +52,20 @@
|
|||
]
|
||||
(#match? @_path "(^extraConfigVim(Pre|Post)?)$"))
|
||||
|
||||
(binding
|
||||
attrpath: (attrpath
|
||||
(identifier) @_path)
|
||||
expression: (apply_expression
|
||||
argument: [
|
||||
(string_expression
|
||||
((string_fragment) @injection.content
|
||||
(#set! injection.language "vim")))
|
||||
(indented_string_expression
|
||||
((string_fragment) @injection.content
|
||||
(#set! injection.language "vim")))
|
||||
])
|
||||
(#match? @_path "(^extraConfigVim(Pre|Post)?)$"))
|
||||
|
||||
(binding
|
||||
attrpath: (attrpath
|
||||
(identifier) @namespace
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue