fix(mini): disable mini.surround by default to preserve native S key behavior#1553
fix(mini): disable mini.surround by default to preserve native S key behavior#1553SetsuikiHyoryu wants to merge 1 commit intonvim-lua:masterfrom
mini.surround by default to preserve native S key behavior#1553Conversation
mini.surround by default to preserve native S key behaviormini.surround by default to preserve native S key behavior
|
I don't remember the why, but I think that's why I ended up switching to "kylechui/nvim-surround". In my setup, it does not seem to have the issue you are describing. If we do decide to drop the "mini.surround", I'd suggest installing |
Thank you for the introduction. I took a look at the Usage section of https://github.com/kylechui/nvim-surround?tab=readme-ov-file#rocket-usage It seems that by default, it uses keys like I think this plugin takes a more reasonable approach. |
we could do default mappings like the ones nvim-surround has? the proposal you make would mean installing another plugin? i personally also like the lazyvim keybindings, its the same, but starts with g (example: gsa is for adding surroundings), which also fixes the doube-assignment with s. |
If change the plugin, users who are already using |
I have confirmed the source code of
mini.surround(mini.nvim/lua/mini/surround.lua). Itssetupfunction looks like this:If the user does not modify
config,setup_configwill use thedefault_config:In
default_config.mappings, multiple mappings start with the characters:These mappings are then applied in the
apply_configfunction called aftersetup:The Neovim documentation on mappings (
nvim/runtime/doc/map.txt) in themap-ambiguoussection states:I don't need the features this plugin provides, and it significantly disrupts the feel of my normal workflow.
I also see the #1328.
Therefore, I believe this plugin should be disabled by default, with a note explaining that its default mappings interfere with Neovim’s native
Skey behavior. Users should enable it consciously, understanding this limitation, or customize the mappings to avoid conflicts.I believe beginner-friendly configurations should not include hidden side effects—especially those that override native key behaviors. If there's a strong reason this plugin must be enabled by default, please keep the warning comment to inform users.