diff options
| author | Matthew Gramigna <matthewgramigna@gmail.com> | 2023-01-18 09:58:45 -0800 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-01-18 17:58:45 +0000 |
| commit | 622baacdc1b22cdfd73bc98c07bb5654a090bcac (patch) | |
| tree | bc986c4d21174e8247c59eaa47a3e211474ac64f | |
| parent | Update parsers: scala (diff) | |
| download | nvim-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)
| -rw-r--r-- | README.md | 1 | ||||
| -rw-r--r-- | lockfile.json | 3 | ||||
| -rw-r--r-- | lua/nvim-treesitter/parsers.lua | 9 | ||||
| -rw-r--r-- | queries/fsh/highlights.scm | 91 |
4 files changed, 104 insertions, 0 deletions
@@ -208,6 +208,7 @@ We are looking for maintainers to add more parsers and to write query files for - [x] [fish](https://github.com/ram02z/tree-sitter-fish) (maintained by @ram02z) - [x] [foam](https://github.com/FoamScience/tree-sitter-foam) (experimental, maintained by @FoamScience) - [ ] [fortran](https://github.com/stadelmanma/tree-sitter-fortran) +- [x] [fsh](https://github.com/mgramigna/tree-sitter-fsh) (maintained by @mgramigna) - [x] [fusion](https://gitlab.com/jirgn/tree-sitter-fusion.git) (maintained by @jirgn) - [x] [Godot (gdscript)](https://github.com/PrestonKnopp/tree-sitter-gdscript) (maintained by @Shatur) - [x] [git_rebase](https://github.com/the-mikedavis/tree-sitter-git-rebase) (maintained by @gbprod) diff --git a/lockfile.json b/lockfile.json index 49ae62789..3ff1d29f7 100644 --- a/lockfile.json +++ b/lockfile.json @@ -107,6 +107,9 @@ "fortran": { "revision": "edcb3374f4698aaedf24bc572f6b2f5ef0e89ac7" }, + "fsh": { + "revision": "f5b0489d44e588b0d5d77f5c5f50a20491c44441" + }, "fusion": { "revision": "19db2f47ba4c3a0f6238d4ae0e2abfca16e61dd6" }, diff --git a/lua/nvim-treesitter/parsers.lua b/lua/nvim-treesitter/parsers.lua index 96aeac08d..1bf5ea224 100644 --- a/lua/nvim-treesitter/parsers.lua +++ b/lua/nvim-treesitter/parsers.lua @@ -242,6 +242,15 @@ list.rust = { maintainers = { "@vigoux" }, } +list.fsh = { + install_info = { + url = "https://github.com/mgramigna/tree-sitter-fsh", + files = { "src/parser.c" }, + branch = "main", + }, + maintainers = { "@mgramigna" }, +} + list.fusion = { install_info = { url = "https://gitlab.com/jirgn/tree-sitter-fusion.git", 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 |
