diff options
| author | Santos Gallegos <stsewd@protonmail.com> | 2021-07-07 08:49:36 -0500 |
|---|---|---|
| committer | Thomas Vigouroux <tomvig38@gmail.com> | 2021-07-07 23:17:43 +0200 |
| commit | 989fc7aa6c59373f494f28eb33dba63e687c4d32 (patch) | |
| tree | e89467a4737298a86d390496c38aa13aa6eed0af | |
| parent | Update lockfile.json (diff) | |
| download | nvim-treesitter-989fc7aa6c59373f494f28eb33dba63e687c4d32.tar nvim-treesitter-989fc7aa6c59373f494f28eb33dba63e687c4d32.tar.gz nvim-treesitter-989fc7aa6c59373f494f28eb33dba63e687c4d32.tar.bz2 nvim-treesitter-989fc7aa6c59373f494f28eb33dba63e687c4d32.tar.lz nvim-treesitter-989fc7aa6c59373f494f28eb33dba63e687c4d32.tar.xz nvim-treesitter-989fc7aa6c59373f494f28eb33dba63e687c4d32.tar.zst nvim-treesitter-989fc7aa6c59373f494f28eb33dba63e687c4d32.zip | |
Lua: highlight function definitions
In lua
```lua
function foo() end
```
is syntax sugar for
```lua
foo = function() end
```
| -rw-r--r-- | queries/lua/highlights.scm | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/queries/lua/highlights.scm b/queries/lua/highlights.scm index e15008e8a..290f709ce 100644 --- a/queries/lua/highlights.scm +++ b/queries/lua/highlights.scm @@ -123,6 +123,11 @@ (local_function (identifier) @function) (local_function ["function" "end"] @keyword.function) +(variable_declaration + (variable_declarator (identifier) @function) (function_definition)) +(local_variable_declaration + (variable_declarator (identifier) @function) (function_definition)) + (function_definition ["function" "end"] @keyword.function) (property_identifier) @property |
