From d8a695a1ac493096e6f7a0916a962b979d290039 Mon Sep 17 00:00:00 2001 From: gbprod Date: Mon, 19 Sep 2022 17:18:19 +0200 Subject: Introduce twig parser This commit introduce parser, highlights and injections for the [twig syntax](https://twig.symfony.com) --- lua/nvim-treesitter/parsers.lua | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) (limited to 'lua') diff --git a/lua/nvim-treesitter/parsers.lua b/lua/nvim-treesitter/parsers.lua index db8ea2c98..a19fcee87 100644 --- a/lua/nvim-treesitter/parsers.lua +++ b/lua/nvim-treesitter/parsers.lua @@ -1233,6 +1233,16 @@ list.blueprint = { experimental = true, } +list.twig = { + install_info = { + url = "https://github.com/gbprod/tree-sitter-twig", + branch = "main", + files = { "src/parser.c" }, + }, + maintainers = { "@gbprod" }, + filetype = "twig", +} + local M = { list = list, filetype_to_parsername = filetype_to_parsername, @@ -1249,7 +1259,7 @@ function M.ft_to_lang(ft) end function M.available_parsers() - if vim.fn.executable "tree-sitter" == 1 and vim.fn.executable "node" == 1 then + if vim.fn.executable("tree-sitter") == 1 and vim.fn.executable("node") == 1 then return vim.tbl_keys(M.list) else return vim.tbl_filter(function(p) -- cgit v1.2.3-70-g09d2