-
Notifications
You must be signed in to change notification settings - Fork 64
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
Known compatible LSP servers #17
Comments
For |
hm, @yanzhang0219 I don't have that issue. It works the same for me in Javascript files. |
@mrjones2014 could you please provide the js repo? I want to test it on my end. I cloned some js repos from github but not any progress information was shown on the bottom after I opened js files. Thanks. |
I just tested it with a proprietary repo I had open at work. But testing a little further, it seems like there is an issue when there is only Javascript. It worked when I opened a Javascript file in a project which also contains Typescript files. But I tested again with https://github.com/mrjones2014/eslint-plugin-storage and was able to reproduce the issue, actually. |
Yes. That's what I was saying. Pure js repo has the issue. Let me test your repo now. UPDATE: it is confirmed that it doesn't work with pure js repo. |
I tested |
Yeah that's exactly right. |
This is what I was thinking from the very beginning. I am not sure if there is need for specifying which servers it works with, it's up to the server to send messages and this plugin cannot do anything extra to ensure compatibility with specific servers. Isn't it correct? Great plugin, having messages in status line never sat well with me. Your plugins employs such a simple yet beautiful idea, well done! |
Thanks @gegoune !
Perhaps not, but a few people had asked about this information, so I figured it's worth accumulating this knowledge somewhere. Also, while LSP defines the progress endpoint, |
This comment has been minimized.
This comment has been minimized.
I am using this also with kotlin (https://github.com/fwcd/kotlin-language-server) and works properly. FYI the kotlin-language-server takes a lot to startup, so fidget starts around 30 seconds after opening the first file of the session |
Solargraph (Ruby LSP) works. Server itself can take a few seconds to start sending messages, especially on larger projects. |
You need either a tsconfig.json or a jsconfig.json file on your project for it to work. |
|
Works out of the box with erlang-ls for me, tested with version 0.23.1. |
@fitrh flutter-tools.nvim appears to install their own progress handler, which will override Fidget's: https://github.com/akinsho/flutter-tools.nvim/blob/3f3b16d69cdd26e2ed1b2baa719abac7f4c1a8b1/lua/flutter-tools/lsp/init.lua#L85 |
@j-hui does this line mean they still call the default handler so other plugin can use it ? I tried using arkav/lualine-lsp-progress and it seems they can catch the progress from |
@j-hui |
this plugin does not work with |
It doesn't seem like elixir-ls implements workDoneProgress Without it, there's no data for fidget to report. You can monitor LSP exchange by setting
ElixirLs doesn't initiate this reporting and I can't find any mention of |
I've tried adding basic scala metals support: local function metals_status_handler(_, status, ctx)
-- https://github.com/scalameta/nvim-metals/blob/main/lua/metals/status.lua#L36-L50
local val = {}
if status.hide then
val = {kind = "end"}
elseif status.show then
val = {kind = "begin", message = status.text}
elseif status.text then
val = {kind = "report", message = status.text}
else
return
end
local info = {client_id = ctx.client_id}
local msg = {token = "metals", value = val}
-- call fidget progress handler
vim.lsp.handlers["$/progress"](nil, msg, info)
end
local handlers = {}
handlers['metals/status'] = metals_status_handler
require('lspconfig')['metals'].setup {
init_options = {
-- default setting in lspconfig is "show-message"
statusBarProvider = "on"
},
handlers = handlers
} Currently it will show 'nil' in the fidget output, not sure what is the cause (did not look into much of the code) |
Looks like omnisharp doesn't work at the moment, I'd be keen to give it a try though. |
This says it works with clangd, but it doesn't seem to for me. Is there something extra I need to add to the clangd config? I'm already doing |
It doesn't seem to work with |
It works in Cmake project. If you have makefile project, then shift to "Cmake project" |
No, with this config even makefile project works for me, I think all we need is |
@jsholmes @asteroidalaz @fitrh it definitely works with Clangd, regardless of build system (make vs clangd). I use fidget with clangd daily. What matters is you need to have your build system generate a compile_commands.json to tell clangd what what flags you're compiling each file with. Iirc cmake happens to know how to generate these out of the box; for Makefiles, you'll need the help of a tool like bear. If you are still having trouble with clangd (or any other language server), first verify that you are able to get other LSP features working (e.g., see if go to definition works). If it still doesn't work, open an issue. This issue is not for troubleshooting specific LSP setups; it is for discussing whether language servers provide progress notifications given that they already work otherwise. (Conversation moved to #90) |
This comment was marked as off-topic.
This comment was marked as off-topic.
Julia works. It takes a while to show up but that is LS.jl's fault, it is notoriously slow at initializing. |
This works with phpactor (PHP). |
There's already an issue reported: elixir-lsp/elixir-ls#848 Meanwhile, you can try this hack as a temporary solution:
|
I'm closing this issue in favor of this Wiki page. I've also updated it to include some of the newer messages I missed. And for the sake of navigability, it's probably a good idea to file separate issues (or discussions?) to bring this up. (Man, implementing a Wiki using a pinned issue was such a bad idea...) |
By the way, @davidelias can you please test whether your workaround still works(around)? If so, I will add it to the Wiki page. |
This plugin is known to work with the following LSP servers:
And doesn't (yet) work with the following:
Please comment below if you find this plugin works or doesn't work with an LSP server you use.
Note that fidget's implementation relies on my cursory and incomplete understanding of the progress notification spec. Please file a separate issue if you think there's something I missed.
However, if language servers actually deviate from spec, then this plugin will not know how to handle that. Please also file an issue in this repo for these cases.
Ideally we should never terminate ungracefully, and have some kind of sane behavior for handling these cases. For example, if a server never sends an end progress notification, then the fidget will remain stuck onscreen.
At the same time, if language servers do not appear to be conforming to LSP, we should file an issue with their maintainers, if anything but to clarify what the behavior is.
The text was updated successfully, but these errors were encountered: