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

Improve document symbols #1848

Merged
merged 1 commit into from
Mar 12, 2024
Merged

Improve document symbols #1848

merged 1 commit into from
Mar 12, 2024

Conversation

jneem
Copy link
Member

@jneem jneem commented Mar 11, 2024

This changes the "document symbols" request to something that I think is more useful: it lists only "publicly visible" symbols, by which I mean symbols that someone importing the file can access using field paths. In particular, local let bindings are no longer included, nor are fields in records that are only visible in local function bodies and let bindings.

The symbols are also presented hierarchically now.

Fixes #1627

@github-actions github-actions bot temporarily deployed to pull request March 11, 2024 22:19 Inactive
@github-actions github-actions bot temporarily deployed to pull request March 11, 2024 23:35 Inactive
@github-actions github-actions bot temporarily deployed to pull request March 12, 2024 02:29 Inactive
let children = field.value.map(|v| symbols(world, type_lookups, &v));

#[allow(deprecated)]
// because the `deprecated` field is... wait for it... deprecated.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🤯

@jneem jneem added this pull request to the merge queue Mar 12, 2024
Merged via the queue into master with commit b54ae16 Mar 12, 2024
7 of 8 checks passed
@jneem jneem deleted the better-symbols branch March 12, 2024 14:57
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.

Refine lsp document symbols
2 participants