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
Default folding configuration is ignored when using LSP #98099
Comments
VS Code allows to have multiple folding range providers. So, when the user enables the LS, your extension can add a folding range provider that adds region support. |
Thanks @kieferrm |
@hyangah I believe what @kieferrm is saying is that the language server should update its folding range provider to support region support. @kieferrm, I believe what @hyangah is asking is whether it is by design that only 1 provider's result is used by VS Code or is it right to expect that VS Code should respect both the default folding provider and the one from language server. This ask would similar to other providers, for example completion. When multiple completion providers are registered for the same language, results from all of them are combined by VS Code. Personally, I feel that only 1 provider should be respected as otherwise conflict resolution can get tricky |
Just to follow up on this - this isn't possible because this syntax is editor, not language, specific. Combining the results from multiple folding range providers would be the only way to get this to work correctly. |
@kieferrm @ramya-rao-a My question was whether it's intentional or a bug to disable the existing default vscode's folding provider (that defined and implemented |
When LSP is enabled, the folding marker listed in vscode/extensions/go/language-configuration.json seems to be ignored.
microsoft/vscode-go#3249
Is this intentional?
Is there any way to use this default foldingRange information while using LSP?
The
//#region .... //#endregion
is not part of the language spec so handling this is beyond the language server's responsibility. Either we need to teach vscode to use both information sources, or combine the info from LanguageClient middleware.The text was updated successfully, but these errors were encountered: