fix(latex): more @nospell

Apply `@nospell` to command/label names, paths, etc.
Where appropriate, turn spelling off for the whole node.

Signed-off-by: Jonas Dujava <jonas.dujava@gmail.com>
This commit is contained in:
Jonas Dujava 2024-06-18 21:03:28 +02:00 committed by Christian Clason
parent 49452ab703
commit 803e5bd14d

View file

@ -16,7 +16,7 @@
(_) @none @spell)) (_) @none @spell))
(key_value_pair (key_value_pair
key: (_) @variable.parameter key: (_) @variable.parameter @nospell
value: (_)) value: (_))
[ [
@ -46,42 +46,42 @@
(begin (begin
command: _ @module command: _ @module
name: (curly_group_text name: (curly_group_text
(text) @label)) (text) @label @nospell))
(end (end
command: _ @module command: _ @module
name: (curly_group_text name: (curly_group_text
(text) @label)) (text) @label @nospell))
; Definitions and references ; Definitions and references
(new_command_definition (new_command_definition
command: _ @function.macro) command: _ @function.macro @nospell)
(old_command_definition (old_command_definition
command: _ @function.macro) command: _ @function.macro @nospell)
(let_command_definition (let_command_definition
command: _ @function.macro) command: _ @function.macro @nospell)
(environment_definition (environment_definition
command: _ @function.macro command: _ @function.macro @nospell
name: (curly_group_text name: (curly_group_text
(_) @markup.link)) (_) @markup.link))
(theorem_definition (theorem_definition
command: _ @function.macro command: _ @function.macro @nospell
name: (curly_group_text_list name: (curly_group_text_list
(_) @label)) (_) @label @nospell))
(paired_delimiter_definition (paired_delimiter_definition
command: _ @function.macro command: _ @function.macro @nospell
declaration: (curly_group_command_name declaration: (curly_group_command_name
(_) @function)) (_) @function))
(label_definition (label_definition
command: _ @function.macro command: _ @function.macro
name: (curly_group_text name: (curly_group_text
(_) @markup.link)) (_) @markup.link @nospell))
(label_reference_range (label_reference_range
command: _ @function.macro command: _ @function.macro
@ -102,8 +102,8 @@
number: (_) @markup.link) number: (_) @markup.link)
(citation (citation
command: _ @function.macro command: _ @function.macro @nospell
keys: (curly_group_text_list) @markup.link) keys: (curly_group_text_list) @markup.link @nospell)
(hyperlink (hyperlink
command: _ @function @nospell command: _ @function @nospell
@ -111,9 +111,9 @@
(_) @markup.link.url @nospell)) (_) @markup.link.url @nospell))
(glossary_entry_definition (glossary_entry_definition
command: _ @function.macro command: _ @function.macro @nospell
name: (curly_group_text name: (curly_group_text
(_) @markup.link)) (_) @markup.link @nospell))
(glossary_entry_reference (glossary_entry_reference
command: _ @function.macro command: _ @function.macro
@ -121,9 +121,9 @@
(_) @markup.link)) (_) @markup.link))
(acronym_definition (acronym_definition
command: _ @function.macro command: _ @function.macro @nospell
name: (curly_group_text name: (curly_group_text
(_) @markup.link)) (_) @markup.link @nospell))
(acronym_reference (acronym_reference
command: _ @function.macro command: _ @function.macro
@ -280,20 +280,28 @@
command: _ @keyword.import command: _ @keyword.import
paths: (curly_group_path_list) @string) paths: (curly_group_path_list) @string)
(key_value_pair) @nospell ; Turn spelling off for whole nodes
[
(generic_environment (label_reference)
begin: _ @nospell (label_reference_range)
end: _ @nospell) (label_number)
(glossary_entry_reference)
(citation (acronym_reference)
keys: _ @nospell) (color_definition)
(color_reference)
(label_definition) @nospell (class_include)
(package_include)
(label_reference) @nospell (latex_include)
(verbatim_include)
(label_reference_range) @nospell (import_include)
(bibstyle_include)
(bibtex_include)
(biblatex_include)
(graphics_include)
(svg_include)
(inkscape_include)
(tikz_library_import)
] @nospell
; Math ; Math
[ [