Skip to content
This repository has been archived by the owner on Aug 31, 2023. It is now read-only.

feat(vscode): add a status bar item for the language server #3139

Merged
merged 2 commits into from
Aug 31, 2022

Conversation

leops
Copy link
Contributor

@leops leops commented Aug 31, 2022

Summary

Related to #3006

Currently users of the VSCode extension have little to no feedback on whether the extension is active or not for the current file, or on the status of the language server. Taking inspiration from rust-analyzer and Prettier, this PR adds a status bar item for Rome that displays different state when the server is starting up, is ready and active, is inactive because Rome doesn't support the current document (currently this is done at the extension level by checking if the document matches the language selector for the extension, in the future we may request additional information to the language server and display the status of individual features like linting or formatting), or has crashed repeatedly. Additionally, clicking on the status bar item will open the "Rome Trace" log channel in the VSCode output panel

Screenshots

Pending:
status_pending

Ready:
status_ok

Inactive:
status_inactive

Error:
status_error

Test Plan

The extension doesn't have automated tests, so I built it and installed it locally and tried switching between supported and unsupported documents, as well as killing the server process 5 times so the extension gave up on respawning it and went into the error state.

@leops leops requested a review from a team August 31, 2022 08:35
@netlify
Copy link

netlify bot commented Aug 31, 2022

Deploy Preview for rometools canceled.

Name Link
🔨 Latest commit 425aadc
🔍 Latest deploy log https://app.netlify.com/sites/rometools/deploys/630f677d3f938f0008fb3655

@ematipico
Copy link
Contributor

Would you mind attaching some screenshot show us how's the change?

Copy link
Contributor

@ematipico ematipico left a comment

Choose a reason for hiding this comment

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

Really difficult to review without some visual, but I think it's fine to merge

editors/vscode/src/status_bar.ts Outdated Show resolved Hide resolved
editors/vscode/src/status_bar.ts Outdated Show resolved Hide resolved
@cloudflare-workers-and-pages
Copy link

cloudflare-workers-and-pages bot commented Aug 31, 2022

Deploying with  Cloudflare Pages  Cloudflare Pages

Latest commit: 425aadc
Status: ✅  Deploy successful!
Preview URL: https://54acccb6.tools-8rn.pages.dev
Branch Preview URL: https://feature-vscode-status-bar.tools-8rn.pages.dev

View logs

@leops
Copy link
Contributor Author

leops commented Aug 31, 2022

Would you mind attaching some screenshot show us how's the change?

I've update the PR descriptions with screenshots

@leops leops merged commit d06adb6 into main Aug 31, 2022
@leops leops deleted the feature/vscode-status-bar branch August 31, 2022 14:11
@ematipico ematipico added this to the 0.9.0 milestone Sep 2, 2022
@ematipico ematipico added the E-VScode Editors: VSCode label Sep 2, 2022
ematipico pushed a commit that referenced this pull request Sep 5, 2022
* feat(vscode): add a status bar item for the language server

* address PR review
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
E-VScode Editors: VSCode
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

2 participants