60c0aadc20ce713f28fe5f8962834c54c80027f3

Author
TheEdgeOfRage <git@theedgeofrage.com>
Committer
TheEdgeOfRage <git@theedgeofrage.com>
Date

Message

Add auto-install plugin for treesitter

Diff

 1diff --git a/dot_config/nvim/lua/plugins/treesitter.lua b/dot_config/nvim/lua/plugins/treesitter.lua
 2index 3c9ced4958ee18aae49492a8a85cc374a18248d9..af5835eca217a314d6c9796b4b73ef545edac730 100644
 3--- a/dot_config/nvim/lua/plugins/treesitter.lua
 4+++ b/dot_config/nvim/lua/plugins/treesitter.lua
 5@@ -1,28 +1,35 @@
 6 return {
 7 	{
 8 		"nvim-treesitter/nvim-treesitter",
 9+		branch = "main",
10 		lazy = false,
11 		build = ":TSUpdate",
12+	},
13+	{
14+		"lewis6991/ts-install.nvim",
15+		dependencies = "nvim-treesitter/nvim-treesitter",
16 		config = function()
17-			vim.treesitter.start()
18-			require("nvim-treesitter").install({
19-				"bash",
20-				"css",
21-				"go",
22-				"html",
23-				"javascript",
24-				"json",
25-				"lua",
26-				"luadoc",
27-				"luap",
28-				"markdown",
29-				"markdown_inline",
30-				"python",
31-				"regex",
32-				"rust",
33-				"templ",
34-				"typescript",
35-				"yaml",
36+			require("ts-install").setup({
37+				auto_install = true,
38+				ensure_install = {
39+					"bash",
40+					"css",
41+					"go",
42+					"html",
43+					"javascript",
44+					"json",
45+					"lua",
46+					"luadoc",
47+					"luap",
48+					"markdown",
49+					"markdown_inline",
50+					"python",
51+					"regex",
52+					"rust",
53+					"templ",
54+					"typescript",
55+					"yaml",
56+				},
57 			})
58 		end,
59 	},