helix icon indicating copy to clipboard operation
helix copied to clipboard

Lsp goto other window (fixes 3167)

Open dam5h opened this issue 3 years ago • 1 comments

I inadvertently closed the prior PR with these same commits via some failed git-fu.

Anyhow, its back up now.

This addresses the #3167 issue I made.

For picker related selections I have added a ctrl!('o') keybind in the picker that will load into the "other" window, via adding a new Action variant for editor.switch to match onto, which just calls focus_next() and then switch() recursively with Action::Replace.

For Goto defintion, since it has a unique destination and no Picker interaction, I just add a command that can be accessed directly if someone adds the command to their keymap. In my personal keymap I bind that to D whereas lowercase d is goto definition in the same view.

dam5h avatar Sep 02 '22 13:09 dam5h

Thanks @dead10ck , made those suggested changes. Cheers! Dave

dam5h avatar Feb 21 '23 03:02 dam5h

Going to close this as I found a simpler approach via the config! I was inspired to try the config approach after trying to catch up onto master and the rebase wasn't going to be as straight forward as it had been for a while.

@bnjbvr this will always show definition in other pane, as opposed to using D vs d. I pretty much always want to keep my place in the source file anyways when looking for a definition so this works for me...

g = {d = ["goto_definition", "rotate_view"]}

dam5h avatar Jun 09 '23 13:06 dam5h