dense-analysis / dense-analysis/ale
Only jump the window that called ALEGoToDefinition
- Dominant language
- Vim Script
- Stars
- 14k
- Forks
- 1.5k
- Avg merge
- 17h 49m
- Merged PRs (30d)
- 1
Description
My binding to `ALEGoToDefinition` is `gd`.
Native VIM bindings for splitting windows are `v` and `s`.
Therefore instead of `ALEGoToDefinitionIn...Split` I prefer to hit `vgd` or `sgd`.
Currently it has one issue, though. If I open a split on the right, call `ALEGoToDefinition` and then go back left to work some more in the original window, I'll get redirected to the definition as soon as the language server responds and it'll happen in the current (left) window. I'd much prefer `ALEGoToDefinition` to remember it was called from the right window and only make the jump there - without interrupting my work. For that to work it can't steal focus during jump either.
I tried to map `vgd` to `ALEGoToDefinitionInVSplit` but then:
1. VIM waits each time I split windows to check if I want to add `gd`
2. ALE steals focus when opening new split anyway
Making `ALEGoToDefinitionIn...Split` prevent focus stealing would require extra options in configuration, as not everyone might like that, while making `ALEGoToDefinition` remember the correct window can be a default behaviour, I think.
Contributor guide
Assessment
This issue has not been assessed yet.