mirror of
https://github.com/nvim-treesitter/nvim-treesitter.git
synced 2026-07-01 19:17:02 -04:00
feat!: drop modules, general refactor and cleanup
This commit is contained in:
parent
310f0925ec
commit
692b051b09
1247 changed files with 6096 additions and 9074 deletions
9
runtime/queries/koto/folds.scm
Normal file
9
runtime/queries/koto/folds.scm
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
[
|
||||
(assign)
|
||||
(comment)
|
||||
(function)
|
||||
(list)
|
||||
(map)
|
||||
(tuple)
|
||||
(string)
|
||||
] @fold
|
||||
138
runtime/queries/koto/highlights.scm
Normal file
138
runtime/queries/koto/highlights.scm
Normal file
|
|
@ -0,0 +1,138 @@
|
|||
[
|
||||
"="
|
||||
"+"
|
||||
"-"
|
||||
"*"
|
||||
"/"
|
||||
"%"
|
||||
"+="
|
||||
"-="
|
||||
"*="
|
||||
"/="
|
||||
"%="
|
||||
"=="
|
||||
"!="
|
||||
"<"
|
||||
">"
|
||||
"<="
|
||||
">="
|
||||
".."
|
||||
"..="
|
||||
"->"
|
||||
(null_check)
|
||||
] @operator
|
||||
|
||||
"let" @keyword
|
||||
|
||||
[
|
||||
"and"
|
||||
"not"
|
||||
"or"
|
||||
] @keyword.operator
|
||||
|
||||
[
|
||||
"return"
|
||||
"yield"
|
||||
] @keyword.return
|
||||
|
||||
[
|
||||
"if"
|
||||
"then"
|
||||
"else"
|
||||
"else if"
|
||||
"match"
|
||||
"switch"
|
||||
] @keyword.conditional
|
||||
|
||||
[
|
||||
(break)
|
||||
(continue)
|
||||
"for"
|
||||
"in"
|
||||
"loop"
|
||||
"until"
|
||||
"while"
|
||||
] @keyword.repeat
|
||||
|
||||
[
|
||||
"throw"
|
||||
"try"
|
||||
"catch"
|
||||
"finally"
|
||||
] @keyword.exception
|
||||
|
||||
[
|
||||
"export"
|
||||
"from"
|
||||
"import"
|
||||
"as"
|
||||
] @keyword.import
|
||||
|
||||
[
|
||||
"("
|
||||
")"
|
||||
"["
|
||||
"]"
|
||||
"{"
|
||||
"}"
|
||||
"|"
|
||||
] @punctuation.bracket
|
||||
|
||||
(identifier) @variable
|
||||
|
||||
(import_module
|
||||
(identifier) @module)
|
||||
|
||||
(import_item
|
||||
(identifier) @module)
|
||||
|
||||
(export
|
||||
(identifier) @module)
|
||||
|
||||
(chain
|
||||
lookup: (identifier) @variable.member)
|
||||
|
||||
(chain
|
||||
start: (identifier) @function.call)
|
||||
|
||||
[
|
||||
(true)
|
||||
(false)
|
||||
] @boolean
|
||||
|
||||
(comment) @comment @spell
|
||||
|
||||
(debug) @keyword.debug
|
||||
|
||||
(string) @string
|
||||
|
||||
(fill_char) @punctuation.delimiter
|
||||
|
||||
(alignment) @operator
|
||||
|
||||
(escape) @string.escape
|
||||
|
||||
(null) @constant.builtin
|
||||
|
||||
(number) @number
|
||||
|
||||
(meta) @keyword.directive
|
||||
|
||||
(meta
|
||||
name: (identifier) @variable.member)
|
||||
|
||||
(entry_inline
|
||||
key: (identifier) @variable.member)
|
||||
|
||||
(entry_block
|
||||
key: (identifier) @variable.member)
|
||||
|
||||
(self) @variable.builtin
|
||||
|
||||
(arg
|
||||
(identifier) @variable.parameter)
|
||||
|
||||
(ellipsis) @variable.parameter
|
||||
|
||||
(type
|
||||
_ @type)
|
||||
2
runtime/queries/koto/injections.scm
Normal file
2
runtime/queries/koto/injections.scm
Normal file
|
|
@ -0,0 +1,2 @@
|
|||
((comment) @injection.content
|
||||
(#set! injection.language "comment"))
|
||||
28
runtime/queries/koto/locals.scm
Normal file
28
runtime/queries/koto/locals.scm
Normal file
|
|
@ -0,0 +1,28 @@
|
|||
; Scopes
|
||||
(function
|
||||
body: (_) @local.scope)
|
||||
|
||||
; Definitions
|
||||
(arg
|
||||
(variable) @local.definition.parameter)
|
||||
|
||||
(assign
|
||||
(identifier) @local.definition.var)
|
||||
|
||||
(for_args
|
||||
(variable) @local.definition.var)
|
||||
|
||||
(match_patterns
|
||||
(variable) @local.definition.var)
|
||||
|
||||
(import_item
|
||||
(identifier) @local.definition.import)
|
||||
|
||||
(entry_block
|
||||
(identifier) @local.definition.field)
|
||||
|
||||
(entry_inline
|
||||
(identifier) @local.definition.field)
|
||||
|
||||
; References
|
||||
(identifier) @local.reference
|
||||
Loading…
Add table
Add a link
Reference in a new issue