mirror of
https://github.com/nvim-treesitter/nvim-treesitter.git
synced 2026-07-12 00:10:04 -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
5
runtime/queries/robot/folds.scm
Normal file
5
runtime/queries/robot/folds.scm
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
[
|
||||
(section)
|
||||
(keyword_definition)
|
||||
(test_case_definition)
|
||||
] @fold
|
||||
129
runtime/queries/robot/highlights.scm
Normal file
129
runtime/queries/robot/highlights.scm
Normal file
|
|
@ -0,0 +1,129 @@
|
|||
[
|
||||
(comment)
|
||||
(extra_text)
|
||||
] @comment @spell
|
||||
|
||||
[
|
||||
(section_header)
|
||||
(setting_statement)
|
||||
(keyword_setting)
|
||||
(test_case_setting)
|
||||
] @keyword
|
||||
|
||||
(variable_definition
|
||||
(variable_name) @variable)
|
||||
|
||||
(keyword_definition
|
||||
(name) @function)
|
||||
|
||||
(test_case_definition
|
||||
(name) @function)
|
||||
|
||||
(keyword_invocation
|
||||
(keyword) @function.call)
|
||||
|
||||
(ellipses) @punctuation.delimiter
|
||||
|
||||
(text_chunk) @string
|
||||
|
||||
(inline_python_expression) @string.special
|
||||
|
||||
[
|
||||
(scalar_variable)
|
||||
(list_variable)
|
||||
(dictionary_variable)
|
||||
] @variable
|
||||
|
||||
; Control structures
|
||||
[
|
||||
"FOR"
|
||||
"IN"
|
||||
"IN RANGE"
|
||||
"IN ENUMERATE"
|
||||
"IN ZIP"
|
||||
(break_statement)
|
||||
(continue_statement)
|
||||
] @keyword.repeat
|
||||
|
||||
(for_statement
|
||||
"END" @keyword.repeat)
|
||||
|
||||
"WHILE" @keyword.repeat
|
||||
|
||||
(while_statement
|
||||
"END" @keyword.repeat)
|
||||
|
||||
[
|
||||
"IF"
|
||||
"ELSE IF"
|
||||
] @keyword.conditional
|
||||
|
||||
(if_statement
|
||||
"END" @keyword.conditional)
|
||||
|
||||
(if_statement
|
||||
(else_statement
|
||||
"ELSE" @keyword.conditional))
|
||||
|
||||
(inline_if_statement
|
||||
(inline_else_statement
|
||||
"ELSE" @keyword.conditional))
|
||||
|
||||
[
|
||||
"TRY"
|
||||
"EXCEPT"
|
||||
"FINALLY"
|
||||
] @keyword.exception
|
||||
|
||||
(try_statement
|
||||
"END" @keyword.exception)
|
||||
|
||||
(try_statement
|
||||
(else_statement
|
||||
"ELSE" @keyword.exception))
|
||||
|
||||
; Extra captures for "Documentation" settings
|
||||
(setting_statement
|
||||
name: (setting_name) @_name
|
||||
(arguments
|
||||
(argument
|
||||
(text_chunk) @spell @string.documentation))
|
||||
(#any-of? @_name "Documentation" "documentation" "DOCUMENTATION"))
|
||||
|
||||
(setting_statement
|
||||
name: (setting_name) @_name
|
||||
(arguments
|
||||
(continuation
|
||||
(argument
|
||||
(text_chunk) @spell @string.documentation)))
|
||||
(#any-of? @_name "Documentation" "documentation" "DOCUMENTATION"))
|
||||
|
||||
(keyword_setting
|
||||
name: (keyword_setting_name) @_name
|
||||
(arguments
|
||||
(argument
|
||||
(text_chunk) @spell @string.documentation))
|
||||
(#any-of? @_name "Documentation" "documentation" "DOCUMENTATION"))
|
||||
|
||||
(keyword_setting
|
||||
name: (keyword_setting_name) @_name
|
||||
(arguments
|
||||
(continuation
|
||||
(argument
|
||||
(text_chunk) @spell @string.documentation)))
|
||||
(#any-of? @_name "Documentation" "documentation" "DOCUMENTATION"))
|
||||
|
||||
(test_case_setting
|
||||
name: (test_case_setting_name) @_name
|
||||
(arguments
|
||||
(argument
|
||||
(text_chunk) @spell @string.documentation))
|
||||
(#any-of? @_name "Documentation" "documentation" "DOCUMENTATION"))
|
||||
|
||||
(test_case_setting
|
||||
name: (test_case_setting_name) @_name
|
||||
(arguments
|
||||
(continuation
|
||||
(argument
|
||||
(text_chunk) @spell @string.documentation)))
|
||||
(#any-of? @_name "Documentation" "documentation" "DOCUMENTATION"))
|
||||
44
runtime/queries/robot/indents.scm
Normal file
44
runtime/queries/robot/indents.scm
Normal file
|
|
@ -0,0 +1,44 @@
|
|||
(keyword_definition) @indent.begin
|
||||
|
||||
(test_case_definition) @indent.begin
|
||||
|
||||
(for_statement) @indent.begin
|
||||
|
||||
(for_statement
|
||||
"END" @indent.branch)
|
||||
|
||||
(for_statement
|
||||
right: (_
|
||||
(arguments
|
||||
(continuation
|
||||
(ellipses) @indent.branch))))
|
||||
|
||||
(while_statement) @indent.begin
|
||||
|
||||
(while_statement
|
||||
"END" @indent.branch)
|
||||
|
||||
(if_statement) @indent.begin
|
||||
|
||||
(if_statement
|
||||
(elseif_statement) @indent.branch)
|
||||
|
||||
(if_statement
|
||||
(else_statement) @indent.branch)
|
||||
|
||||
(if_statement
|
||||
"END" @indent.branch)
|
||||
|
||||
(try_statement) @indent.begin
|
||||
|
||||
(try_statement
|
||||
(except_statement) @indent.branch)
|
||||
|
||||
(try_statement
|
||||
(finally_statement) @indent.branch)
|
||||
|
||||
(try_statement
|
||||
(else_statement) @indent.branch)
|
||||
|
||||
(try_statement
|
||||
"END" @indent.branch)
|
||||
5
runtime/queries/robot/injections.scm
Normal file
5
runtime/queries/robot/injections.scm
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
([
|
||||
(comment)
|
||||
(extra_text)
|
||||
] @injection.content
|
||||
(#set! injection.language "comment"))
|
||||
Loading…
Add table
Add a link
Reference in a new issue