aboutsummaryrefslogtreecommitdiffstats
path: root/queries/eds
diff options
context:
space:
mode:
authorBeartama <8091245+uyha@users.noreply.github.com>2023-09-10 14:38:10 +0200
committerGitHub <noreply@github.com>2023-09-10 08:38:10 -0400
commit4c1a76ec236838a101e921ee349a47f323502092 (patch)
treeacd1ed0fc9b3d3109c6fbdcd7a663b7dc544f3ef /queries/eds
parentfix(julia): fix highlighting `end` keyword (diff)
downloadnvim-treesitter-4c1a76ec236838a101e921ee349a47f323502092.tar
nvim-treesitter-4c1a76ec236838a101e921ee349a47f323502092.tar.gz
nvim-treesitter-4c1a76ec236838a101e921ee349a47f323502092.tar.bz2
nvim-treesitter-4c1a76ec236838a101e921ee349a47f323502092.tar.lz
nvim-treesitter-4c1a76ec236838a101e921ee349a47f323502092.tar.xz
nvim-treesitter-4c1a76ec236838a101e921ee349a47f323502092.tar.zst
nvim-treesitter-4c1a76ec236838a101e921ee349a47f323502092.zip
feat: add EDS
Diffstat (limited to 'queries/eds')
-rw-r--r--queries/eds/folds.scm1
-rw-r--r--queries/eds/highlights.scm49
2 files changed, 50 insertions, 0 deletions
diff --git a/queries/eds/folds.scm b/queries/eds/folds.scm
new file mode 100644
index 000000000..911798f5a
--- /dev/null
+++ b/queries/eds/folds.scm
@@ -0,0 +1 @@
+(section) @fold
diff --git a/queries/eds/highlights.scm b/queries/eds/highlights.scm
new file mode 100644
index 000000000..42f408754
--- /dev/null
+++ b/queries/eds/highlights.scm
@@ -0,0 +1,49 @@
+"=" @punctuation.delimiter
+
+[ "[" "]" ] @punctuation.bracket
+
+((section_name) @variable.builtin
+ (#match? @variable.builtin "\\c^(FileInfo|DeviceInfo|DummyUsage|MandatoryObjects|OptionalObjects)$"))
+
+((section_name) @variable.builtin
+ (#lua-match? @variable.builtin "^1"))
+
+(section
+ (section_name) @_name
+ (#match? @_name "\\c^Comments$")) @comment
+
+(section
+ (section_name) @_name
+ (statement (key) @_key) @string
+ (#match? @_key "\\c^ParameterName$")
+ (#not-match? @_name "\\c^Comments$"))
+
+(section
+ (section_name) @_name
+ (statement (key) @_key) @type
+ (#match? @_key "\\c^ObjectType$")
+ (#not-match? @_name "\\c^Comments$"))
+
+(section
+ (section_name) @_name
+ (statement (key) @_key) @type
+ (#match? @_key "\\c^DataType$")
+ (#not-match? @_name "\\c^Comments$"))
+
+(section
+ (section_name) @_name
+ (statement (key) @_key) @type.qualifier
+ (#match? @_key "\\c^AccessType$")
+ (#not-match? @_name "\\c^Comments$"))
+
+(section
+ (section_name) @_name
+ (statement (key) @_key) @attribute
+ (#match? @_key "\\c^PDOMapping$")
+ (#not-match? @_name "\\c^Comments$"))
+
+(section
+ (section_name) @_name
+ (statement (key) @_key) @number
+ (#match? @_key "\\c^(DefaultValue|LowLimit|HighLimit|SubNumber)$")
+ (#not-match? @_name "\\c^Comments$"))