aboutsummaryrefslogtreecommitdiffstats
path: root/queries
diff options
context:
space:
mode:
authorMatthew Gramigna <matthewgramigna@gmail.com>2023-01-18 09:58:45 -0800
committerGitHub <noreply@github.com>2023-01-18 17:58:45 +0000
commit622baacdc1b22cdfd73bc98c07bb5654a090bcac (patch)
treebc986c4d21174e8247c59eaa47a3e211474ac64f /queries
parentUpdate parsers: scala (diff)
downloadnvim-treesitter-622baacdc1b22cdfd73bc98c07bb5654a090bcac.tar
nvim-treesitter-622baacdc1b22cdfd73bc98c07bb5654a090bcac.tar.gz
nvim-treesitter-622baacdc1b22cdfd73bc98c07bb5654a090bcac.tar.bz2
nvim-treesitter-622baacdc1b22cdfd73bc98c07bb5654a090bcac.tar.lz
nvim-treesitter-622baacdc1b22cdfd73bc98c07bb5654a090bcac.tar.xz
nvim-treesitter-622baacdc1b22cdfd73bc98c07bb5654a090bcac.tar.zst
nvim-treesitter-622baacdc1b22cdfd73bc98c07bb5654a090bcac.zip
parsers: Add FHIR Shorthand (FSH) (#4052)
Diffstat (limited to 'queries')
-rw-r--r--queries/fsh/highlights.scm91
1 files changed, 91 insertions, 0 deletions
diff --git a/queries/fsh/highlights.scm b/queries/fsh/highlights.scm
new file mode 100644
index 000000000..ccc93fc56
--- /dev/null
+++ b/queries/fsh/highlights.scm
@@ -0,0 +1,91 @@
+[
+ "("
+ ")"
+] @punctuation.bracket
+
+[
+ "^"
+ "="
+ ":"
+] @operator
+
+[
+ "#"
+ ".."
+ "*"
+ "->"
+] @punctuation.special
+
+; Entities
+[
+ "Profile"
+ "Alias"
+ "Extension"
+ "Invariant"
+ "Instance"
+ "ValueSet"
+ "CodeSystem"
+ "Mapping"
+ "Logical"
+ "Resource"
+ "RuleSet"
+] @keyword
+
+; Metadata Keywords
+[
+ "Parent"
+ "Title"
+ "Description"
+ "Id"
+ "Severity"
+ "InstanceOf"
+ "Usage"
+ "Source"
+ "XPath"
+ "Target"
+] @keyword
+
+; Rule Keywords
+[
+ "contentReference"
+ "insert"
+ "and"
+ "or"
+ "contains"
+ "named"
+ "only"
+ "obeys"
+ "valueset"
+ "codes"
+ "from"
+ "include"
+ "exclude"
+ "where"
+ "system"
+ "exactly"
+] @keyword.operator
+
+; Types
+[
+ "Reference"
+ "Canonical"
+] @type.builtin
+
+
+(sd_metadata (parent (name))) @type
+(target_type (name)) @type
+
+; Strings
+(string) @string @spell
+(multiline_string) @string @spell
+
+; Constants
+(strength_value) @constant
+(bool) @constant.boolean
+(flag) @constant
+
+; Special Params
+(code_value) @parameter
+
+; Extras
+(fsh_comment) @comment @spell