-
Notifications
You must be signed in to change notification settings - Fork 9
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
Code folding lost when vscode-glimmer
enabled
#43
Comments
Hi @evoactivity! Thank you for your report! You may try to disable builtin code folding in uELS (lifeart/ember-language-server#364) I'm looking forward to improve |
When I try disabling the builtin code folding I get no code folding at all. So to set the scene
If the above is correct I think it will mean the code folding of ELS might need to be expanded to work with JS and TS. Hopefully that just means copying the implementation from https://github.com/microsoft/vscode/blob/main/extensions/typescript-language-features/src/languageFeatures/folding.ts |
This certainly helped! It doesn't match one-to-one with what typescript provides (most obviously missing import folding) but much better than no folding at all.
The lang config can provide folding rules but they are regex based, I don't think it's powerful enough to replace the language server folding providers. Happy to be proven wrong here though. A possible related topic I'm tracking is missing semantic token scopes typed-ember/glint#601. Originally I thought this would be something Glint should handle but now I'm thinking it might be more appropriate for ELS if we end up copying chunks of the typescript language features. What are your thoughts on that? |
In general I'm good with semantic tokens in uELS (already checked it before for glimmer syntax) |
I'm also seeing this issue. I'm loosing folder in all files though at the moment. (PTL for extension bisect!) |
@mattmcmanus if you install this extension instead of I plan to circle back on this soon but if you feel like a challenge a PR would be most welcome :) |
I'm using vscode-glimmer and working with template tags in gts files through
ember-template-imports
. I'm seeing an issue where code folding is only supplied to the template tag. Very breifly I see the mostly correct code folding arrows, then I think when the ember language server starts the folding arrows are only applied to the template tag and it's contents.If I disabe ELS but not vscode-glimmer the folding returns. If I disable vscode-glimmer but not ELS the folding returns. There is something that happens between them to break code folding. I don't know anything about LSP's otherwise I'd tackle this myself.
As a side note I'm using
vscode-glimmer
instead ofGlimmer Templates Syntax for VS Code
because it supportsember-template-imports
andglint
.The text was updated successfully, but these errors were encountered: