diff options
Diffstat (limited to 'queries/lua')
| -rw-r--r-- | queries/lua/injections.scm | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/queries/lua/injections.scm b/queries/lua/injections.scm index 4fccbcb14..45a5fb8b8 100644 --- a/queries/lua/injections.scm +++ b/queries/lua/injections.scm @@ -177,3 +177,21 @@ (comment content: (_) @injection.content (#set! injection.language "comment")) + +; vim.filetype.add({ pattern = { ["some lua pattern here"] = "filetype" } }) +((function_call + name: (_) @_filetypeadd_identifier + arguments: + (arguments + (table_constructor + (field + name: (_) @_pattern_key + value: + (table_constructor + (field + name: + (string + content: _ @injection.content))))))) + (#set! injection.language "luap") + (#eq? @_filetypeadd_identifier "vim.filetype.add") + (#eq? @_pattern_key "pattern")) |
