kylechui / nvim-surround

Add/change/delete surrounding delimiter pairs with ease. Written with :heart: in Lua.
MIT License
2.98k stars 60 forks source link

Delete the wrong pairs #214

Closed Nebell closed 1 year ago

Nebell commented 1 year ago

Checklist

Neovim Version

NVIM v0.8.3 Build type: RelWithDebInfo LuaJIT 2.1.0-beta3 Compiled by runneradmin@fv-az171-224

Features: -acl +iconv +tui See ":help feature-compile"

system vimrc file: "$VIM\sysinit.vim" fall-back for $VIM: "C:/Program Files (x86)/nvim/share/nvim"

Run :checkhealth for more info

Plugin Version

Tagged (Stable)

Minimal Configuration

use({ "kylechui/nvim-surround", tag = "*", config = function() require("nvim-surround").setup() end, })

Sample Buffer

use {''nvim-treesitter/nvim-treesitter-context''}

Keystroke Sequence

use {''nvim-treesitter/nvim-treesitter-context''}

  1. Cursor was on nvim-treesitter/nvim-treesitter-context
  2. dsq

Expected behavior

use {'nvim-treesitter/nvim-treesitter-context'}

Actual behavior

use {''nvim-treesitter/nvim-treesitter-context}

Additional context

No response

gegoune commented 1 year ago

I have also noticed for a while now that when multiple pairs are involved more often than not wrong pair will get selected. Can come up with some examples later.

kylechui commented 1 year ago

I assume it is because of this. Please use the untagged version and see if it resolves the issue.

Nebell commented 1 year ago

I assume it is because of this. Please use the untagged version and see if it resolves the issue.

Thanks, it runs correctly.

kylechui commented 1 year ago

Hmm... perhaps it's time for me to make another release, since the current v1.0.0 has quite a few bugs that have been resolved since then.

gegoune commented 1 year ago

Hmm, I observed that behaviour on main branch, didn't use any tags in packer.

Is it something that needs looking into? Should I come up with some examples?

kylechui commented 1 year ago

Yes, @gegoune please create a new issue with the relevant examples, plus a minimal configuration