-
-
Couldn't load subscription status.
- Fork 3.1k
Description
Summary
LSP completions should only be triggered while typing, not when moving around in LSP mode. Otherwise, it is very easy to corrupt code when using the up/down arrows to move between lines.
Reproduction Steps
For easier reproduction, set idle-timeout to 0 in your config.toml:
[editor]
idle-timeout = 0Then, with the following basic JS example:
// Hello, World!
console.log('Hello, world')- Go to line 2 (g2g)
- Enter insert mode (i)
- Press the right-arrow key three times then press the up-arrow key to get to the comment on line 1.
What should happen
The completion dialogue should not show and you should find yourself on line 1. The code on line 2 should remain unchanged.
What actually happens
The completion dialog shows and pressing the up arrow inserts the continue completion in the middle of the console keyword so you end up with:
// Hello, World!
continuensole.log('Hello, world')Helix log
n/a
Platform
Linux (elementary OS 6; based on Ubuntu)
Terminal Emulator
io.elementary.t
Helix Version
helix 22.05-dev (2d4f94e)