Adding autoclosing of html tags in tsx files
This commit is contained in:
parent
f84ddbaf8e
commit
84120d10e8
|
|
@ -28,6 +28,7 @@
|
|||
"nvim-notify": { "branch": "master", "commit": "8701bece920b38ea289b457f902e2ad184131a5d" },
|
||||
"nvim-treesitter": { "branch": "main", "commit": "5cb05e1b0fa3c469958a2b26f36b3fe930af221c" },
|
||||
"nvim-treesitter-textobjects": { "branch": "main", "commit": "4e91b5d0394329a229725b021a8ea217099826ef" },
|
||||
"nvim-ts-autotag": { "branch": "main", "commit": "8e1c0a389f20bf7f5b0dd0e00306c1247bda2595" },
|
||||
"nvim-web-devicons": { "branch": "master", "commit": "737cf6c657898d0c697311d79d361288a1343d50" },
|
||||
"oil.nvim": { "branch": "master", "commit": "0fcc83805ad11cf714a949c98c605ed717e0b83e" },
|
||||
"plenary.nvim": { "branch": "master", "commit": "b9fd5226c2f76c951fc8ed5923d85e4de065e509" },
|
||||
|
|
|
|||
|
|
@ -0,0 +1,13 @@
|
|||
return {
|
||||
'windwp/nvim-ts-autotag',
|
||||
-- event = { 'BufReadPre', 'BufNewFile' },
|
||||
opts = {
|
||||
-- Defaults
|
||||
-- enable_close = true, -- Auto close tags
|
||||
-- enable_rename = true, -- Auto rename pairs of tags
|
||||
-- enable_close_on_slash = false, -- Auto close on trailing </
|
||||
},
|
||||
-- config = function(_, opts)
|
||||
-- require('nvim-ts-autotag').setup(opts)
|
||||
-- end,
|
||||
}
|
||||
|
|
@ -5,6 +5,15 @@ return {
|
|||
branch = 'main',
|
||||
build = ':TSUpdate',
|
||||
opts = {},
|
||||
-- dependencies = {
|
||||
-- 'windwp/nvim-ts-autotag', -- auto close tsx tags
|
||||
-- },
|
||||
-- opts = {
|
||||
-- autotag = {
|
||||
-- -- Setup autotag using treesitter config.
|
||||
-- enable = true,
|
||||
-- },
|
||||
-- },
|
||||
-- main = 'nvim-treesitter.configs', -- Sets main module to use for opts
|
||||
-- [[ Configure Treesitter ]] See `:help nvim-treesitter`
|
||||
config = function(_, opts)
|
||||
|
|
@ -28,6 +37,7 @@ return {
|
|||
'yaml',
|
||||
'ecma',
|
||||
'typescript',
|
||||
'tsx',
|
||||
}
|
||||
local alreadyInstalled = require('nvim-treesitter').get_installed 'parsers'
|
||||
local parsersToInstall = vim
|
||||
|
|
|
|||
|
|
@ -64,6 +64,7 @@ require('lazy').setup({
|
|||
require 'custom/plugins/theme',
|
||||
require 'custom/plugins/indent-blankline',
|
||||
require 'custom/plugins/leetcode',
|
||||
require 'custom/plugins/ts-tag-autoclose',
|
||||
|
||||
--
|
||||
-- For additional information with loading, sourcing and examples see `:help lazy.nvim-🔌-plugin-spec`
|
||||
|
|
|
|||
Loading…
Reference in New Issue