kylechui / nvim-surround

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

Last commits broke insert mapping #107

Closed augustocdias closed 2 years ago

augustocdias commented 2 years ago

After I updated this morning the add surround function stopped working...

Here's my config:

require('nvim-surround').setup({
    brackets = { '(', '{', '[', '<' },
    delimiters = {
        pairs = {
            ['('] = { '(', ')' },
            [')'] = { '(', ')' },
            ['{'] = { '{', '}' },
            ['}'] = { '{', '}' },
            ['<'] = { '<', '>' },
            ['>'] = { '<', '>' },
            ['['] = { '[', ']' },
            [']'] = { '[', ']' },
            ['r#"'] = { 'r#"', '"#' },
        },
    },
    keymaps = {
        insert = ',a',
        insert_line = ',,a',
        visual = ',',
        delete = ',d',
        change = ',r',
    },
})

I use which key and when I press , it only shows the mappings for d and r.

augustocdias commented 2 years ago

I've just noticed you changed the behavior and added more keymaps...

I didn't see the break warning when I updated.

augustocdias commented 2 years ago

Is it possible to disable default mappings? I don't use insert mode ones and I would like to not have them mapped.

kylechui commented 2 years ago

@augustocdias Just set them to false, as per the README. If this works for you, please close this issue. Thanks!

kylechui commented 2 years ago

I've just noticed you changed the behavior and added more keymaps...

I didn't see the break warning when I updated.

Please subscribe to #77, I'll be posting updates there. If you think there's a better way to "get the information out there", I'm down to try new things out :)

augustocdias commented 2 years ago

I think this is a good idea. Additionally packer provides a mechanism to warn users on update when it detects breaking change in the commit log https://github.com/wbthomason/packer.nvim#notices

kylechui commented 2 years ago

Thanks for the tip! I had originally been using "semantic commits", putting a ! in the commit header, but I'll try to remember to put breaking change in the commit body.