mirror of
https://github.com/nvim-treesitter/nvim-treesitter.git
synced 2026-07-06 05:20:00 -04:00
Lua: highlight function name
This commit is contained in:
parent
688161c174
commit
429036317a
5 changed files with 17 additions and 7 deletions
|
|
@ -25,11 +25,11 @@
|
|||
)
|
||||
|
||||
[
|
||||
"in"
|
||||
"local"
|
||||
"return"
|
||||
(break_statement)
|
||||
"goto"
|
||||
"in"
|
||||
"local"
|
||||
"return"
|
||||
(break_statement)
|
||||
"goto"
|
||||
] @keyword
|
||||
|
||||
;; Operators
|
||||
|
|
@ -77,9 +77,12 @@
|
|||
(nil) @constant.builtin
|
||||
(spread) @constant ;; "..."
|
||||
|
||||
;; Nodes
|
||||
("function" @function "end" @function) ;; Any node that has both funtion and end in it
|
||||
;; Functions
|
||||
("function" @keyword.function
|
||||
[(function_name) (identifier)] @function
|
||||
"end" @keyword.function)
|
||||
|
||||
;; Nodes
|
||||
(table ["{" "}"] @constructor)
|
||||
(comment) @comment
|
||||
(string) @string
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue