Public Access
fixed treesitter auto install
This commit is contained in:
@@ -68,8 +68,11 @@ vim.api.nvim_create_autocmd("FileType", {
|
||||
callback = function()
|
||||
local lang = vim.treesitter.language.get_lang(vim.bo.filetype)
|
||||
if lang and not pcall(vim.treesitter.language.inspect, lang) then
|
||||
local ok, list = pcall(require("nvim-treesitter").language_list)
|
||||
if ok and vim.list_contains(list, lang) then
|
||||
require("nvim-treesitter").install(lang)
|
||||
end
|
||||
end
|
||||
pcall(vim.treesitter.start)
|
||||
end,
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user