nvimdev / lspsaga.nvim

improve neovim lsp experience
MIT License
3.37k stars 285 forks source link

Change rename so that curser in insert mode at the end of variable name #1424

Closed kkrime closed 2 months ago

kkrime commented 2 months ago

Quality of life improvement;

I feel like this is more intuitive, as when a rename is made, more often than not, it's not a complete rename, it's just a partial change to the name.

If you don't agree with this change, would you be open to implementing this as an option the user can set instead?

kkrime commented 2 months ago

Ignore, I managed to achieve this via;

vim.keymap.set("n", "<leader>rn", function()                                                                                                                                                                                                                                                               
vim.api.nvim_command([[:Lspsaga rename]])                                                                                                                                                                                                                                                                
local keys = vim.api.nvim_replace_termcodes('<ESC>A', true, false, true)                                                                                                                                                                                                                       
vim.api.nvim_feedkeys(keys, 'm', false)                                                                                                                                                                                                                                                                  
end, { silent = true })