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

progress of jdtls start up reports 1100% in statusline before ServiceReady #218

Closed
errantepiphany opened this issue Jan 9, 2022 · 1 comment

Comments

@errantepiphany
Copy link

errantepiphany commented Jan 9, 2022

LSP client configuration

I'm using https://github.com/williamboman/nvim-lsp-installer and https://github.com/mfussenegger/nvim-jdtls to install eclipse jdtls for me.

Eclipse.jdt.ls version

Whatever nvim-jdtls on the master branch brings in by default.

Steps to Reproduce

I use whatever version of eclipse jdtls is brought in when the main branch of nvim-lsp-installer and the master branch of nvim-jdtls installs it.

I'm guessing that this math is not always correct:
percentage = (result.workDone / result.totalWork) * 100,
https://github.com/mfussenegger/nvim-jdtls/blob/master/lua/jdtls/setup.lua#L70
For some reason, workDone divided by totalWork is ending up as 11 instead of 1 when this code is getting executed.

Expected Result

I expect the statusline to say:
100% Starting Java Language Server - Refreshing '/system'.

("system" is my maven project name)

Actual Result

But the statusline actually says:
1100% Starting Java Language Server - Refreshing '/system'.

I should note that very rarely, it does say 100% instead of 1100%, so this leads me to believe that there is a race condition somewhere.

@mfussenegger
Copy link
Owner

nvim-jdtls is just displaying what's coming from the server and the raw messages can contain percentags > 100:

[2022-01-13T11:08:58+0100] {
  message = "100% Starting Java Language Server - Refreshing '/org.eclipse.jdt.ls.repository'.",
  type = "Starting"
}
[2022-01-13T11:08:58+0100] {
  message = "1000% Starting Java Language Server - Refreshing '/org.eclipse.jdt.ls.repository'.",
  type = "Starting"
}
[2022-01-13T11:08:58+0100] {
  message = "1005% Starting Java Language Server - Refreshing '/org.eclipse.jdt.ls.repository'.",
  type = "Starting"
}
[2022-01-13T11:08:58+0100] {
  message = "1010% Starting Java Language Server - Refreshing '/org.eclipse.jdt.ls.repository'.",
  type = "Starting"
}
[2022-01-13T11:08:58+0100] {
  message = "1100% Starting Java Language Server - Refreshing '/org.eclipse.jdt.ls.repository'.",
  type = "Starting"
}

You'll have to file an issue with eclipse.jdt.ls if it bothers you

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

No branches or pull requests

2 participants