-
Notifications
You must be signed in to change notification settings - Fork 49
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Autoclose dosent work on jsx and tsx #76
Comments
For me only works in html files, doesn't work for js and jsx files |
I´m using this in my init.vim, and it´s working fine for jsx and tsx. let g:closetag_filenames = '*.html,*.xhtml,*.jsx,*.tsx'
let g:closetag_xhtml_filenames = '*.xhtml,*.jsx,*.tsx'
let g:closetag_filetypes = 'html,js'
let g:closetag_xhtml_filetype = 'xhtml,jsx,tsx'
let g:closetag_emptyTags_caseSensitive = 1
let g:closetag_regions = {
\ 'typescript.tsx': 'jsxRegion,tsxRegion',
\ 'javascript.jsx': 'jsxRegion',
\ }
let g:closetag_shortcut = '>' |
I'm using in my init.lua with nvim but some feature is not work. Please help me. HTML = WORK
|
In my init.lua this works
|
@northnSouth Thanks, I experienced the same problem in TSX files, I had my configs in a .vim file but I tried using your solution and it worked, |
I also have this issue but with any filetype different than html. I'm currently trying to use this with
If I manually change the filetype of any file to html, it starts working 😅 I have tried the same configs shown in this thread and it just does not work for any of those filetypes (js, jsx etc), nor it works for erb and eex when I add it to Edit: I have also tried to run the command |
Hi @Hdoc1509 , I'm quite confusing on this configuration. Why remove
from |
I cannot make the configuration work for all of js/jsx/ts/tsx at the same time. |
In lazy, you need to specify these global variables in |
For me this seems to be the minimal config to get this working vim.g.closetag_filetypes = 'html,js,typescriptreact'
vim.g.closetag_emptyTags_caseSensitive = 1
vim.g.closetag_regions = {
['typescript.tsx'] = 'jsxRegion,tsxRegion',
['javascript.jsx'] = 'jsxRegion',
} |
anyone solve the problem where the the auto close tag is applying outside the region?? |
are you appending this to your init.lua file if not where ? |
Hi @linrongbin16, I only set those options and everything worked fine. At this moment, I'm using nvim-ts-autotag. |
`
call s:Declare('g:closetag_filetypes', 'html,xhtml,phtml')
call s:Declare('g:closetag_xhtml_filetypes', 'xhtml')
`
it works on .js files and .ts files but not for jsx and tsx, any help would be appreaciated :)
The text was updated successfully, but these errors were encountered: