diff options
| -rw-r--r-- | README.md | 1 | ||||
| -rw-r--r-- | lockfile.json | 3 | ||||
| -rw-r--r-- | lua/nvim-treesitter/parsers.lua | 8 | ||||
| -rw-r--r-- | queries/xcompose/highlights.scm | 20 | ||||
| -rw-r--r-- | queries/xcompose/injections.scm | 2 |
5 files changed, 34 insertions, 0 deletions
@@ -406,6 +406,7 @@ We are looking for maintainers to add more parsers and to write query files for - [x] [wgsl](https://github.com/szebniok/tree-sitter-wgsl) (maintained by @szebniok) - [x] [wgsl_bevy](https://github.com/theHamsta/tree-sitter-wgsl-bevy) (maintained by @theHamsta) - [x] [wing](https://github.com/winglang/wing) (experimental, maintained by @gshpychka) +- [x] [xcompose](https://github.com/ObserverOfTime/tree-sitter-xcompose) (maintained by @ObserverOfTime) - [x] [xml](https://github.com/ObserverOfTime/tree-sitter-xml) (maintained by @ObserverOfTime) - [x] [yaml](https://github.com/ikatyang/tree-sitter-yaml) (maintained by @stsewd) - [x] [yang](https://github.com/Hubro/tree-sitter-yang) (maintained by @Hubro) diff --git a/lockfile.json b/lockfile.json index 1cf2a030f..19971be49 100644 --- a/lockfile.json +++ b/lockfile.json @@ -698,6 +698,9 @@ "wing": { "revision": "a30e8eca90b7a7deb3a85503dbdd172a68ba0e05" }, + "xcompose": { + "revision": "01344fed31a3cd37a63f03357ec80cbc592a93b5" + }, "xml": { "revision": "a3bfa1ae7e8400ab81a6358f5e8d2983f5dd0697" }, diff --git a/lua/nvim-treesitter/parsers.lua b/lua/nvim-treesitter/parsers.lua index 2671a7ae7..40491c7ff 100644 --- a/lua/nvim-treesitter/parsers.lua +++ b/lua/nvim-treesitter/parsers.lua @@ -2046,6 +2046,14 @@ list.wing = { experimental = true, } +list.xcompose = { + install_info = { + url = "https://github.com/ObserverOfTime/tree-sitter-xcompose", + files = { "src/parser.c" }, + }, + maintainers = { "@ObserverOfTime" }, +} + list.xml = { install_info = { url = "https://github.com/ObserverOfTime/tree-sitter-xml", diff --git a/queries/xcompose/highlights.scm b/queries/xcompose/highlights.scm new file mode 100644 index 000000000..48366985d --- /dev/null +++ b/queries/xcompose/highlights.scm @@ -0,0 +1,20 @@ +(keysym) @constant + +((keysym) @constant.builtin + (#eq? @constant.builtin "Multi_key")) + +(text) @string + +"include" @include + +[ (octal) (hex) ] @number + +[ (modifier) "None" ] @type.qualifier + +[ "%L" "%H" "%S" ] @string.special + +[ "!" "~" ] @operator + +[ ":" "<" ">" "\"" ] @punctuation.delimiter + +(comment) @comment @spell diff --git a/queries/xcompose/injections.scm b/queries/xcompose/injections.scm new file mode 100644 index 000000000..321c90add --- /dev/null +++ b/queries/xcompose/injections.scm @@ -0,0 +1,2 @@ +((comment) @injection.content + (#set! injection.language "comment")) |
