Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
nvim queries: Conform to commonly used highlight names (#99)
This updates: | Query | Highlight name | Like in... | |-|-|-| | Punctuation `:`, `,` | `punctuation.special` | TOML, Bash, JSON, ... | | Key fields in tables/records | `variable.member` | Go, Zig, V, TOML | | Returns `->` | `punctuation.special` | Rust | | Variable `$` | `punctuation.special` | Bash, Awk | | Variable identifier | `variable` | Bash, Awk, Perl, Fish | | Shebang | `keyword.directive` | Bash, Awk | | Built-in types | `type` | Zig et al[^1] | | Numbers | `number` | Zig, Rust, Python, TOML, Bash, ... | | Arguments | `variable.parameter` | Bash[^2] | | Redirect operator | `operator` | Bash, Fish | | Redirect destination | `variable.parameter` | Bash | [^1]: Note that for built-in types, languages like Rust, Python, Go differentiates highlights of built-in types and other types (such as structs), but there are no other types in Nu, I'll leave this up to debate, IMO a generic type will suffice here. [^2]: Perl, Fish and Awk all leave these unhighlighted. Also adds highlights for documentation comments for functions and parameters. I've tried to put newly introduced highlight queries into the correct groups in the file, let me know if there are any other prevailing styles I should follow!
- Loading branch information