migrate to new treesitter
This commit is contained in:
@ -3,9 +3,11 @@ return {
|
||||
"nvim-treesitter/nvim-treesitter",
|
||||
build = ":TSUpdate",
|
||||
lazy = false,
|
||||
branch = 'main',
|
||||
-- init = function(plugin)
|
||||
-- require("nvim-treesitter")
|
||||
-- end,
|
||||
-- TODO: old options format, need to reconfigure
|
||||
opts = {
|
||||
ensure_installed = { "python", "rust", "javascript" }, -- one of "all" or a list of languages
|
||||
ignore_install = { "phpdoc", "comment", "rst" }, -- List of parsers to ignore installing
|
||||
@ -35,7 +37,12 @@ return {
|
||||
},
|
||||
},
|
||||
config = function(_, opts)
|
||||
require("nvim-treesitter.configs").setup(opts)
|
||||
-- enable treesitter highlighting
|
||||
vim.api.nvim_create_autocmd("FileType", {
|
||||
callback = function(args)
|
||||
pcall(vim.treesitter.start, args.buf)
|
||||
end,
|
||||
})
|
||||
end
|
||||
},
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user