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

Add new command for LSP/Webview integration #63

Merged
merged 4 commits into from
Aug 14, 2024
Merged

Conversation

noklam
Copy link
Contributor

@noklam noklam commented Aug 14, 2024

Context

Fix ##56

This allow integration Click on Webview -> Navigation feature.
viz-navigation

Development Notes

Additional Notes

Base on some investigation, it seems that we need to manually handle the response from LSP instead of automatically trigger navigation. I am unsure where to find internal wiring of VSCode (where you do Cmd + click to trigger navigation, and the response is used to trigger action).

Trigger flow

  1. Request send to LSP (from command in this PR, expected to be a click on Webview at the end)
  2. LSP respond with location
  3. Extension react to the response and use showTextDocument based on the command.

A new command is created mainly for testing purpose, we don't need the command for release (or we can keep it as a debug mode feature)

Signed-off-by: Nok Lam Chan <nok.lam.chan@quantumblack.com>
Signed-off-by: Nok Lam Chan <nok.lam.chan@quantumblack.com>
Signed-off-by: Nok Lam Chan <nok.lam.chan@quantumblack.com>
Signed-off-by: Nok Lam Chan <nok.lam.chan@quantumblack.com>
@noklam noklam requested a review from jitu5 August 14, 2024 15:00
@noklam noklam merged commit c8517ea into main Aug 14, 2024
1 of 2 checks passed
@noklam noklam deleted the noklam/lsp-command branch August 14, 2024 22:27
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.

1 participant