Skip to content

feat: add documentSymbols capability to LSP, #2327#2328

Open
hstove-stacks wants to merge 1 commit intomainfrom
feat/document-symbols-lsp
Open

feat: add documentSymbols capability to LSP, #2327#2328
hstove-stacks wants to merge 1 commit intomainfrom
feat/document-symbols-lsp

Conversation

@hstove-stacks
Copy link
Copy Markdown
Contributor

Turns out this was a very simple change! I verified this by running npm run dev in components/clarity-vscode, and then in the VSCode window that opened, I see both the outline, and the @ search works too.

@hugo-stacks
Copy link
Copy Markdown
Collaborator

Hey Hank,
It's pretty simple change, because it's was already implemented 😄 But it's disabled by default.

Can you try enabling it "clarity-lsp.documentSymbols": true, or in the UI:

Screenshot 2026-03-25 at 10 03 20

And see if it works well and answer your needs?
I'll take a look at the code and try remember why I marked it as beta in the first place. I tink it doesn't traverse the all AST, which is fine in clarity where most things that matter for this use case are pretty much top level.

If you can test for a few days, we may be able to take it out of beta

@hstove-stacks
Copy link
Copy Markdown
Contributor Author

My update here is that this works great, and I think we should change the default to "enabled" IMO. There does seem to be a small lag before symbols are available. After I open a contract in VSCode, it takes maybe 10-15 seconds before I can see them in the outline or via @ searching.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

LSP: support textDocument/documentSymbol requests

2 participants