mirror of
https://github.com/nvim-treesitter/nvim-treesitter.git
synced 2026-07-07 05:50:04 -04:00
feat!: drop modules, general refactor and cleanup
This commit is contained in:
parent
c13e28f894
commit
2c8f2f2fad
829 changed files with 4905 additions and 8010 deletions
1
runtime/queries/fennel/folds.scm
Normal file
1
runtime/queries/fennel/folds.scm
Normal file
|
|
@ -0,0 +1 @@
|
|||
[(list) (table) (sequential_table) (let) (fn) (let_clause) (quoted_list) (local) (global)] @fold
|
||||
121
runtime/queries/fennel/highlights.scm
Normal file
121
runtime/queries/fennel/highlights.scm
Normal file
|
|
@ -0,0 +1,121 @@
|
|||
(comment) @comment @spell
|
||||
|
||||
[
|
||||
"("
|
||||
")"
|
||||
"{"
|
||||
"}"
|
||||
"["
|
||||
"]"
|
||||
] @punctuation.bracket
|
||||
|
||||
[
|
||||
":"
|
||||
":until"
|
||||
"&"
|
||||
"&as"
|
||||
"?"
|
||||
] @punctuation.special
|
||||
|
||||
(nil) @constant.builtin
|
||||
(vararg) @punctuation.special
|
||||
|
||||
(boolean) @boolean
|
||||
(number) @number
|
||||
|
||||
(string) @string
|
||||
(escape_sequence) @string.escape
|
||||
|
||||
(symbol) @variable
|
||||
|
||||
(multi_symbol
|
||||
"." @punctuation.delimiter
|
||||
(symbol) @field)
|
||||
|
||||
(multi_symbol_method
|
||||
":" @punctuation.delimiter
|
||||
(symbol) @method.call .)
|
||||
|
||||
(list . (symbol) @function.call)
|
||||
(list . (multi_symbol (symbol) @function.call .))
|
||||
|
||||
((symbol) @variable.builtin
|
||||
(#lua-match? @variable.builtin "^[$]"))
|
||||
|
||||
(binding) @symbol
|
||||
|
||||
[
|
||||
"fn"
|
||||
"lambda"
|
||||
"hashfn"
|
||||
"#"
|
||||
] @keyword.function
|
||||
|
||||
(fn name: [
|
||||
(symbol) @function
|
||||
(multi_symbol (symbol) @function .)
|
||||
])
|
||||
|
||||
(lambda name: [
|
||||
(symbol) @function
|
||||
(multi_symbol (symbol) @function .)
|
||||
])
|
||||
|
||||
[
|
||||
"for"
|
||||
"each"
|
||||
] @repeat
|
||||
((symbol) @repeat
|
||||
(#any-of? @repeat
|
||||
"while"))
|
||||
|
||||
[
|
||||
"match"
|
||||
] @conditional
|
||||
((symbol) @conditional
|
||||
(#any-of? @conditional
|
||||
"if" "when"))
|
||||
|
||||
[
|
||||
"global"
|
||||
"local"
|
||||
"let"
|
||||
"set"
|
||||
"var"
|
||||
"where"
|
||||
"or"
|
||||
] @keyword
|
||||
((symbol) @keyword
|
||||
(#any-of? @keyword
|
||||
"comment" "do" "doc" "eval-compiler" "lua" "macros" "quote" "tset" "values"))
|
||||
|
||||
((symbol) @include
|
||||
(#any-of? @include
|
||||
"require" "require-macros" "import-macros" "include"))
|
||||
|
||||
[
|
||||
"collect"
|
||||
"icollect"
|
||||
"accumulate"
|
||||
] @function.macro
|
||||
|
||||
((symbol) @function.macro
|
||||
(#any-of? @function.macro
|
||||
"->" "->>" "-?>" "-?>>" "?." "doto" "macro" "macrodebug" "partial" "pick-args"
|
||||
"pick-values" "with-open"))
|
||||
|
||||
; Lua builtins
|
||||
((symbol) @constant.builtin
|
||||
(#any-of? @constant.builtin
|
||||
"arg" "_ENV" "_G" "_VERSION"))
|
||||
|
||||
((symbol) @function.builtin
|
||||
(#any-of? @function.builtin
|
||||
"assert" "collectgarbage" "dofile" "error" "getmetatable" "ipairs"
|
||||
"load" "loadfile" "next" "pairs" "pcall" "print" "rawequal" "rawget"
|
||||
"rawlen" "rawset" "require" "select" "setmetatable" "tonumber" "tostring"
|
||||
"type" "warn" "xpcall"))
|
||||
|
||||
((symbol) @function.builtin
|
||||
(#any-of? @function.builtin
|
||||
"loadstring" "module" "setfenv" "unpack"))
|
||||
2
runtime/queries/fennel/injections.scm
Normal file
2
runtime/queries/fennel/injections.scm
Normal file
|
|
@ -0,0 +1,2 @@
|
|||
((comment) @injection.content
|
||||
(#set! injection.language "comment"))
|
||||
26
runtime/queries/fennel/locals.scm
Normal file
26
runtime/queries/fennel/locals.scm
Normal file
|
|
@ -0,0 +1,26 @@
|
|||
[
|
||||
(program)
|
||||
(fn)
|
||||
(lambda)
|
||||
(let)
|
||||
(each)
|
||||
(for)
|
||||
(match)
|
||||
] @scope
|
||||
|
||||
(
|
||||
(list . (symbol) @_special) @scope
|
||||
(#any-of? @_special
|
||||
"while" "if" "when" "do" "collect" "icollect" "accumulate")
|
||||
)
|
||||
|
||||
(fn name: (symbol) @definition.function
|
||||
(#set! definition.function.scope "parent"))
|
||||
(lambda name: (symbol) @definition.function
|
||||
(#set! definition.function.scope "parent"))
|
||||
|
||||
; TODO: use @definition.parameter for parameters
|
||||
(binding (symbol) @definition.var)
|
||||
(for_clause . (symbol) @definition.var)
|
||||
|
||||
(symbol) @reference
|
||||
Loading…
Add table
Add a link
Reference in a new issue