Skip to content

Suggestions above imports cause page scrolling jumps #301

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
robrix opened this issue Oct 3, 2020 · 2 comments
Closed

Suggestions above imports cause page scrolling jumps #301

robrix opened this issue Oct 3, 2020 · 2 comments
Labels
type: enhancement An enhancement to an already existing feature

Comments

@robrix
Copy link

robrix commented Oct 3, 2020

The suggestions shown above imports get added to the editor when things load, but when there’s an error, they go away. The imports are at the top, so the rest of the file then jumps up and down as they get added and removed, which is distracting and even confusing—I frequently lose my place when this happens and have to rebuild some context—and since it happens a lot as I edit, it’s become quite a noticeable friction.

Can they be cached and only invalidated when the line they relate to is changed/removed? Then the delta would only be one line for most edits, and even then it would only occur when I’m actually working on the import lines themselves (which is much less common).

Additionally, is there any configuration to disable these specific things altogether? I’ve got the corresponding warnings off for good reason, and I frequently click these by accident when trying to just place my cursor. By contrast, I do not wish to disable the suggestions for inserting type signatures above exported bindings, so disabling the editor feature would be too coarse-grained.

@robrix
Copy link
Author

robrix commented Oct 3, 2020

Separately, but related, the moment of latency between e.g. writing/pasting in an import and the suggestion appearing, or opening a file and all of the suggestions appearing, is also a bit jarring, but I don’t know that there’s much to be done about that.

@ndmitchell
Copy link

This has been reported and is being discussed at haskell/haskell-language-server#426 - the code lens is generic to all haskell-language-server tools, so let's discuss it there.

@jneira jneira added type: enhancement An enhancement to an already existing feature responsibility: server labels Oct 5, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: enhancement An enhancement to an already existing feature
Projects
None yet
Development

No branches or pull requests

3 participants