fix(spell): do not spell check certain types of strings (#5203)

- Document that only certain kinds of strings are spell checked, and
  reasons why they may not.

- Remove spell checking for bash strings.
This commit is contained in:
Lewis Russell 2023-08-07 13:42:24 +01:00 committed by GitHub
parent 2051c8603d
commit d9be302f74
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 8 additions and 1 deletions

View file

@ -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

View file

@ -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)