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

Towards being all in on LSP Progress #644

Closed
ckipp01 opened this issue Feb 7, 2024 · 5 comments
Closed

Towards being all in on LSP Progress #644

ckipp01 opened this issue Feb 7, 2024 · 5 comments
Labels

Comments

@ckipp01
Copy link
Member

ckipp01 commented Feb 7, 2024

Describe the feature

Now that scalameta/metals#6055 is merged we should consider fully switching over to the LSP progress method way of doing this. nvim-metals always supported a subset of Metals status so honestly I think we should just go all in on the metals progress, see how it works, and attempt to add in anything we might need on the Metals side.

Potential ways to implement

No response

@kluen
Copy link
Contributor

kluen commented Feb 7, 2024

Hi Chris, what would be the responsibility of nvim-metals here? If I understand correctly, users can now just use their progress display they use for all other language servers (e.g. https://github.com/j-hui/fidget.nvim).

Is there anything else that nvim-metals does with the progress notifications?

@ckipp01
Copy link
Member Author

ckipp01 commented Feb 7, 2024

Good question @kluen. There's noting that nvim-metals really needs to do apart from setting a default. Right now the default is something called show-message. So if they user doesn't set anything for statusBarProvider, then that is used. In order for the new progress to be utilized it needs to be set to "off". So this is basically a question of what should we default to. With the current default the user doesn't need to do anything to see messages. If we default to "off" then they need to have something like fidget installed to handle progress. Or, they set it to "on" and then make sure they capture the status in their bar.

@kluen
Copy link
Contributor

kluen commented Feb 11, 2024

I think it still makes sense to default to printing messages. That way we never run into a situation where someone new who does not now about how notifications work won't get any.

If I understand correctly, the new change in metals does not allow both status bar and LSP progress at the same time, so we have three mutual exclusive options now. How about renaming the setting to progressNotifications and use the three possible values, e.g. showMessage, metalsStatusBar and lspProgress?

Not sure about the naming, but however it is, I think it would be great to make it clear that there is a metals-specific way and an LSP standard way.

For the documentation: Is there any reason for a user to use the metals status bar notifications over the LSP progress ones? This comment sounded like there is some additional functionality.

@ckipp01
Copy link
Member Author

ckipp01 commented Feb 11, 2024

If I understand correctly, the new change in metals does not allow both status bar and LSP progress at the same time, so we have three mutual exclusive options now. How about renaming the setting to progressNotifications and use the three possible values, e.g. showMessage, metalsStatusBar and lspProgress?

Yea, I think this is a good idea. Originally I was doing a 1 to 1 mapping of what the possibilities are server side here. That still might make sense, but things are starting to get muddled a bit since now we handle "off" in a special way.

For the documentation: Is there any reason for a user to use the metals status bar notifications over the LSP progress ones? scalameta/metals#6055 (comment) sounded like there is some additional functionality.

For a nvim-metals user, honestly no. There are a couple extra things related to status, like there is now also the introduction of the BSP status, which we also provide for users to see if there are issues with their build connection. That's something that sort of just stays in the status bar and doesn't have any sort of progress notification. Then there are also Metals slowTask which is also intertwined with status. Finally there is also "action" that can be attached to the status. However, I stopped supporting this as of #642. They were way too aggressive and honestly not really helpful so it didn't make sense to steal the users focus like it was doing. In editors like VS Code this doesn't really matter since it's just a pop up that does steal your focus. I honestly wish we could go all in on progress and find a way to really get rid of status and slowTask in favor of full LSP stuff.

UPDATE: So thinking a bit more about this, I want to hold off on changing any of this until we can solidify what the direction of the Metals status is going to be. The more I think about it the more I think we should do everything we can just get rid of status. I created scalameta/metals-feature-requests#374 to start more of a conversation on this because at least for nvim-metals I don't see a ton of reasons to continue to support status at all since in reality for what we use it for, it can already pretty much fully replace the metals status (minus the BSP status). So let's try to nail down the future of this first before we change the names.

@ckipp01 ckipp01 changed the title Support Progress Towards being all in on LSP Progress Feb 13, 2024
@ckipp01 ckipp01 added enhancement New feature or request and removed input wanted labels Feb 13, 2024
ckipp01 added a commit to ckipp01/nvim-metals that referenced this issue Feb 13, 2024
This relates to some of the discussion happening in scalameta#644.
@ckipp01
Copy link
Member Author

ckipp01 commented Apr 23, 2024

So as of the latest release of Metals a lot of stuff is now using LSP progress. I'll go ahead and close this now.

@ckipp01 ckipp01 closed this as completed Apr 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants