nvim-ts-autotag icon indicating copy to clipboard operation
nvim-ts-autotag copied to clipboard

This breaks dot repeat

Open calebdw opened this issue 1 year ago • 4 comments

Hello!

I like this plugin, but this breaks dot repeating inserts with > in it.

For example:

  • enter insert mode
  • type $this->
  • exit insert mode
  • press . to dot repeat
  • $this- appears

Thanks!

calebdw avatar Mar 13 '24 19:03 calebdw

Not a solution, but since I don't need autotag for PHP files, I enabled it only for certain file types:

autotag = {
  enable = true,
  filetypes = { 'html', 'javascript', 'typescript', 'javascriptreact', 'typescriptreact', 'svelte', 'vue', 'xml', 'markdown' },
}

nicoqh avatar May 03 '24 08:05 nicoqh

After some investigation of this previously, this is a non-trivial addition to nvim-ts-autotag to my knowledge.

I'll pin this so it doesn't get auto-closed as this is very much an issue I hope to resolve. If someone wants to beat me to the punch, PRs are welcome 😃.

PriceHiller avatar May 20 '24 03:05 PriceHiller

Pinned label that is 😅

PriceHiller avatar May 20 '24 03:05 PriceHiller

@calebdw @nicoqh If you still use this plugin, and care about this issue.

There's another plugin with the same default features which doesn't have this issue: https://github.com/tronikelis/ts-autotag.nvim

I'm not sure the exact cause, but I believe the reason this breaks dot repeat is because it sets an insert mode keymap for > to autoclose the tag.

This was one of the reasons why @tronikelis created the alternative plugin.

gbroques avatar Jul 31 '25 01:07 gbroques