Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- -- in init.lua:
- vim.pack.add({
- { src = "https://github.com/nvim-treesitter/nvim-treesitter", version = "main" },
- -- my other plugins, including TS related plugins like
- -- nvim-treesitter-context, Wansmer/sibling-sawp.nvim, Wansmer/treesj
- })
- -- in after/plugin/treesitter.lua
- -- Directory to install parsers and queries to
- require("nvim-treesitter").setup({
- install_dir = vim.fn.stdpath("data") .. "/site",
- })
- local langs = {
- -- list of languages
- }
- require("nvim-treesitter").install(langs)
- vim.api.nvim_create_autocmd("FileType", {
- pattern = langs,
- callback = function()
- vim.treesitter.start()
- end,
- })
Advertisement
Add Comment
Please, Sign In to add comment