aboutsummaryrefslogtreecommitdiffstats
path: root/queries/pascal
diff options
context:
space:
mode:
authorPhilip Zander <philip.zander@gmail.com>2021-12-29 20:46:03 +0100
committerStephan Seitz <stephan.seitz@fau.de>2021-12-29 23:38:43 +0100
commitfa2a6b68aaa6df0187b5bbebe6cbadc120d4a65a (patch)
tree46b4741b72d758b24451f2958473c2e13529e31c /queries/pascal
parentUpdate README (#2160) (diff)
downloadnvim-treesitter-fa2a6b68aaa6df0187b5bbebe6cbadc120d4a65a.tar
nvim-treesitter-fa2a6b68aaa6df0187b5bbebe6cbadc120d4a65a.tar.gz
nvim-treesitter-fa2a6b68aaa6df0187b5bbebe6cbadc120d4a65a.tar.bz2
nvim-treesitter-fa2a6b68aaa6df0187b5bbebe6cbadc120d4a65a.tar.lz
nvim-treesitter-fa2a6b68aaa6df0187b5bbebe6cbadc120d4a65a.tar.xz
nvim-treesitter-fa2a6b68aaa6df0187b5bbebe6cbadc120d4a65a.tar.zst
nvim-treesitter-fa2a6b68aaa6df0187b5bbebe6cbadc120d4a65a.zip
highlights(pascal): Highlight variables
Assume that any identifiers that aren't function calls, types, fields or constants are variables. This is consistent with the highlighting definitions for other languages. Some themes (e.g. zenbones) make use of this information and they don't look quite right unless we set those groups.
Diffstat (limited to 'queries/pascal')
-rw-r--r--queries/pascal/highlights.scm7
1 files changed, 6 insertions, 1 deletions
diff --git a/queries/pascal/highlights.scm b/queries/pascal/highlights.scm
index acc5c76f6..1c9dc2caf 100644
--- a/queries/pascal/highlights.scm
+++ b/queries/pascal/highlights.scm
@@ -228,6 +228,11 @@
(literalNumber) @number
(literalString) @string
+; -- Identifiers
+
+; Unless a more specific rule applies, treat identifiers as variables
+(identifier) @variable
+
; -- Comments
(comment) @comment
(pp) @function.macro
@@ -277,7 +282,7 @@
; -- Type usage
-(typeref) @type
+(typeref (_) @type)
; -- Constant usage