mirror of
https://github.com/nvim-treesitter/nvim-treesitter.git
synced 2026-07-01 19:17:02 -04:00
refactor: Remove all (ERROR) @error captures
As discussed in PR#5421, capturing `@error` is inconsistent, requiring deep nesting (or priority) in order to correctly have red backgrounds to it. Some queries has this capture, some don't. For consistency purposes, removing all of them is more preferable. For re-enabling error, either add `(ERROR) @error` or `(ERROR _ @error)` to your custom queries.
This commit is contained in:
parent
44762abc90
commit
107e61afb7
80 changed files with 0 additions and 215 deletions
|
|
@ -188,9 +188,3 @@
|
|||
(enumeration_type_definition
|
||||
(identifier)
|
||||
. (comment) @comment.documentation)
|
||||
|
||||
;; Highlight errors in red. This is not very useful in practice, as text will
|
||||
;; be highlighted as user types, and the error could be elsewhere in the code.
|
||||
;; This also requires defining :hi @error guifg=Red for instance.
|
||||
(ERROR) @error
|
||||
|
||||
|
|
|
|||
|
|
@ -356,5 +356,3 @@
|
|||
"bytes" "bytearray" "memoryview" "set" "frozenset" "dict" "type" "object"))
|
||||
|
||||
(comment) @comment @spell
|
||||
|
||||
(ERROR) @error
|
||||
|
|
|
|||
|
|
@ -282,5 +282,3 @@
|
|||
(ms_pointer_modifier)
|
||||
(attribute_declaration)
|
||||
] @attribute
|
||||
|
||||
(ERROR) @error
|
||||
|
|
|
|||
|
|
@ -332,7 +332,3 @@
|
|||
; Comment
|
||||
|
||||
(comment) @comment @spell
|
||||
|
||||
; Errors
|
||||
|
||||
(ERROR) @error
|
||||
|
|
|
|||
|
|
@ -148,7 +148,3 @@
|
|||
; Comments
|
||||
|
||||
(comment) @comment @spell
|
||||
|
||||
; Errors
|
||||
|
||||
(ERROR) @error
|
||||
|
|
|
|||
|
|
@ -48,7 +48,3 @@
|
|||
;; Comment
|
||||
|
||||
(comment) @comment @spell
|
||||
|
||||
;; Error
|
||||
|
||||
(ERROR) @error
|
||||
|
|
|
|||
|
|
@ -18,5 +18,3 @@
|
|||
(float) @float
|
||||
(boolean) @boolean
|
||||
(null) @keyword
|
||||
|
||||
(ERROR) @error
|
||||
|
|
|
|||
|
|
@ -44,7 +44,3 @@
|
|||
; Comments
|
||||
|
||||
(comment) @comment @spell
|
||||
|
||||
; Errors
|
||||
|
||||
(ERROR) @error
|
||||
|
|
|
|||
|
|
@ -87,5 +87,3 @@
|
|||
"("
|
||||
"}"
|
||||
] @punctuation.bracket
|
||||
|
||||
(ERROR) @error
|
||||
|
|
|
|||
|
|
@ -158,7 +158,3 @@
|
|||
; Comments
|
||||
|
||||
(comment) @comment @spell
|
||||
|
||||
; Errors
|
||||
|
||||
(ERROR) @error
|
||||
|
|
|
|||
|
|
@ -268,6 +268,3 @@
|
|||
] @exception
|
||||
|
||||
["do" "while" "continue" "for"] @repeat
|
||||
|
||||
; Error
|
||||
(ERROR) @error
|
||||
|
|
|
|||
|
|
@ -51,5 +51,3 @@
|
|||
(preproc) @preproc
|
||||
|
||||
(comment) @spell
|
||||
|
||||
(ERROR) @error
|
||||
|
|
|
|||
|
|
@ -117,5 +117,3 @@
|
|||
[ "INCLUDE" "IGNORE" ] @include
|
||||
|
||||
(Comment) @comment @spell
|
||||
|
||||
(ERROR) @error
|
||||
|
|
|
|||
|
|
@ -10,6 +10,3 @@
|
|||
|
||||
; EEx comments are highlighted as such
|
||||
(comment) @comment @spell
|
||||
|
||||
; Tree-sitter parser errors
|
||||
(ERROR) @error
|
||||
|
|
|
|||
|
|
@ -19,9 +19,6 @@
|
|||
"%"
|
||||
] @punctuation.special
|
||||
|
||||
; Parser Errors
|
||||
(ERROR) @error
|
||||
|
||||
; Identifiers
|
||||
(identifier) @variable
|
||||
|
||||
|
|
|
|||
|
|
@ -184,6 +184,3 @@
|
|||
(comment) @comment @spell
|
||||
|
||||
["=>" "<=" "="] @operator
|
||||
|
||||
; Error
|
||||
(ERROR) @error
|
||||
|
|
|
|||
|
|
@ -161,8 +161,3 @@
|
|||
|
||||
((program . (comment) @preproc)
|
||||
(#lua-match? @preproc "^#!/"))
|
||||
|
||||
;; Error
|
||||
|
||||
(ERROR) @error
|
||||
|
||||
|
|
|
|||
|
|
@ -17,5 +17,3 @@
|
|||
] @punctuation.delimiter
|
||||
|
||||
(comment) @comment @spell
|
||||
|
||||
(ERROR) @error
|
||||
|
|
|
|||
|
|
@ -326,7 +326,3 @@
|
|||
|
||||
((comment) @comment.documentation
|
||||
(#lua-match? @comment.documentation "^!>"))
|
||||
|
||||
; Errors
|
||||
|
||||
(ERROR) @error
|
||||
|
|
|
|||
|
|
@ -1,5 +1,4 @@
|
|||
;; Basic
|
||||
(ERROR) @error
|
||||
|
||||
(identifier) @variable
|
||||
(name) @variable
|
||||
|
|
|
|||
|
|
@ -48,6 +48,4 @@
|
|||
(trailing_slash)
|
||||
] @error
|
||||
|
||||
(ERROR) @error
|
||||
|
||||
(comment) @comment @spell
|
||||
|
|
|
|||
|
|
@ -29,5 +29,3 @@
|
|||
(breaking_change (value) @text @spell)
|
||||
|
||||
(scissor) @comment
|
||||
|
||||
(ERROR) @error
|
||||
|
|
|
|||
|
|
@ -167,6 +167,3 @@
|
|||
|
||||
; Pipe Operator
|
||||
(binary_expression operator: "|>" right: (identifier) @function)
|
||||
|
||||
; Parser Errors
|
||||
(ERROR) @error
|
||||
|
|
|
|||
|
|
@ -245,10 +245,6 @@
|
|||
(comment)+ @comment.documentation
|
||||
. (var_declaration))
|
||||
|
||||
; Errors
|
||||
|
||||
(ERROR) @error
|
||||
|
||||
; Spell
|
||||
|
||||
((interpreted_string_literal) @spell
|
||||
|
|
|
|||
|
|
@ -24,5 +24,3 @@
|
|||
] @punctuation.bracket
|
||||
|
||||
"=" @operator
|
||||
|
||||
(ERROR) @error
|
||||
|
|
|
|||
|
|
@ -45,5 +45,3 @@
|
|||
[ "\"" "'" "," ] @punctuation.delimiter
|
||||
|
||||
(comment) @comment @spell
|
||||
|
||||
(ERROR) @error
|
||||
|
|
|
|||
|
|
@ -28,5 +28,3 @@
|
|||
type: (_) @type)
|
||||
(bin
|
||||
type: (_) @type)
|
||||
|
||||
(ERROR) @error
|
||||
|
|
|
|||
|
|
@ -313,5 +313,3 @@
|
|||
(xhp_open)
|
||||
(xhp_close)
|
||||
] @tag
|
||||
|
||||
(ERROR) @error
|
||||
|
|
|
|||
|
|
@ -249,7 +249,3 @@
|
|||
; Comments
|
||||
|
||||
(comment) @comment @spell
|
||||
|
||||
; Errors
|
||||
|
||||
(ERROR) @error
|
||||
|
|
|
|||
|
|
@ -95,5 +95,3 @@
|
|||
;
|
||||
; first element in get_attr is a variable.builtin or a reference to a variable.builtin
|
||||
(expression (variable_expr (identifier) @variable.builtin) (get_attr (identifier) @field))
|
||||
|
||||
(ERROR) @error
|
||||
|
|
|
|||
|
|
@ -32,9 +32,6 @@
|
|||
; HEEx text content is treated as markup
|
||||
(text) @text
|
||||
|
||||
; Tree-sitter parser errors
|
||||
(ERROR) @error
|
||||
|
||||
; HEEx tags and slots are highlighted as HTML
|
||||
[
|
||||
(tag_name)
|
||||
|
|
|
|||
|
|
@ -6,7 +6,6 @@
|
|||
(pair value: (string) @string)
|
||||
(array (string) @string)
|
||||
; (string_content (escape_sequence) @string.escape)
|
||||
(ERROR) @error
|
||||
; "," @punctuation.delimiter
|
||||
"[" @punctuation.bracket
|
||||
"]" @punctuation.bracket
|
||||
|
|
|
|||
|
|
@ -54,7 +54,3 @@
|
|||
; Comments
|
||||
|
||||
(comment) @comment @spell
|
||||
|
||||
; Errors
|
||||
|
||||
(ERROR) @error
|
||||
|
|
|
|||
|
|
@ -12,8 +12,6 @@
|
|||
|
||||
(array (string) @string)
|
||||
|
||||
(ERROR) @error
|
||||
|
||||
["," ":"] @punctuation.delimiter
|
||||
|
||||
[
|
||||
|
|
|
|||
|
|
@ -13,5 +13,3 @@
|
|||
|
||||
(member
|
||||
name: (_) @keyword)
|
||||
|
||||
(ERROR) @error
|
||||
|
|
|
|||
|
|
@ -116,6 +116,3 @@
|
|||
(id) @parameter
|
||||
))?
|
||||
")")
|
||||
|
||||
; ERROR
|
||||
(ERROR) @error
|
||||
|
|
|
|||
|
|
@ -77,5 +77,3 @@
|
|||
(source (prompt) @text.uri @string.special)
|
||||
|
||||
(comment) @comment @spell
|
||||
|
||||
(ERROR) @error
|
||||
|
|
|
|||
|
|
@ -1,5 +1,4 @@
|
|||
;; General syntax
|
||||
(ERROR) @error
|
||||
|
||||
(command_name) @function
|
||||
(caption
|
||||
|
|
|
|||
|
|
@ -162,5 +162,3 @@
|
|||
"none"
|
||||
"zeroinitializer"
|
||||
] @constant.builtin
|
||||
|
||||
(ERROR) @error
|
||||
|
|
|
|||
|
|
@ -247,6 +247,3 @@
|
|||
(string) @string
|
||||
|
||||
(escape_sequence) @string.escape
|
||||
|
||||
;; Error
|
||||
(ERROR) @error
|
||||
|
|
|
|||
|
|
@ -246,7 +246,3 @@
|
|||
|
||||
((comment) @comment.documentation
|
||||
(#lua-match? @comment.documentation "^[-][-](%s?)@"))
|
||||
|
||||
; Errors
|
||||
|
||||
(ERROR) @error
|
||||
|
|
|
|||
|
|
@ -148,7 +148,3 @@
|
|||
; Comments
|
||||
|
||||
[ (comment) (line_continuation) ] @comment @spell
|
||||
|
||||
; Errors
|
||||
|
||||
(ERROR) @error
|
||||
|
|
|
|||
|
|
@ -26,4 +26,3 @@
|
|||
(ocaml) @none
|
||||
|
||||
[(comment) (line_comment) (ocaml_comment)] @comment @spell
|
||||
(ERROR) @error
|
||||
|
|
|
|||
|
|
@ -173,5 +173,3 @@
|
|||
;---------
|
||||
|
||||
[(comment) (line_number_directive) (directive) (shebang)] @comment @spell
|
||||
|
||||
(ERROR) @error
|
||||
|
|
|
|||
|
|
@ -38,4 +38,3 @@
|
|||
; Misc
|
||||
|
||||
(comment) @comment @spell
|
||||
(ERROR) @error
|
||||
|
|
|
|||
|
|
@ -287,7 +287,3 @@
|
|||
(comment)
|
||||
(block_comment)
|
||||
] @comment @spell
|
||||
|
||||
; Errors
|
||||
|
||||
(ERROR) @error
|
||||
|
|
|
|||
|
|
@ -7,5 +7,3 @@
|
|||
(data) @none
|
||||
|
||||
(comment) @comment @spell
|
||||
|
||||
(ERROR) @error
|
||||
|
|
|
|||
|
|
@ -103,8 +103,6 @@
|
|||
|
||||
(function) @function
|
||||
|
||||
(ERROR) @error
|
||||
|
||||
(_
|
||||
"{" @punctuation.special
|
||||
(varname)
|
||||
|
|
|
|||
|
|
@ -319,5 +319,3 @@
|
|||
"@"
|
||||
"::"
|
||||
] @operator
|
||||
|
||||
(ERROR) @error
|
||||
|
|
|
|||
|
|
@ -27,7 +27,3 @@
|
|||
(comment (reference (text) @string.special.path))
|
||||
|
||||
(comment (flag (text) @preproc))
|
||||
|
||||
; Errors
|
||||
|
||||
(ERROR) @error
|
||||
|
|
|
|||
|
|
@ -286,7 +286,3 @@
|
|||
(line_comment)
|
||||
(block_comment)
|
||||
] @comment @spell
|
||||
|
||||
; Errors
|
||||
|
||||
(ERROR) @error
|
||||
|
|
|
|||
|
|
@ -38,5 +38,3 @@
|
|||
(function_name) @function.call
|
||||
|
||||
(comment) @comment @spell
|
||||
(ERROR) @error
|
||||
|
||||
|
|
|
|||
|
|
@ -189,7 +189,3 @@
|
|||
; Comments
|
||||
|
||||
(comment) @comment @spell
|
||||
|
||||
; Errors
|
||||
|
||||
(ERROR) @error
|
||||
|
|
|
|||
|
|
@ -17,6 +17,4 @@
|
|||
|
||||
(escaped_char) @string.escape
|
||||
|
||||
(ERROR) @error
|
||||
|
||||
(comment) @comment @spell
|
||||
|
|
|
|||
|
|
@ -346,6 +346,3 @@
|
|||
;; https://docs.python.org/3/library/stdtypes.html
|
||||
"bool" "int" "float" "complex" "list" "tuple" "range" "str"
|
||||
"bytes" "bytearray" "memoryview" "set" "frozenset" "dict" "type" "object"))
|
||||
|
||||
;; Error
|
||||
(ERROR) @error
|
||||
|
|
|
|||
|
|
@ -139,6 +139,3 @@
|
|||
|
||||
(call
|
||||
function: ((dollar _ (identifier) @method.call)))
|
||||
|
||||
; Error
|
||||
(ERROR) @error
|
||||
|
|
|
|||
|
|
@ -6,8 +6,6 @@
|
|||
;; Basic highlights ;;
|
||||
;;------------------------------------------------------------------;;
|
||||
|
||||
(ERROR) @error
|
||||
|
||||
;; basic ;;
|
||||
|
||||
(number) @number
|
||||
|
|
|
|||
|
|
@ -78,5 +78,3 @@
|
|||
(environ_value "env" @function.builtin (identifier) @variable)
|
||||
|
||||
(property_name) @variable
|
||||
|
||||
(ERROR) @error
|
||||
|
|
|
|||
|
|
@ -186,5 +186,3 @@
|
|||
(comment)
|
||||
(ignore_block)
|
||||
] @comment @spell
|
||||
|
||||
(ERROR) @error
|
||||
|
|
|
|||
|
|
@ -42,6 +42,4 @@
|
|||
|
||||
(linebreak) @character.special
|
||||
|
||||
(ERROR) @error
|
||||
|
||||
(comment) @comment @spell
|
||||
|
|
|
|||
|
|
@ -1,2 +0,0 @@
|
|||
;; General syntax
|
||||
;(ERROR) @error
|
||||
|
|
@ -50,4 +50,3 @@
|
|||
;------------
|
||||
|
||||
(escape_sequence) @string.escape
|
||||
(ERROR) @error
|
||||
|
|
|
|||
|
|
@ -167,5 +167,3 @@
|
|||
(#not-any-of? @_directive "code" "code-block" "sourcecode")))
|
||||
|
||||
(paragraph) @spell
|
||||
|
||||
(ERROR) @error
|
||||
|
|
|
|||
|
|
@ -255,5 +255,3 @@
|
|||
(interpolation
|
||||
"#{" @punctuation.special
|
||||
"}" @punctuation.special) @none
|
||||
|
||||
(ERROR) @error
|
||||
|
|
|
|||
|
|
@ -212,7 +212,3 @@
|
|||
|
||||
(class_definition
|
||||
(comment) @comment.documentation)
|
||||
|
||||
; Errors
|
||||
|
||||
(ERROR) @error
|
||||
|
|
|
|||
|
|
@ -258,7 +258,3 @@
|
|||
|
||||
((comment) @comment.documentation
|
||||
(#lua-match? @comment.documentation "^/[*][*][^*].*[*]/$"))
|
||||
|
||||
; Errors
|
||||
|
||||
(ERROR) @error
|
||||
|
|
|
|||
|
|
@ -68,8 +68,6 @@
|
|||
|
||||
(comment) @comment @spell
|
||||
|
||||
(ERROR) @error
|
||||
|
||||
; Punctuation
|
||||
|
||||
[ "${" "}" ] @punctuation.special
|
||||
|
|
|
|||
|
|
@ -262,9 +262,6 @@
|
|||
|
||||
["," "." ":" ";" (ellipsis)] @punctuation.delimiter
|
||||
|
||||
;; Error
|
||||
(ERROR) @error
|
||||
|
||||
;; Starlark-specific
|
||||
|
||||
;; Assertion calls
|
||||
|
|
|
|||
|
|
@ -50,5 +50,3 @@
|
|||
] @punctuation.delimiter
|
||||
|
||||
(comment) @comment @spell
|
||||
|
||||
(ERROR) @error
|
||||
|
|
|
|||
|
|
@ -150,7 +150,3 @@
|
|||
|
||||
((comment) @preproc
|
||||
(#lua-match? @preproc "^.*RUN"))
|
||||
|
||||
; Errors
|
||||
|
||||
(ERROR) @error
|
||||
|
|
|
|||
|
|
@ -130,6 +130,3 @@
|
|||
; (string (format_specifier) @string.escape)
|
||||
; key: (identifier) @func-name)
|
||||
; (#eq? @func-name "format"))
|
||||
|
||||
|
||||
(ERROR) @error
|
||||
|
|
|
|||
|
|
@ -224,7 +224,3 @@
|
|||
|
||||
((comment) @preproc
|
||||
(#lua-match? @preproc "#!.*"))
|
||||
|
||||
; Errors
|
||||
|
||||
(ERROR) @error
|
||||
|
|
|
|||
|
|
@ -32,5 +32,3 @@
|
|||
"]]" @punctuation.bracket
|
||||
"{" @punctuation.bracket
|
||||
"}" @punctuation.bracket
|
||||
|
||||
(ERROR) @error
|
||||
|
|
|
|||
|
|
@ -26,5 +26,3 @@
|
|||
"("
|
||||
")"
|
||||
] @punctuation.bracket
|
||||
|
||||
(ERROR) @error
|
||||
|
|
|
|||
|
|
@ -461,7 +461,3 @@
|
|||
(_
|
||||
(comment)+ @comment.documentation
|
||||
[(function_declaration) (type_declaration) (enum_declaration)])
|
||||
|
||||
; Errors
|
||||
|
||||
(ERROR) @error
|
||||
|
|
|
|||
|
|
@ -311,5 +311,3 @@
|
|||
"("
|
||||
")"
|
||||
] @punctuation.bracket
|
||||
|
||||
(ERROR) @error
|
||||
|
|
|
|||
|
|
@ -102,5 +102,3 @@
|
|||
(identifier) @attribute)
|
||||
|
||||
[(line_comment) (block_comment)] @comment @spell
|
||||
|
||||
(ERROR) @error
|
||||
|
|
|
|||
|
|
@ -11,7 +11,6 @@
|
|||
(anchor_name) @type
|
||||
(alias_name) @type
|
||||
(tag) @type
|
||||
(ERROR) @error
|
||||
|
||||
[
|
||||
(yaml_directive)
|
||||
|
|
|
|||
|
|
@ -144,7 +144,3 @@
|
|||
; Comments
|
||||
|
||||
(comment) @comment @spell
|
||||
|
||||
; Errors
|
||||
|
||||
(ERROR) @error
|
||||
|
|
|
|||
|
|
@ -227,6 +227,3 @@ field_constant: (IDENTIFIER) @constant
|
|||
(PtrPayload "|")
|
||||
(PtrIndexPayload "|")
|
||||
] @punctuation.bracket
|
||||
|
||||
; Error
|
||||
(ERROR) @error
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue