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

Always include "Show Logs" button for window messages #600

Merged
merged 1 commit into from
Sep 6, 2024

Conversation

dhruvmanila
Copy link
Member

@dhruvmanila dhruvmanila commented Sep 5, 2024

Summary

This PR includes a "Show Logs" button for all window messages from Ruff. This might be useful to reduce the friction for the users in figuring out where the logs are. This is something I saw when looking at koxudaxi/ruff-pycharm-plugin#463 description.

Test Plan

Screenshot 2024-09-06 at 10 15 55

@dhruvmanila dhruvmanila marked this pull request as ready for review September 6, 2024 05:03
@dhruvmanila
Copy link
Member Author

This isn't the complete picture because there's still astral-sh/ruff#12523 (comment) that needs to be solved.

@@ -454,14 +462,20 @@ export async function startServer(
break;
}
}),
newLSClient.onNotification(ShowMessageNotification.type, (params) => {
Copy link
Member

Choose a reason for hiding this comment

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

For my understanding. This doesn't apply to $logTrace? This is only run when the LSP sends an explicit show message request?

I'm asking because I think that showing a dialog for info and warning traces would be a bit overly aggressive.

Copy link
Member Author

Choose a reason for hiding this comment

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

Yeah, this doesn't apply to $/logTrace. This only applies to the https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification/#window_showMessage request which is what the editor uses to display notifications from the server.

@dhruvmanila dhruvmanila merged commit 287f94f into main Sep 6, 2024
6 checks passed
@dhruvmanila dhruvmanila deleted the dhruv/show-logs branch September 6, 2024 08:35
dhruvmanila added a commit that referenced this pull request Sep 9, 2024
## Summary

Ensures that the extension calls `updateStatus` with `busy=false` when
the server startup is complete.

This is now necessary after
#600 correctly added an
`updateStatus` call with `busy=true` before the server starts.

Fixes #605

## Test Plan

I ran the extension and verified that the busy indicator no longer spins
forever.

---------

Co-authored-by: Dhruv Manilawala <[email protected]>
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.

2 participants