aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--neovim/.config/nvim/lua/plugins/autopairs.lua23
-rw-r--r--neovim/.config/nvim/lua/plugins/treesitter.lua35
2 files changed, 58 insertions, 0 deletions
diff --git a/neovim/.config/nvim/lua/plugins/autopairs.lua b/neovim/.config/nvim/lua/plugins/autopairs.lua
new file mode 100644
index 0000000..877e570
--- /dev/null
+++ b/neovim/.config/nvim/lua/plugins/autopairs.lua
@@ -0,0 +1,23 @@
1return {
2 {
3 "windwp/nvim-autopairs",
4 event = "InsertEnter",
5 opts = {},
6 },
7 {
8 "windwp/nvim-ts-autotag",
9 ft = {
10 "html",
11 "xml",
12 "javascript",
13 "javascriptreact",
14 "typescript",
15 "typescriptreact",
16 "vue",
17 "svelte",
18 "php",
19 },
20 dependencies = { "nvim-treesitter/nvim-treesitter" },
21 opts = {},
22 },
23}
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}