diff options
| author | Carlos Alexandro Becker <caarlos0@users.noreply.github.com> | 2022-11-13 08:33:54 -0300 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-11-13 12:33:54 +0100 |
| commit | eff0d43b49f17a3d5a12d9112f439abf4ca249cd (patch) | |
| tree | 9e068c9ab19c8dad1168ca81c33236f161ed9ae7 | |
| parent | Update lockfile.json (diff) | |
| download | nvim-treesitter-eff0d43b49f17a3d5a12d9112f439abf4ca249cd.tar nvim-treesitter-eff0d43b49f17a3d5a12d9112f439abf4ca249cd.tar.gz nvim-treesitter-eff0d43b49f17a3d5a12d9112f439abf4ca249cd.tar.bz2 nvim-treesitter-eff0d43b49f17a3d5a12d9112f439abf4ca249cd.tar.lz nvim-treesitter-eff0d43b49f17a3d5a12d9112f439abf4ca249cd.tar.xz nvim-treesitter-eff0d43b49f17a3d5a12d9112f439abf4ca249cd.tar.zst nvim-treesitter-eff0d43b49f17a3d5a12d9112f439abf4ca249cd.zip | |
feat: vhs (.tape) support (#3726)
| -rw-r--r-- | README.md | 1 | ||||
| -rw-r--r-- | lockfile.json | 3 | ||||
| -rw-r--r-- | lua/nvim-treesitter/parsers.lua | 11 | ||||
| -rw-r--r-- | queries/vhs/highlights.scm | 38 |
4 files changed, 53 insertions, 0 deletions
@@ -302,6 +302,7 @@ We are looking for maintainers to add more parsers and to write query files for - [x] [verilog](https://github.com/tree-sitter/tree-sitter-verilog) (maintained by @zegervdv) - [x] [vim](https://github.com/vigoux/tree-sitter-viml) (maintained by @vigoux) - [x] [vue](https://github.com/ikatyang/tree-sitter-vue) (maintained by @WhyNotHugo) +- [x] [vhs](https://github.com/charmbracelet/tree-sitter-vhs) (maintained by @caarlos0, @maaslalani) - [x] [wgsl](https://github.com/szebniok/tree-sitter-wgsl) (maintained by @szebniok) - [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 f6e85003a..a760414ac 100644 --- a/lockfile.json +++ b/lockfile.json @@ -383,6 +383,9 @@ "verilog": { "revision": "4457145e795b363f072463e697dfe2f6973c9a52" }, + "vhs": { + "revision": "3ca6b9603422a1311e7c9eb85d30cd5bf6e5dc74" + }, "vim": { "revision": "4ae7bd67706d7e10afed827ce2ded884ab41650f" }, diff --git a/lua/nvim-treesitter/parsers.lua b/lua/nvim-treesitter/parsers.lua index 8fe4225e0..6d444cde1 100644 --- a/lua/nvim-treesitter/parsers.lua +++ b/lua/nvim-treesitter/parsers.lua @@ -18,6 +18,7 @@ local filetype_to_parsername = { pandoc = "markdown", rmd = "markdown", cs = "c_sharp", + tape = "vhs", } ---@class InstallInfo @@ -1282,6 +1283,16 @@ list.diff = { filetype = "gitdiff", } +list.vhs = { + install_info = { + url = "https://github.com/charmbracelet/tree-sitter-vhs", + branch = "main", + files = { "src/parser.c" }, + }, + maintainers = { "@caarlos0", "@maaslalani" }, + filetype = "tape", +} + local M = { list = list, filetype_to_parsername = filetype_to_parsername, diff --git a/queries/vhs/highlights.scm b/queries/vhs/highlights.scm new file mode 100644 index 000000000..67fa3cf8a --- /dev/null +++ b/queries/vhs/highlights.scm @@ -0,0 +1,38 @@ +[ + "Output" + "Backspace" + "Down" + "Enter" + "Escape" + "Left" + "Right" + "Space" + "Tab" + "Up" + "Set" + "Type" + "Sleep" + "Hide" + "Show" ] @keyword + +[ "Shell" + "FontFamily" + "FontSize" + "Framerate" + "PlaybackSpeed" + "Height" + "LetterSpacing" + "TypingSpeed" + "LineHeight" + "Padding" + "Theme" + "LoopOffset" + "Width" ] @type + +[ "@" ] @operator +(control) @function.macro +(float) @float +(integer) @number +(comment) @comment @spell +[(path) (string) (json)] @string +(time) @symbol |
