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

feature(lsp): adds document symbol provider #297

Merged

Conversation

baszalmstra
Copy link
Collaborator

Adds an LSP document symbol provider. The result is based on the AST of a SourceFile. The implementation is adapted from the rust-analyzer code.

This is a take 2 it depends on #295 . Its a much cleaner approach using the previous PRs. It supersedes #293 .

image

@baszalmstra baszalmstra added the type: feat New feature or request label Jan 14, 2021
@baszalmstra baszalmstra self-assigned this Jan 14, 2021
@baszalmstra baszalmstra changed the title baszalmstra feat(lsp): adds document symbol provider feature(lsp): adds document symbol provider Jan 14, 2021
@codecov
Copy link

codecov bot commented Jan 14, 2021

Codecov Report

Merging #297 (0bbdbd4) into master (6081592) will increase coverage by 0.64%.
The diff coverage is 97.66%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #297      +/-   ##
==========================================
+ Coverage   80.77%   81.42%   +0.64%     
==========================================
  Files         237      239       +2     
  Lines       13864    14026     +162     
==========================================
+ Hits        11199    11420     +221     
+ Misses       2665     2606      -59     
Impacted Files Coverage Δ
crates/mun_language_server/src/capabilities.rs 0.00% <0.00%> (ø)
crates/mun_language_server/src/lib.rs 11.11% <ø> (+4.44%) ⬆️
crates/mun_syntax/src/lib.rs 63.04% <ø> (ø)
...n_language_server/src/state/protocol/dispatcher.rs 48.52% <87.50%> (+13.98%) ⬆️
crates/mun_language_server/src/state.rs 88.41% <92.30%> (+20.20%) ⬆️
crates/mun_language_server/src/analysis.rs 100.00% <100.00%> (ø)
crates/mun_language_server/src/conversion.rs 50.00% <100.00%> (+27.77%) ⬆️
crates/mun_language_server/src/file_structure.rs 100.00% <100.00%> (ø)
crates/mun_language_server/src/handlers.rs 100.00% <100.00%> (ø)
crates/mun_language_server/src/state/protocol.rs 39.43% <100.00%> (+0.86%) ⬆️
... and 13 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 6081592...0bbdbd4. Read the comment docs.

@baszalmstra baszalmstra force-pushed the feat/document_symbol_provider2 branch 2 times, most recently from e8de30e to 95dd758 Compare January 16, 2021 23:09
crates/mun_language_server/src/analysis.rs Outdated Show resolved Hide resolved
crates/mun_language_server/src/file_structure.rs Outdated Show resolved Hide resolved
crates/mun_language_server/src/file_structure.rs Outdated Show resolved Hide resolved
crates/mun_language_server/src/handlers.rs Outdated Show resolved Hide resolved
crates/mun_language_server/src/handlers.rs Show resolved Hide resolved
crates/mun_language_server/src/handlers.rs Outdated Show resolved Hide resolved
crates/mun_language_server/src/state.rs Show resolved Hide resolved
Copy link
Collaborator

@Wodann Wodann left a comment

Choose a reason for hiding this comment

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

Up to you to decide whether you think it's necessary to rename on to on_request

@baszalmstra baszalmstra merged commit b83c2ce into mun-lang:master Jan 20, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: feat New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants