From db10325c977249dfd096c9169fa06e479fee1943 Mon Sep 17 00:00:00 2001 From: pro100ton Date: Fri, 31 Jan 2025 22:58:20 +0300 Subject: [PATCH] Add treesitter plugin --- lua/custom/plugins/treesitter.lua | 14 ++++++++++++++ lua/custom/treesitter.lua | 17 +++++++++++++++++ 2 files changed, 31 insertions(+) create mode 100644 lua/custom/plugins/treesitter.lua create mode 100644 lua/custom/treesitter.lua diff --git a/lua/custom/plugins/treesitter.lua b/lua/custom/plugins/treesitter.lua new file mode 100644 index 0000000..2b2979a --- /dev/null +++ b/lua/custom/plugins/treesitter.lua @@ -0,0 +1,14 @@ +return { + "nvim-treesitter/nvim-treesitter", + -- open this plugin on two events: + -- BufReadPre - open existing file + -- BufNewFile - open new file + event = { "BufReadPre", "BufNewFile" }, + build = ":TSUpdate", -- Run whenever this plugin is installed or updated + dependencies = { + "windwp/nvim-ts-autotag", -- Auto-closing functionality within treesitter + }, + config = function() + require "custom/treesitter" + end, +} diff --git a/lua/custom/treesitter.lua b/lua/custom/treesitter.lua new file mode 100644 index 0000000..1d65998 --- /dev/null +++ b/lua/custom/treesitter.lua @@ -0,0 +1,17 @@ +require'nvim-treesitter.configs'.setup { + ensure_installed = { + "python", + "lua", + "vim", + "vimdoc", + "query", + "elixir", + "heex", + "javascript", + "html", + "go" + }, + sync_install = false, + highlight = { enable = true }, + indent = { enable = true }, +}