mirror of
https://github.com/NotAShelf/nvf.git
synced 2025-11-11 16:05:30 +00:00
package: add nvf-queries package
This commit is contained in:
parent
57b9735fc7
commit
528990a070
5 changed files with 50 additions and 2 deletions
35
flake/legacyPackages/nvf-queries/queries/nix/injections.scm
Normal file
35
flake/legacyPackages/nvf-queries/queries/nix/injections.scm
Normal file
|
|
@ -0,0 +1,35 @@
|
|||
; extends
|
||||
|
||||
(binding
|
||||
attrpath: (attrpath
|
||||
(identifier) @_path)
|
||||
expression: [
|
||||
(string_expression
|
||||
(string_fragment) @injection.content)
|
||||
(indented_string_expression
|
||||
(string_fragment) @injection.content)
|
||||
]
|
||||
(#set! injection.language "lua")
|
||||
(#match? @_path "^luaConfig\(Pre\|Post\)$"))
|
||||
|
||||
(apply_expression
|
||||
function: [
|
||||
(variable_expression
|
||||
name: (identifier) @funcName
|
||||
(#eq? @funcName "mkLuaInline"))
|
||||
;; matches lib.generators.mkLuaInline
|
||||
(select_expression
|
||||
expression: _ @lib
|
||||
(#eq? @lib "lib")
|
||||
(attrpath
|
||||
attr: (identifier) @generators
|
||||
attr: (identifier) @funcName)
|
||||
(#eq? @generators "generators"))
|
||||
]
|
||||
argument: [
|
||||
(string_expression
|
||||
(string_fragment) @injection.content)
|
||||
(indented_string_expression
|
||||
(string_fragment) @injection.content)
|
||||
]
|
||||
(#set! injection.language "lua"))
|
||||
Loading…
Add table
Add a link
Reference in a new issue