aboutsummaryrefslogtreecommitdiffstats
path: root/neovim/.config/nvim/lua/plugins/treesitter.lua
diff options
context:
space:
mode:
Diffstat (limited to 'neovim/.config/nvim/lua/plugins/treesitter.lua')
-rw-r--r--neovim/.config/nvim/lua/plugins/treesitter.lua35
1 files changed, 35 insertions, 0 deletions
diff --git a/neovim/.config/nvim/lua/plugins/treesitter.lua b/neovim/.config/nvim/lua/plugins/treesitter.lua
new file mode 100644
index 0000000..875500f
--- /dev/null
+++ b/neovim/.config/nvim/lua/plugins/treesitter.lua
@@ -0,0 +1,35 @@
1return {
2 "nvim-treesitter/nvim-treesitter",
3 branch = "main",
4 build = ":TSUpdate",
5 config = function()
6 require("nvim-treesitter").install({
7 "lua",
8 "vim",
9 "vimdoc",
10 "query",
11 "python",
12 "bash",
13 "yaml",
14 "hcl",
15 "terraform",
16 "html",
17 "css",
18 "javascript",
19 "typescript",
20 "tsx",
21 "json",
22 "markdown",
23 "markdown_inline",
24 })
25
26 -- Enable highlighting for any buffer whose filetype has an installed
27 -- parser; vim.treesitter.start() is a no-op (caught by pcall) otherwise.
28 vim.api.nvim_create_autocmd("FileType", {
29 pattern = "*",
30 callback = function()
31 pcall(vim.treesitter.start)
32 end,
33 })
34 end,
35}