Refresh generated neovim config
This commit is contained in:
@ -59,7 +59,7 @@
|
||||
; Decorators
|
||||
((decorator
|
||||
"@" @attribute)
|
||||
(#set! "priority" 101))
|
||||
(#set! priority 101))
|
||||
|
||||
(decorator
|
||||
(identifier) @attribute)
|
||||
@ -199,46 +199,27 @@
|
||||
] @string.escape
|
||||
|
||||
; doc-strings
|
||||
(module
|
||||
.
|
||||
(comment)*
|
||||
.
|
||||
(expression_statement
|
||||
(string) @string.documentation))
|
||||
|
||||
(class_definition
|
||||
body: (block
|
||||
.
|
||||
(expression_statement
|
||||
(string) @string.documentation)))
|
||||
|
||||
(function_definition
|
||||
body: (block
|
||||
.
|
||||
(expression_statement
|
||||
(string) @string.documentation)))
|
||||
|
||||
(module
|
||||
.
|
||||
(comment)*
|
||||
.
|
||||
(expression_statement
|
||||
(string
|
||||
(string_content) @spell)))
|
||||
(string_content) @spell) @string.documentation))
|
||||
|
||||
(class_definition
|
||||
body: (block
|
||||
.
|
||||
(expression_statement
|
||||
(string
|
||||
(string_content) @spell))))
|
||||
(string_content) @spell) @string.documentation)))
|
||||
|
||||
(function_definition
|
||||
body: (block
|
||||
.
|
||||
(expression_statement
|
||||
(string
|
||||
(string_content) @spell))))
|
||||
(string_content) @spell) @string.documentation)))
|
||||
|
||||
; Tokens
|
||||
[
|
||||
@ -339,6 +320,9 @@
|
||||
(aliased_import
|
||||
"as" @keyword.import)
|
||||
|
||||
(wildcard_import
|
||||
"*" @character.special)
|
||||
|
||||
[
|
||||
"if"
|
||||
"elif"
|
||||
|
||||
@ -1,6 +1,5 @@
|
||||
[
|
||||
(import_from_statement)
|
||||
(parenthesized_expression)
|
||||
(generator_expression)
|
||||
(list_comprehension)
|
||||
(set_comprehension)
|
||||
@ -24,6 +23,10 @@
|
||||
(#set! indent.open_delimiter "{")
|
||||
(#set! indent.close_delimiter "}"))
|
||||
|
||||
((parenthesized_expression) @indent.align
|
||||
(#set! indent.open_delimiter "(")
|
||||
(#set! indent.close_delimiter ")"))
|
||||
|
||||
((for_statement) @indent.begin
|
||||
(#set! indent.immediate 1))
|
||||
|
||||
@ -67,14 +70,40 @@
|
||||
((case_clause) @indent.begin
|
||||
(#set! indent.immediate 1))
|
||||
|
||||
; if (cond1
|
||||
; or cond2
|
||||
; or cond3):
|
||||
; pass
|
||||
;
|
||||
(if_statement
|
||||
condition: (parenthesized_expression) @indent.align
|
||||
(#lua-match? @indent.align "^%([^\n]")
|
||||
(#set! indent.open_delimiter "(")
|
||||
(#set! indent.close_delimiter ")")
|
||||
(#set! indent.avoid_last_matching_next 1))
|
||||
|
||||
; while (
|
||||
; cond1
|
||||
; or cond2
|
||||
; or cond3):
|
||||
; pass
|
||||
;
|
||||
(while_statement
|
||||
condition: (parenthesized_expression) @indent.align
|
||||
(#lua-match? @indent.align "[^\n ]%)$")
|
||||
(#set! indent.open_delimiter "(")
|
||||
(#set! indent.close_delimiter ")")
|
||||
(#set! indent.avoid_last_matching_next 1))
|
||||
|
||||
; if (
|
||||
; cond1
|
||||
; or cond2
|
||||
; or cond3):
|
||||
; pass
|
||||
;
|
||||
(if_statement
|
||||
condition: (parenthesized_expression) @indent.align
|
||||
(#lua-match? @indent.align "[^\n ]%)$")
|
||||
(#set! indent.open_delimiter "(")
|
||||
(#set! indent.close_delimiter ")")
|
||||
(#set! indent.avoid_last_matching_next 1))
|
||||
@ -91,6 +120,11 @@
|
||||
(#set! indent.close_delimiter ")"))
|
||||
|
||||
((parameters) @indent.align
|
||||
(#set! indent.open_delimiter "(")
|
||||
(#set! indent.close_delimiter ")"))
|
||||
|
||||
((parameters) @indent.align
|
||||
(#lua-match? @indent.align "[^\n ]%)$")
|
||||
(#set! indent.open_delimiter "(")
|
||||
(#set! indent.close_delimiter ")")
|
||||
(#set! indent.avoid_last_matching_next 1))
|
||||
@ -130,9 +164,6 @@
|
||||
.
|
||||
(#lua-match? @indent.branch "^elif"))
|
||||
|
||||
(parenthesized_expression
|
||||
")" @indent.end)
|
||||
|
||||
(generator_expression
|
||||
")" @indent.end)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user