Closed pedro-git-projects closed 5 months ago
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
I got the same problem. I working with other files except the tsx files.
same problem here
hey, i just had the same issue, and i think i see your issue!
unlike how the javascript
treesitter parser includes jsx
, the typescript
treesitter parser doesn't include tsx
. make sure you have the tsx
treesitter parser installed: https://github.com/sdodson99/.dotfiles/commit/16aa31595ca8026374f328220dafdab40c5a70e7
basically, treesitter wasn't working at all for me in tsx files, so this autotag thing wasn't working either 😱
I'm also having this issue, even with the treesitter tsx
parser installed
Update: Actually it works, but only if I use the treesitter config option, but not if I use the setup function
For me, the problem was the InsertLeave
autocmd was always cleared after the first invocation, the following patch fixed the issue on my end
diff --git a/lua/nvim-ts-autotag/internal.lua b/lua/nvim-ts-autotag/internal.lua
index bab1345..a7815d8 100644
--- a/lua/nvim-ts-autotag/internal.lua
+++ b/lua/nvim-ts-autotag/internal.lua
@@ -554,7 +554,7 @@ M.attach = function(bufnr, lang)
if is_in_table(M.tbl_filetypes, vim.bo.filetype) then
setup_ts_tag()
- local group = vim.api.nvim_create_augroup('nvim-ts-autotag', { clear = true })
+ local group = vim.api.nvim_create_augroup('nvim-ts-autotag', { clear = false })
if M.enable_close == true then
vim.api.nvim_buf_set_keymap(bufnr or 0, "i", ">", ">", {
noremap = true,
Try checking :au nvim-ts-autotag
to see if the autocmds are not cleared
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
I seem to have this same issue, @windwp Can you or somebody submit a patch to fix this issue for the tsx
files?
~Hey folks, I've started maintaining a fork over at https://github.com/PriceHiller/nvim-ts-autotag/ until windwp returns.~
~I can't reproduce this over there. I have incorporated a few patches thus far, so perhaps that's why it works for me.~
~If you're still having trouble, try the fork and if it's still not working, open an issue and I'll take another look 🙂.~
I am now helping maintain this plugin, that fork has been merged.
Should be fully resolved with the merging of #173
I'm on NVIM v0.9.1. and have installed the nvim-ts-autotag with packer:
And set it up as per the instructions:
It seems to be working fine in .html .jsx and .svelte files, however, in .tsx files it simply doesn't work.
I have also tried to explicitly pass tsx as an argument to the setup function to no avail:
Because the problem is present on tsx files I'll also provide whatever else I have running on my tsx files: