mirror of
https://github.com/nvim-treesitter/nvim-treesitter.git
synced 2026-07-14 09:20:04 -04:00
Use 2 semicolons for better editor interop
This commit is contained in:
parent
93b540f917
commit
8db7eeba9d
1 changed files with 13 additions and 17 deletions
|
|
@ -33,10 +33,10 @@
|
||||||
|
|
||||||
;; >> Symbols
|
;; >> Symbols
|
||||||
|
|
||||||
; General symbol highlighting
|
;; General symbol highlighting
|
||||||
(sym_lit) @variable
|
(sym_lit) @variable
|
||||||
|
|
||||||
; General function calls
|
;; General function calls
|
||||||
(par_tup_lit
|
(par_tup_lit
|
||||||
.
|
.
|
||||||
(sym_lit) @function.call)
|
(sym_lit) @function.call)
|
||||||
|
|
@ -45,18 +45,18 @@
|
||||||
.
|
.
|
||||||
(sym_lit) @function.call)
|
(sym_lit) @function.call)
|
||||||
|
|
||||||
; Quoted symbols
|
;; Quoted symbols
|
||||||
(quote_lit
|
(quote_lit
|
||||||
(sym_lit) @symbol)
|
(sym_lit) @symbol)
|
||||||
|
|
||||||
(qq_lit
|
(qq_lit
|
||||||
(sym_lit) @symbol)
|
(sym_lit) @symbol)
|
||||||
|
|
||||||
; Dynamic variables
|
;; Dynamic variables
|
||||||
((sym_lit) @variable.builtin
|
((sym_lit) @variable.builtin
|
||||||
(#lua-match? @variable.builtin "^[*].+[*]$"))
|
(#lua-match? @variable.builtin "^[*].+[*]$"))
|
||||||
|
|
||||||
; Operators
|
;; Operators
|
||||||
((sym_lit) @operator
|
((sym_lit) @operator
|
||||||
(#any-of? @operator
|
(#any-of? @operator
|
||||||
"%" "*" "+" "-" "/"
|
"%" "*" "+" "-" "/"
|
||||||
|
|
@ -66,7 +66,7 @@
|
||||||
(#any-of? @keyword.operator
|
(#any-of? @keyword.operator
|
||||||
"not" "not=" "and" "or"))
|
"not" "not=" "and" "or"))
|
||||||
|
|
||||||
; Definition
|
;; Definition
|
||||||
((sym_lit) @keyword
|
((sym_lit) @keyword
|
||||||
(#any-of? @keyword
|
(#any-of? @keyword
|
||||||
"def" "def-" "defdyn" "defglobal" "defmacro" "defmacro-"
|
"def" "def-" "defdyn" "defglobal" "defmacro" "defmacro-"
|
||||||
|
|
@ -75,11 +75,11 @@
|
||||||
((sym_lit) @keyword.function
|
((sym_lit) @keyword.function
|
||||||
(#match? @keyword.function "^(defn|defn-|fn|varfn)$"))
|
(#match? @keyword.function "^(defn|defn-|fn|varfn)$"))
|
||||||
|
|
||||||
; Comment
|
;; Comment
|
||||||
((sym_lit) @comment
|
((sym_lit) @comment
|
||||||
(#any-of? @comment "comment"))
|
(#any-of? @comment "comment"))
|
||||||
|
|
||||||
; Conditionals
|
;; Conditionals
|
||||||
((sym_lit) @conditional
|
((sym_lit) @conditional
|
||||||
(#any-of? @conditional
|
(#any-of? @conditional
|
||||||
"case" "cond"))
|
"case" "cond"))
|
||||||
|
|
@ -90,21 +90,20 @@
|
||||||
((sym_lit) @conditional
|
((sym_lit) @conditional
|
||||||
(#match? @conditional "^when(\\-.*)?$"))
|
(#match? @conditional "^when(\\-.*)?$"))
|
||||||
|
|
||||||
; Repeats
|
;; Repeats
|
||||||
((sym_lit) @repeat
|
((sym_lit) @repeat
|
||||||
(#any-of? @repeat
|
(#any-of? @repeat
|
||||||
"for" "forever" "forv" "loop" "repeat" "while"))
|
"for" "forever" "forv" "loop" "repeat" "while"))
|
||||||
|
|
||||||
; Exception
|
;; Exception
|
||||||
((sym_lit) @exception
|
((sym_lit) @exception
|
||||||
(#any-of? @exception "error" "errorf" "try"))
|
(#any-of? @exception "error" "errorf" "try"))
|
||||||
|
|
||||||
; Includes
|
;; Includes
|
||||||
((sym_lit) @include
|
((sym_lit) @include
|
||||||
(#any-of? @include "import" "require" "use"))
|
(#any-of? @include "import" "require" "use"))
|
||||||
|
|
||||||
; Builtin macros
|
;; Builtin macros
|
||||||
;; TODO: Do all these items belong here?
|
|
||||||
((sym_lit) @function.macro
|
((sym_lit) @function.macro
|
||||||
(#any-of? @function.macro
|
(#any-of? @function.macro
|
||||||
"++" "+=" "--"
|
"++" "+=" "--"
|
||||||
|
|
@ -137,10 +136,7 @@
|
||||||
"when" "when-let" "when-with"
|
"when" "when-let" "when-with"
|
||||||
"with" "with-dyns" "with-syms" "with-vars"))
|
"with" "with-dyns" "with-syms" "with-vars"))
|
||||||
|
|
||||||
((sym_lit) @function.macro
|
;; All builtin functions
|
||||||
(#match? @function.macro "^with\\-.*$"))
|
|
||||||
|
|
||||||
; All builtin functions
|
|
||||||
((sym_lit) @function.builtin
|
((sym_lit) @function.builtin
|
||||||
(#any-of? @function.builtin
|
(#any-of? @function.builtin
|
||||||
"*" "+" "-" "/"
|
"*" "+" "-" "/"
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue