35 lines
756 B
Lua
35 lines
756 B
Lua
local now_if_args = vim.fn.argc(-1) > 0 and MiniDeps.now or MiniDeps.later
|
|
|
|
now_if_args(function()
|
|
MiniDeps.add({
|
|
source = "nvim-treesitter/nvim-treesitter",
|
|
checkout = "main",
|
|
hooks = { post_checkout = function() vim.cmd("TSUpdate") end },
|
|
})
|
|
|
|
require("nvim-treesitter").install({
|
|
"bash",
|
|
"c",
|
|
"cpp",
|
|
"css",
|
|
"diff",
|
|
"go",
|
|
"html",
|
|
"javascript",
|
|
"json",
|
|
"python",
|
|
"regex",
|
|
"rust",
|
|
"toml",
|
|
"tsx",
|
|
"yaml",
|
|
"lua",
|
|
"luadoc",
|
|
"gitcommit",
|
|
})
|
|
|
|
vim.api.nvim_create_autocmd("FileType", {
|
|
callback = function(args) pcall(vim.treesitter.start, args.buf) end,
|
|
})
|
|
end)
|