Guest User

Untitled

a guest
Aug 29th, 2025
62
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.64 KB | None | 0 0
  1. -- in init.lua:
  2.  
  3. vim.pack.add({
  4.   { src = "https://github.com/nvim-treesitter/nvim-treesitter", version = "main" },
  5.   -- my other plugins, including TS related plugins like
  6.   -- nvim-treesitter-context, Wansmer/sibling-sawp.nvim, Wansmer/treesj
  7. })
  8.  
  9. -- in after/plugin/treesitter.lua
  10.  
  11. -- Directory to install parsers and queries to
  12. require("nvim-treesitter").setup({
  13.   install_dir = vim.fn.stdpath("data") .. "/site",
  14. })
  15.  
  16. local langs = {
  17.   -- list of languages
  18. }
  19.  
  20. require("nvim-treesitter").install(langs)
  21.  
  22. vim.api.nvim_create_autocmd("FileType", {
  23.   pattern = langs,
  24.   callback = function()
  25.     vim.treesitter.start()
  26.   end,
  27. })
Advertisement
Add Comment
Please, Sign In to add comment