-
-
Notifications
You must be signed in to change notification settings - Fork 224
Return DocumentSymbol[] on textDocument/documentSymbol #2817
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
Conversation
|
Thank you. Can you create a separate Also, since the server controls the hierarchy in the new format. We need to manually merge the result from TypeScript and HTML. Otherwise, the variables that are inside the template are no longer being marked as under a component/HTML tag. This can be done in the PluginHost. But this is a bit complex for a first-time contributor, so feel free to ask for direction if you can't figure out a way to do it. Or we can also add it in a later PR. |
So return
Yeah, I just noticed that it also messed up snippets, will take a look. |
Returns // packages/language-server/src/server.ts
connection.onDocumentSymbol((evt, cancellationToken) => {
if (
configManager.getClientCapabilities()?.textDocument?.documentSymbol
?.hierarchicalDocumentSymbolSupport
) {
return pluginHost.getHierarchicalDocumentSymbols(evt.textDocument, cancellationToken);
}
return pluginHost.getDocumentSymbols(evt.textDocument, cancellationToken);
}); |
|
Ok, so now it sorts and builds the hierarchical tree manually based on the symbol range. Typescript inside HTML and Snippets are still messed up, though, I'm not sure where to look to fix it. |
🦋 Changeset detectedLatest commit: 0f89dc4 The changes in this PR will be included in the next version bump. This PR includes changesets to release 2 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
dummdidumm
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you!
The snippet/event handler bugs are independent, my guess is the document symbols logic within the typescript and/or svelte and/or html plugin need to be adjusted. That can happen separately though



Closes #1519
Return hierarchical
DocumentSymbolinstead of the deprecatedSymbolInformation, useful for breadcrumb feature in various clients.Screenshots from Emacs with LSP-Bridge