From 3fe80dbecdf1fa88cf81a4d7b30ab0714f8c443a Mon Sep 17 00:00:00 2001 From: Amaan Qureshi Date: Mon, 27 Feb 2023 21:18:00 -0500 Subject: [PATCH] feat: add passwd --- README.md | 1 + lockfile.json | 3 +++ lua/nvim-treesitter/parsers.lua | 8 ++++++++ queries/passwd/highlights.scm | 16 ++++++++++++++++ 4 files changed, 28 insertions(+) create mode 100644 queries/passwd/highlights.scm diff --git a/README.md b/README.md index c677cc261..bb93e4d9f 100644 --- a/README.md +++ b/README.md @@ -277,6 +277,7 @@ We are looking for maintainers to add more parsers and to write query files for - [x] [ocamllex](https://github.com/atom-ocaml/tree-sitter-ocamllex) (maintained by @undu) - [ ] [org](https://github.com/milisims/tree-sitter-org) - [x] [pascal](https://github.com/Isopod/tree-sitter-pascal.git) (maintained by @Isopod) +- [x] [passwd](https://github.com/ath3/tree-sitter-passwd) (maintained by @amaanq) - [x] [perl](https://github.com/ganezdragon/tree-sitter-perl) (maintained by @lcrownover) - [x] [php](https://github.com/tree-sitter/tree-sitter-php) (maintained by @tk-shirasaka) - [x] [phpdoc](https://github.com/claytonrcarter/tree-sitter-phpdoc) (experimental, maintained by @mikehaertl) diff --git a/lockfile.json b/lockfile.json index f2e36d625..d8736f659 100644 --- a/lockfile.json +++ b/lockfile.json @@ -311,6 +311,9 @@ "pascal": { "revision": "9e995404ddff8319631d72d4b46552e737206912" }, + "passwd": { + "revision": "20239395eacdc2e0923a7e5683ad3605aee7b716" + }, "perl": { "revision": "c43bae0090cfcfc62d9904312599ded1b645a66d" }, diff --git a/lua/nvim-treesitter/parsers.lua b/lua/nvim-treesitter/parsers.lua index 2719194bc..2c8956f67 100644 --- a/lua/nvim-treesitter/parsers.lua +++ b/lua/nvim-treesitter/parsers.lua @@ -1003,6 +1003,14 @@ list.pascal = { maintainers = { "@Isopod" }, } +list.passwd = { + install_info = { + url = "https://github.com/ath3/tree-sitter-passwd", + files = { "src/parser.c" }, + }, + maintainers = { "@amaanq" }, +} + list.perl = { install_info = { url = "https://github.com/ganezdragon/tree-sitter-perl", diff --git a/queries/passwd/highlights.scm b/queries/passwd/highlights.scm new file mode 100644 index 000000000..3e078a123 --- /dev/null +++ b/queries/passwd/highlights.scm @@ -0,0 +1,16 @@ +(user) @namespace + +(auth) @symbol + +(gecos) @string + +(home) @text.uri @constant + +(shell) @text.uri @string.special + +[ + (gid) + (uid) +] @number + +(separator) @punctuation.delimiter