diff options
| author | ObserverOfTime <chronobserver@disroot.org> | 2023-06-24 21:35:51 +0300 |
|---|---|---|
| committer | ObserverOfTime <chronobserver@disroot.org> | 2023-06-25 08:15:25 +0300 |
| commit | 20a6c66b769d09491247d760967bb4ef2fcf3e0d (patch) | |
| tree | 38018f374aeb3bce633d924aa9c5d9f3f7bbbe3c /queries/awk/highlights.scm | |
| parent | fix(haskell_persistent): add to lockfile.json (diff) | |
| download | nvim-treesitter-20a6c66b769d09491247d760967bb4ef2fcf3e0d.tar nvim-treesitter-20a6c66b769d09491247d760967bb4ef2fcf3e0d.tar.gz nvim-treesitter-20a6c66b769d09491247d760967bb4ef2fcf3e0d.tar.bz2 nvim-treesitter-20a6c66b769d09491247d760967bb4ef2fcf3e0d.tar.lz nvim-treesitter-20a6c66b769d09491247d760967bb4ef2fcf3e0d.tar.xz nvim-treesitter-20a6c66b769d09491247d760967bb4ef2fcf3e0d.tar.zst nvim-treesitter-20a6c66b769d09491247d760967bb4ef2fcf3e0d.zip | |
feat(awk): highlight builtin variables & shebang
Diffstat (limited to 'queries/awk/highlights.scm')
| -rw-r--r-- | queries/awk/highlights.scm | 41 |
1 files changed, 41 insertions, 0 deletions
diff --git a/queries/awk/highlights.scm b/queries/awk/highlights.scm index a03c43670..4faf496e6 100644 --- a/queries/awk/highlights.scm +++ b/queries/awk/highlights.scm @@ -6,6 +6,44 @@ ] @variable (field_ref (_) @variable) +; https://www.gnu.org/software/gawk/manual/html_node/Auto_002dset.html +((identifier) @constant.builtin + (#any-of? @constant.builtin + "ARGC" + "ARGV" + "ARGIND" + "ENVIRON" + "ERRNO" + "FILENAME" + "FNR" + "NF" + "FUNCTAB" + "NR" + "PROCINFO" + "RLENGTH" + "RSTART" + "RT" + "SYMTAB")) + +; https://www.gnu.org/software/gawk/manual/html_node/User_002dmodified.html +((identifier) @variable.builtin + (#any-of? @variable.builtin + "BINMODE" + "CONVFMT" + "FIELDWIDTHS" + "FPAT" + "FS" + "IGNORECASE" + "LINT" + "OFMT" + "OFS" + "ORS" + "PREC" + "ROUNDMODE" + "RS" + "SUBSEP" + "TEXTDOMAIN")) + (number) @number (string) @string @@ -14,6 +52,9 @@ (comment) @comment @spell +((program . (comment) @preproc) + (#lua-match? @preproc "^#!/")) + (ns_qualified_name (namespace) @namespace) (ns_qualified_name "::" @punctuation.delimiter) |
