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

Implement textDocument/foldingRange handler #15

Open
3 tasks
retailcoder opened this issue Feb 12, 2023 · 0 comments
Open
3 tasks

Implement textDocument/foldingRange handler #15

retailcoder opened this issue Feb 12, 2023 · 0 comments
Labels
component: Rubberduck.Client Issue involves RPC client/platform component: Rubberduck.Core Issue involves the Core library component: Server.LSP Issue involves the LSP server process feature: foldings Issues relating to the code folding editor feature

Comments

@retailcoder
Copy link
Member

retailcoder commented Feb 12, 2023

The client-sided proof-of-concept code produced a ParseTreeListener that should be relatively easy to tweak to output LSP-compliant FoldingRange items (only for the active document) instead of AvalonEdit model items - on the client side the LSP items should be converted into the corresponding AvalonEdit objects, and rendered in the active document.

  • Modify the listener to use the LSP-compliant model types
  • Attach the listener to the parser that processes the active document
  • Return the folding ranges in the response

As with all LSP requests, the server operates with the version of the code that is currently synchronized at the moment of the request.

@retailcoder retailcoder added feature: foldings Issues relating to the code folding editor feature component: Server.LSP Issue involves the LSP server process component: Rubberduck.Core Issue involves the Core library labels Feb 12, 2023
@retailcoder retailcoder changed the title Implement textDocument/foldingRange response Implement textDocument/foldingRange handler Feb 25, 2023
@retailcoder retailcoder added the component: Rubberduck.Client Issue involves RPC client/platform label Mar 12, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component: Rubberduck.Client Issue involves RPC client/platform component: Rubberduck.Core Issue involves the Core library component: Server.LSP Issue involves the LSP server process feature: foldings Issues relating to the code folding editor feature
Projects
None yet
Development

No branches or pull requests

1 participant