aboutsummaryrefslogtreecommitdiffstats
path: root/queries/latex
diff options
context:
space:
mode:
authorJonas Dujava <jonas.dujava@gmail.com>2024-06-18 21:03:28 +0200
committerChristian Clason <c.clason@uni-graz.at>2024-07-23 09:00:11 +0200
commit803e5bd14de3df27dcbd7264c2f1bfac19e08fb8 (patch)
tree19e5433f763885fa1ee8956b199b68c4f8421447 /queries/latex
parentfix(zig): add some missing highlights (diff)
downloadnvim-treesitter-803e5bd14de3df27dcbd7264c2f1bfac19e08fb8.tar
nvim-treesitter-803e5bd14de3df27dcbd7264c2f1bfac19e08fb8.tar.gz
nvim-treesitter-803e5bd14de3df27dcbd7264c2f1bfac19e08fb8.tar.bz2
nvim-treesitter-803e5bd14de3df27dcbd7264c2f1bfac19e08fb8.tar.lz
nvim-treesitter-803e5bd14de3df27dcbd7264c2f1bfac19e08fb8.tar.xz
nvim-treesitter-803e5bd14de3df27dcbd7264c2f1bfac19e08fb8.tar.zst
nvim-treesitter-803e5bd14de3df27dcbd7264c2f1bfac19e08fb8.zip
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>
Diffstat (limited to 'queries/latex')
-rw-r--r--queries/latex/highlights.scm70
1 files changed, 39 insertions, 31 deletions
diff --git a/queries/latex/highlights.scm b/queries/latex/highlights.scm
index 672111878..dcc068e95 100644
--- a/queries/latex/highlights.scm
+++ b/queries/latex/highlights.scm
@@ -16,7 +16,7 @@
(_) @none @spell))
(key_value_pair
- key: (_) @variable.parameter
+ key: (_) @variable.parameter @nospell
value: (_))
[
@@ -46,42 +46,42 @@
(begin
command: _ @module
name: (curly_group_text
- (text) @label))
+ (text) @label @nospell))
(end
command: _ @module
name: (curly_group_text
- (text) @label))
+ (text) @label @nospell))
; Definitions and references
(new_command_definition
- command: _ @function.macro)
+ command: _ @function.macro @nospell)
(old_command_definition
- command: _ @function.macro)
+ command: _ @function.macro @nospell)
(let_command_definition
- command: _ @function.macro)
+ command: _ @function.macro @nospell)
(environment_definition
- command: _ @function.macro
+ command: _ @function.macro @nospell
name: (curly_group_text
(_) @markup.link))
(theorem_definition
- command: _ @function.macro
+ command: _ @function.macro @nospell
name: (curly_group_text_list
- (_) @label))
+ (_) @label @nospell))
(paired_delimiter_definition
- command: _ @function.macro
+ command: _ @function.macro @nospell
declaration: (curly_group_command_name
(_) @function))
(label_definition
command: _ @function.macro
name: (curly_group_text
- (_) @markup.link))
+ (_) @markup.link @nospell))
(label_reference_range
command: _ @function.macro
@@ -102,8 +102,8 @@
number: (_) @markup.link)
(citation
- command: _ @function.macro
- keys: (curly_group_text_list) @markup.link)
+ command: _ @function.macro @nospell
+ keys: (curly_group_text_list) @markup.link @nospell)
(hyperlink
command: _ @function @nospell
@@ -111,9 +111,9 @@
(_) @markup.link.url @nospell))
(glossary_entry_definition
- command: _ @function.macro
+ command: _ @function.macro @nospell
name: (curly_group_text
- (_) @markup.link))
+ (_) @markup.link @nospell))
(glossary_entry_reference
command: _ @function.macro
@@ -121,9 +121,9 @@
(_) @markup.link))
(acronym_definition
- command: _ @function.macro
+ command: _ @function.macro @nospell
name: (curly_group_text
- (_) @markup.link))
+ (_) @markup.link @nospell))
(acronym_reference
command: _ @function.macro
@@ -280,20 +280,28 @@
command: _ @keyword.import
paths: (curly_group_path_list) @string)
-(key_value_pair) @nospell
-
-(generic_environment
- begin: _ @nospell
- end: _ @nospell)
-
-(citation
- keys: _ @nospell)
-
-(label_definition) @nospell
-
-(label_reference) @nospell
-
-(label_reference_range) @nospell
+; Turn spelling off for whole nodes
+[
+ (label_reference)
+ (label_reference_range)
+ (label_number)
+ (glossary_entry_reference)
+ (acronym_reference)
+ (color_definition)
+ (color_reference)
+ (class_include)
+ (package_include)
+ (latex_include)
+ (verbatim_include)
+ (import_include)
+ (bibstyle_include)
+ (bibtex_include)
+ (biblatex_include)
+ (graphics_include)
+ (svg_include)
+ (inkscape_include)
+ (tikz_library_import)
+] @nospell
; Math
[