diff options
| -rw-r--r-- | ftdetect/cooklang.vim | 1 | ||||
| -rw-r--r-- | lua/nvim-treesitter/parsers.lua | 9 | ||||
| -rw-r--r-- | queries/cooklang/highlights.scm | 22 |
3 files changed, 32 insertions, 0 deletions
diff --git a/ftdetect/cooklang.vim b/ftdetect/cooklang.vim new file mode 100644 index 000000000..4f165b94f --- /dev/null +++ b/ftdetect/cooklang.vim @@ -0,0 +1 @@ +autocmd BufRead,BufNewFile *.cook set filetype=cooklang diff --git a/lua/nvim-treesitter/parsers.lua b/lua/nvim-treesitter/parsers.lua index 88bf364a4..5d6c8f75c 100644 --- a/lua/nvim-treesitter/parsers.lua +++ b/lua/nvim-treesitter/parsers.lua @@ -968,6 +968,15 @@ list.solidity = { maintainers = { "@YongJieYongJie" }, } +list.cooklang = { + install_info = { + url = "https://github.com/addcninblue/tree-sitter-cooklang", + branch = "master", + files = { "src/parser.c", "src/scanner.cc" }, + }, + maintainers = { "@addcninblue" }, +} + local M = { list = list, filetype_to_parsername = filetype_to_parsername, diff --git a/queries/cooklang/highlights.scm b/queries/cooklang/highlights.scm new file mode 100644 index 000000000..4ced465bd --- /dev/null +++ b/queries/cooklang/highlights.scm @@ -0,0 +1,22 @@ +(metadata) @comment + +(ingredient + "@" @tag + (name)? @text.title + (amount + (quantity)? @number + (units)? @tag.attribute)?) + +(timer + "~" @tag + (name)? @text.title + (amount + (quantity)? @number + (units)? @tag.attribute)?) + +(cookware + "#" @tag + (name)? @text.title + (amount + (quantity)? @number + (units)? @tag.attribute)?) |
