diff options
| author | ObserverOfTime <chronobserver@disroot.org> | 2023-08-15 21:36:44 +0300 |
|---|---|---|
| committer | ObserverOfTime <chronobserver@disroot.org> | 2023-08-17 11:24:41 +0300 |
| commit | f7bb866405530e863135596900781e73cbf6f4ed (patch) | |
| tree | d11cb48b547bcef225e92016000e9963bcd94c90 | |
| parent | Update README (diff) | |
| download | nvim-treesitter-f7bb866405530e863135596900781e73cbf6f4ed.tar nvim-treesitter-f7bb866405530e863135596900781e73cbf6f4ed.tar.gz nvim-treesitter-f7bb866405530e863135596900781e73cbf6f4ed.tar.bz2 nvim-treesitter-f7bb866405530e863135596900781e73cbf6f4ed.tar.lz nvim-treesitter-f7bb866405530e863135596900781e73cbf6f4ed.tar.xz nvim-treesitter-f7bb866405530e863135596900781e73cbf6f4ed.tar.zst nvim-treesitter-f7bb866405530e863135596900781e73cbf6f4ed.zip | |
feat: add gpg config parser
| -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/gpg/highlights.scm | 49 | ||||
| -rw-r--r-- | queries/gpg/injections.scm | 2 |
5 files changed, 63 insertions, 0 deletions
@@ -238,6 +238,7 @@ We are looking for maintainers to add more parsers and to write query files for - [x] [gomod](https://github.com/camdencheek/tree-sitter-go-mod) (maintained by @camdencheek) - [x] [gosum](https://github.com/amaanq/tree-sitter-go-sum) (maintained by @amaanq) - [x] [gowork](https://github.com/omertuc/tree-sitter-go-work) (maintained by @omertuc) +- [x] [gpg](https://github.com/ObserverOfTime/tree-sitter-gpg-config) (maintained by @ObserverOfTime) - [x] [graphql](https://github.com/bkegley/tree-sitter-graphql) (maintained by @bkegley) - [x] [groovy](https://github.com/Decodetalkers/tree-sitter-groovy) (maintained by @Decodetalkers) - [ ] [hack](https://github.com/slackhq/tree-sitter-hack) diff --git a/lockfile.json b/lockfile.json index 15c0298ec..14923f000 100644 --- a/lockfile.json +++ b/lockfile.json @@ -194,6 +194,9 @@ "gowork": { "revision": "949a8a470559543857a62102c84700d291fc984c" }, + "gpg": { + "revision": "af97733568c8141090d8a79dfff66806c96c2cc0" + }, "graphql": { "revision": "5e66e961eee421786bdda8495ed1db045e06b5fe" }, diff --git a/lua/nvim-treesitter/parsers.lua b/lua/nvim-treesitter/parsers.lua index 6bb88ac06..b40113a38 100644 --- a/lua/nvim-treesitter/parsers.lua +++ b/lua/nvim-treesitter/parsers.lua @@ -623,6 +623,14 @@ list.gowork = { maintainers = { "@omertuc" }, } +list.gpg = { + install_info = { + url = "https://github.com/ObserverOfTime/tree-sitter-gpg-config", + files = { "src/parser.c" }, + }, + maintainers = { "@ObserverOfTime" }, +} + list.groovy = { install_info = { url = "https://github.com/Decodetalkers/tree-sitter-groovy", diff --git a/queries/gpg/highlights.scm b/queries/gpg/highlights.scm new file mode 100644 index 000000000..55833027e --- /dev/null +++ b/queries/gpg/highlights.scm @@ -0,0 +1,49 @@ +(option . _ @keyword) + +(option + ("no-" @parameter)? + (name) @parameter) + +(string (content) @string) + +[ + (value) + "clear" +] @string.special + +(url) @text.uri + +(key) @constant + +[ + (number) + (expire_time) + (iso_time) +] @number + +(format) @character.special + +"sensitive:" @type.qualifier + +(filter_name) @parameter + +(filter_scope) @namespace + +(filter_property) @property + +(filter_value) @string + +[ + (filter_op0) + (filter_op1) + (filter_lc) + "=" +] @operator + +"!" @punctuation.special + +[ "\"" "'" "," ] @punctuation.delimiter + +(comment) @comment @spell + +(ERROR) @error diff --git a/queries/gpg/injections.scm b/queries/gpg/injections.scm new file mode 100644 index 000000000..321c90add --- /dev/null +++ b/queries/gpg/injections.scm @@ -0,0 +1,2 @@ +((comment) @injection.content + (#set! injection.language "comment")) |
