Skip to content
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

Imports get always folded when editing in Eclipse 2024-03 #1513

Open
egloffmark opened this issue Apr 6, 2024 · 5 comments
Open

Imports get always folded when editing in Eclipse 2024-03 #1513

egloffmark opened this issue Apr 6, 2024 · 5 comments

Comments

@egloffmark
Copy link

egloffmark commented Apr 6, 2024

Dear all, I am facing a new issue with Eclipse 2024-03 on Windows and Ubuntu. When I editing the imports section at the top of a TS / JS file with the the integrated Wild Web Editor then the section get immediately folded.

image

image

Also when I then try to unfold and place my cursor at the imports, the editor again immediately folds / collapses the section.

this is really an annoying bug and I had to revert back to eclipse 2023-12. There the issue is not happening.

This eclipse version is affected:

Version: 2024-03 (4.31.0)
Build id: 20240307-1437

This version works properly:

Version: 2023-12 (4.30.0)
Build id: 20231201-2043

Thank you for any help or fix on this.

Regards
Mark

@wesleybl
Copy link

wesleybl commented Apr 8, 2024

Is there any way to disable import collapses?

@PyvesB
Copy link
Contributor

PyvesB commented Apr 8, 2024

Occasionally, there's a short delay before the folding happens, especially on bigger projects where the language server probably has more processing to do. Essentially, you start reading through code, and all of a sudden everything moves around because the collapsing kicked in.

JavaScript imports tend to be more "diverse" than other languages: absolute paths, folder relative paths, external modules with or without scopes, etc. Unlike Java where imports tend to have a more rigid structure, it's more useful to have them always visible in JavaScript, and that's actually the default behaviour in most JS editors.

@egloffmark
Copy link
Author

I agree there should be an options that it can be disabled.

@mickaelistria
Copy link
Contributor

This is upstream issue eclipse/lsp4e#895 , imports should only be folded on editor open, only if the response happens within a reasonable time. LSP4E is too enthusiastic here and does it all the time.
Anyone willing to contribute this fix to LSP4E would most likely be very welcome!
I'm keeping the issue here for tracking purpose, but the further work should now move to eclipse/lsp4e#895 .

@wesleybl
Copy link

wesleybl commented May 6, 2024

As said here: eclipse/lsp4e#895 (comment)

To disable import collapses, simply install the latest version of lsp4e.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants