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

clojure-lsp statusbar message position #1205

Closed
Hamido-san opened this issue Jun 16, 2021 · 2 comments
Closed

clojure-lsp statusbar message position #1205

Hamido-san opened this issue Jun 16, 2021 · 2 comments
Labels
beginner lsp ux User experience related

Comments

@Hamido-san
Copy link
Contributor

Hamido-san commented Jun 16, 2021

is there a way to show the clojure-lsp statusbar message to the right of the statusbar items?
vague question, I know, lemme explain:

instead of having the
nREPL ⚡ disconnected
statusbar items suddenly shift to the right to make way for the clojure-lsp message resulting in
🔄 Initializing Clojure language features... nREPL ⚡ disconnected
and a few seconds later suddenly shifting back to
nREPL ⚡ disconnected

is it possible to just show the clojure-lsp message on the right, like this?
nREPL ⚡ disconnected 🔄 Initializing Clojure language features...
with the clear advantage being that the nREPL ⚡ button wouldn't move around
(hopefully we all know how annoying a "moving" button is, right?)

@bpringe
Copy link
Member

bpringe commented Jun 16, 2021

I think we can achieve this by using createStatusBarItem and setting a low priority (maybe 0?) rather than using setStatusBarMessage. createStatusBarItem returns a StatusBarItem, which I think we then use to set the text and show it. https://code.visualstudio.com/api/references/vscode-api#StatusBarItem

Actually, made we should implement that in statusbar.ts, where most other Calva status bar items are managed.

@bpringe bpringe added ux User experience related lsp beginner labels Jun 16, 2021
@bpringe
Copy link
Member

bpringe commented Jun 16, 2021

We call setStatusBarMessage here and in another place in that file:

vscode.window.setStatusBarMessage('$(sync~spin) Initializing Clojure language features via clojure-lsp', onReadyPromise);

If we want to use StatusBarItem I think we'll need to manage the disposal ourselves once clojure-lsp has started.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
beginner lsp ux User experience related
Projects
None yet
Development

No branches or pull requests

2 participants