aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--CONTRIBUTING.md4
-rw-r--r--queries/bash/highlights.scm5
2 files changed, 8 insertions, 1 deletions
diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md
index f2e96bc1a..2d06c3525 100644
--- a/CONTRIBUTING.md
+++ b/CONTRIBUTING.md
@@ -239,6 +239,10 @@ Used for XML-like tags.
@nospell ; for defining regions that should NOT be spellchecked
```
+The main types of nodes which are spell checked are:
+- Comments
+- Strings; where it makes sense. Strings that have interpolation or are typically used for non text purposes are not spell checked (e.g. bash).
+
#### Priority
Captures can be assigned a priority to control precedence of highlights via the
diff --git a/queries/bash/highlights.scm b/queries/bash/highlights.scm
index 23bf03e69..063c2b920 100644
--- a/queries/bash/highlights.scm
+++ b/queries/bash/highlights.scm
@@ -40,12 +40,15 @@
"!="
] @operator
+; Do *not* spell check strings since they typically have some sort of
+; interpolation in them, or, are typically used for things like filenames, URLs,
+; flags and file content.
[
(string)
(raw_string)
(ansi_c_string)
(heredoc_body)
-] @string @spell
+] @string
(variable_assignment (word) @string)