mirror of
https://github.com/nvim-treesitter/nvim-treesitter.git
synced 2026-07-04 04:20:09 -04:00
fix: find parsers correctly
Explicitely installed parsers will not be found implicitely
This commit is contained in:
parent
b090476aa4
commit
66d35f9357
1 changed files with 2 additions and 0 deletions
|
|
@ -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
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue