Public Access
added treesitter auto install
This commit is contained in:
+7
-1
@@ -65,7 +65,13 @@ require("nvim-treesitter").install({
|
|||||||
})
|
})
|
||||||
|
|
||||||
vim.api.nvim_create_autocmd("FileType", {
|
vim.api.nvim_create_autocmd("FileType", {
|
||||||
callback = function() pcall(vim.treesitter.start) end,
|
callback = function()
|
||||||
|
local lang = vim.treesitter.language.get_lang(vim.bo.filetype)
|
||||||
|
if lang and not pcall(vim.treesitter.language.inspect, lang) then
|
||||||
|
require("nvim-treesitter").install(lang)
|
||||||
|
end
|
||||||
|
pcall(vim.treesitter.start)
|
||||||
|
end,
|
||||||
})
|
})
|
||||||
|
|
||||||
-- TS textobjects
|
-- TS textobjects
|
||||||
|
|||||||
Reference in New Issue
Block a user