aboutsummaryrefslogtreecommitdiff
path: root/.config/nvim/lua/plugins/nvim-treesitter.lua
diff options
context:
space:
mode:
Diffstat (limited to '.config/nvim/lua/plugins/nvim-treesitter.lua')
-rw-r--r--.config/nvim/lua/plugins/nvim-treesitter.lua52
1 files changed, 52 insertions, 0 deletions
diff --git a/.config/nvim/lua/plugins/nvim-treesitter.lua b/.config/nvim/lua/plugins/nvim-treesitter.lua
new file mode 100644
index 0000000..d6b09b6
--- /dev/null
+++ b/.config/nvim/lua/plugins/nvim-treesitter.lua
@@ -0,0 +1,52 @@
+local config = function()
+ require("nvim-treesitter.configs").setup({
+ build = ":TSUpdate",
+ indent = {
+ enable = true,
+ },
+ autotag = {
+ enable = true,
+ },
+ event = {
+ "BufReadPre",
+ "BufNewFile",
+ },
+ ensure_installed = {
+ "markdown",
+ "json",
+ "javascript",
+ "typescript",
+ "yaml",
+ "html",
+ "css",
+ "markdown",
+ "bash",
+ "lua",
+ "dockerfile",
+ "solidity",
+ "gitignore",
+ "python",
+ "vue",
+ },
+ auto_install = true,
+ highlight = {
+ enable = true,
+ additional_vim_regex_highlighting = true,
+ },
+ incremental_selection = {
+ enable = true,
+ keymaps = {
+ init_selection = "<C-s>",
+ node_incremental = "<C-s>",
+ scope_incremental = false,
+ node_decremental = "<BS>",
+ },
+ },
+ })
+end
+
+return {
+ "nvim-treesitter/nvim-treesitter",
+ lazy = false,
+ config = config,
+}