diff options
| author | Stephan Seitz <stephan.seitz@fau.de> | 2021-09-21 20:38:45 +0200 |
|---|---|---|
| committer | Stephan Seitz <stephan.seitz@fau.de> | 2021-09-25 00:59:40 +0200 |
| commit | b7c95eef95397e1dde156b6d101667f667b32ea0 (patch) | |
| tree | dc1cf888c1d476f587321a7593932cf8f55b4ec0 /queries/lua | |
| parent | Use vim-range style (1-index based) when possible (#1841) (diff) | |
| download | nvim-treesitter-b7c95eef95397e1dde156b6d101667f667b32ea0.tar nvim-treesitter-b7c95eef95397e1dde156b6d101667f667b32ea0.tar.gz nvim-treesitter-b7c95eef95397e1dde156b6d101667f667b32ea0.tar.bz2 nvim-treesitter-b7c95eef95397e1dde156b6d101667f667b32ea0.tar.lz nvim-treesitter-b7c95eef95397e1dde156b6d101667f667b32ea0.tar.xz nvim-treesitter-b7c95eef95397e1dde156b6d101667f667b32ea0.tar.zst nvim-treesitter-b7c95eef95397e1dde156b6d101667f667b32ea0.zip | |
injections(lua): fix cdef injection
Fixes #1840
Diffstat (limited to 'queries/lua')
| -rw-r--r-- | queries/lua/injections.scm | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/queries/lua/injections.scm b/queries/lua/injections.scm index 7bca11bb8..80ecb1183 100644 --- a/queries/lua/injections.scm +++ b/queries/lua/injections.scm @@ -7,6 +7,21 @@ ) (#eq? @_cdef_identifier "cdef") + (#match? @c "^[\"']") + (#offset! @c 0 1 0 -1) +) + +( + (function_call + (field_expression + (property_identifier) @_cdef_identifier) + (arguments + (string) @c) + ) + + (#eq? @_cdef_identifier "cdef") + (#match? @c "^\\[\\[") + (#offset! @c 0 2 0 -2) ) (comment) @comment |
