my dotfiles for arch
at main 39 lines 776 B view raw
1return { 2 -- Highlight, edit, and navigate code 3 "nvim-treesitter/nvim-treesitter", 4 lazy = false, 5 build = ":TSUpdate", 6 config = function() 7 require("nvim-treesitter").setup({ 8 install_dir = vim.fn.stdpath("data") .. "/site", 9 }) 10 11 -- Install parsers (async, no-op if already installed) 12 require("nvim-treesitter").install({ 13 "vimdoc", 14 "javascript", 15 "typescript", 16 "tsx", 17 "ripple", 18 "c", 19 "lua", 20 "rust", 21 "jsdoc", 22 "bash", 23 "svelte", 24 "astro", 25 "vue", 26 "css", 27 "scss", 28 "gdscript", 29 }) 30 31 -- Enable treesitter highlighting and indentation 32 vim.api.nvim_create_autocmd("FileType", { 33 callback = function() 34 pcall(vim.treesitter.start) 35 vim.bo.indentexpr = "v:lua.require'nvim-treesitter'.indentexpr()" 36 end, 37 }) 38 end, 39}