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

Handle window/showMessage and display it bellow status line #5535

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

ayoub-benali
Copy link
Contributor

@ayoub-benali ayoub-benali commented Jan 14, 2023

This feature is also hidden behind the display-messages setting which is used for displaying Progress.

I don't think it make sense to create separate setting for this feature as I don't expect a server to send both Progress and window/showMessage but I can add one if you prefer.

Metals relies on this notification for providing info about the build and is configured here.

Hopefully this will be useful for other language servers.

Here is an example (bottom left) for the message sent by Metals.

Untitled

Fix #5524

pascalkuthe
pascalkuthe previously approved these changes Jan 15, 2023
Copy link
Member

@pascalkuthe pascalkuthe left a comment

Choose a reason for hiding this comment

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

LGTM!

It's nice that helix now covers this parts of the spec aswell

@pascalkuthe pascalkuthe added E-easy Call for participation: Experience needed to fix: Easy / not much A-language-server Area: Language server client S-waiting-on-review Status: Awaiting review from a maintainer. labels Jan 15, 2023
Copy link
Member

@the-mikedavis the-mikedavis left a comment

Choose a reason for hiding this comment

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

I think there should be separate config for showMessage and progressMessage: progress messages are too verbose and distracting IMO but messages sent through showMessage are usually more important and meant for the user to read.

rust-analyzer and erlang-ls are two servers in the wild that behave like this:

Both use progress messages that are very verbose about internal indexing processes which I don't want to see.

We might also want to consider putting the showMessage contents into a Popup instead of using the statusline so that you have to explicitly clear the notification with C-c.

@ayoub-benali
Copy link
Contributor Author

What should be the new setting name ?
Progress is already using a missleading name. should I introduce a breaking change and make progress be controlled with 'display-progress-message' while show message would use the current name ?

@the-mikedavis
Copy link
Member

Yeah I think you're right about the names. Ideally we should avoid breaking changes but I think progress messages would be better as display-progress-messages and showMessage messages as display-messages.

@ayoub-benali
Copy link
Contributor Author

@the-mikedavis So I made the change but I think now a R-breaking-change label should be added to the PR, I couldn't do it myself.

@the-mikedavis the-mikedavis added the R-breaking-change This PR is a breaking change for some behavior label Jan 17, 2023
@ayoub-benali
Copy link
Contributor Author

@the-mikedavis Is the popup support a must have for this PR or could we added it later depending on the user requests ?
I think statusline is already better than nothing, since this LSP notification isn't even supported now

@igor-ramazanov
Copy link

Can we include this into the next release?

@AlexanderBrevig
Copy link
Contributor

(sorry, I thought I was in another PR - still, I really do want this :) would make it a bit easier to use Helix as a client for testing new LSPs 👍🏻)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-language-server Area: Language server client E-easy Call for participation: Experience needed to fix: Easy / not much R-breaking-change This PR is a breaking change for some behavior S-waiting-on-review Status: Awaiting review from a maintainer.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Implement window/showMessage in LSP client
5 participants