nvim-config

Log | Files | Refs | Submodules | README

commit 86b3d117b0c57c9f79bdafb032b93de11056d4d8
parent 8b14ccac26123fd6f32c91fac01364c0d8a2579a
Author: Thomas Vigouroux <tomvig38@gmail.com>
Date:   Sat,  1 May 2021 11:00:28 +0200

fix(tree-sitter): correctly handle vim parser

Diffstat:
Mlua/ts_config.lua | 18++++++++++++------
1 file changed, 12 insertions(+), 6 deletions(-)

diff --git a/lua/ts_config.lua b/lua/ts_config.lua @@ -1,10 +1,16 @@ local parser_config = require "nvim-treesitter.parsers".get_parser_configs() -parser_config.vim = { - install_info = { - url = "~/projects/ts/tree-sitter-viml", -- local path or git repo - files = {"src/parser.c", "src/scanner.c"} - }, -} +if parser_config.vim then + parser_config.vim.install_info.url = "~/projects/ts/tree-sitter-viml" +else + parser_config.vim = { + install_info = { + url = "https://github.com/vigoux/tree-sitter-viml", + files = {"src/parser.c", "src/scanner.c"} + }, + filetype = "vim", + maintainers = { "@vigoux" }, + } +end require'nvim-treesitter.configs'.setup { highlight = {