diff options
| author | li <@li:maisiliym.uniks> | 2020-12-06 03:48:31 +0000 |
|---|---|---|
| committer | Thomas Vigouroux <tomvig38@gmail.com> | 2020-12-09 08:46:59 +0100 |
| commit | 66d35f9357a55f7480ae472e22543d4b70c2bd55 (patch) | |
| tree | 456a9a6578c37f569f89202a6bc9a728e83772bd /lua | |
| parent | Update ruby parser (diff) | |
| download | nvim-treesitter-66d35f9357a55f7480ae472e22543d4b70c2bd55.tar nvim-treesitter-66d35f9357a55f7480ae472e22543d4b70c2bd55.tar.gz nvim-treesitter-66d35f9357a55f7480ae472e22543d4b70c2bd55.tar.bz2 nvim-treesitter-66d35f9357a55f7480ae472e22543d4b70c2bd55.tar.lz nvim-treesitter-66d35f9357a55f7480ae472e22543d4b70c2bd55.tar.xz nvim-treesitter-66d35f9357a55f7480ae472e22543d4b70c2bd55.tar.zst nvim-treesitter-66d35f9357a55f7480ae472e22543d4b70c2bd55.zip | |
fix: find parsers correctly
Explicitely installed parsers will not be found implicitely
Diffstat (limited to 'lua')
| -rw-r--r-- | lua/nvim-treesitter/parsers.lua | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/lua/nvim-treesitter/parsers.lua b/lua/nvim-treesitter/parsers.lua index 5fe0d0cb7..e43d2ff04 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 |
