diff --git a/init.lua b/init.lua index e81794dc..ada6ee44 100644 --- a/init.lua +++ b/init.lua @@ -956,11 +956,26 @@ require('lazy').setup({ }, { -- Highlight, edit, and navigate code 'nvim-treesitter/nvim-treesitter', + build = ':TSUpdate', opts = { - ensure_installed = { 'bash', 'c', 'html', 'lua', 'luadoc', 'markdown', 'vim', 'vimdoc' }, + ensure_installed = { + 'bash', + 'c', + 'html', + 'lua', + 'luadoc', + 'javascript', + 'tsx', + 'typescript', + 'python', + 'markdown', + 'vim', + 'vimdoc', + }, -- Autoinstall languages that are not installed auto_install = true, + --autotag = { enable = true }, highlight = { enable = true, -- Some languages depend on vim's regex highlighting system (such as Ruby) for indent rules. @@ -970,6 +985,13 @@ require('lazy').setup({ }, indent = { enable = true, disable = { 'ruby' } }, }, + dependencies = { + { + 'windwp/nvim-ts-autotag', + + opts = { enable_close_on_slash = true, filetypes = { 'html', 'javascript', 'javascriptreact', 'typescript', 'typescriptreact', 'vue', 'xml' } }, + }, + }, config = function(_, opts) -- [[ Configure Treesitter ]] See `:help nvim-treesitter`