From 66d35f9357a55f7480ae472e22543d4b70c2bd55 Mon Sep 17 00:00:00 2001 From: li <@li:maisiliym.uniks> Date: Sun, 6 Dec 2020 03:48:31 +0000 Subject: fix: find parsers correctly Explicitely installed parsers will not be found implicitely --- lua/nvim-treesitter/parsers.lua | 2 ++ 1 file changed, 2 insertions(+) (limited to 'lua') diff --git a/lua/nvim-treesitter/parsers.lua b/lua/nvim-treesitter/parsers.lua index 5fe0d0cb..e43d2ff0 100644 --- a/lua/nvim-treesitter/parsers.lua +++ b/lua/nvim-treesitter/parsers.lua @@ -407,6 +407,8 @@ function M.has_parser(lang) local lang = lang or M.get_buf_lang(api.nvim_get_current_buf()) if not lang or #lang == 0 then return false end + -- HACK: nvim internal API + if vim._ts_has_language(lang) then return true end return #parser_files[lang] > 0 end -- cgit v1.2.3