dense-analysis / ale

Check syntax in Vim/Neovim asynchronously and fix files, with Language Server Protocol (LSP) support
BSD 2-Clause "Simplified" License
13.55k stars 1.43k forks source link

[feature] Feedbacks about unsupported LSP features on the server and list connected LSP servers #4127

Open ilan-schemoul opened 2 years ago

ilan-schemoul commented 2 years ago

Hello, I was trying to get ccls working and when I was doing anything such as ALEFindReferences it didn't work and I struggled fixing it. It was just because I lacked the file that marked the root folder. 1) Adding the necessity of this file in ale-c.txt would be helpful 2) Because no lsp server was connected the ALEFindReferences just did nothing. I pressed enter and then nothing happened. It was hard for me to tell if it was an ALE issue, a ccls issue, a vim issue etc. It would be better to say "no lsp server found" for example. 3) It would be useful to be able to list connected lsp servers possibly in ALEInfo I also didn't understand why hdl_checker which is supposed to be LSP compatible didn't do anything on some commands like ALERename. It is because it does not support all LSP features. The readme, language support table and the help file for vhdl could make this explicit. Either via a warning in the documentation that not all packages support all lsp features or even (would take more time tho) by explicitly list supported features on each language on the supported language page. Also it would be great if the commands (example: ALERename) would output not only if no LSP server is connected but also if the command is not supported by the currently connected LSP server.

I hope this issue and my feedback is relevant to this project. If so I may volunteer to some or all solutions I offered or you may want to offer (never did any vim plugin coding tho). If not apologies.

On a more high level and subjective side I think the "hard to set up the plugins part" is what set apart IDEs from vim with plugins currently so I think any progression on that side would be a big step forward to make vim with plugins a relevant IDE-like solution.

Thank you for this awesome project.

w0rp commented 1 year ago

I've added this issue to the 4.0.0 milestone so I don't forget about it. Showing more information about what is connected or not is one thing I mentioned in #3369. I added a new point to the list of changes to make to include listing which features a language server supports. Because the LSP spec has servers advertise their capabilities, and we already save those capabilities in a Dictionary, ALE is already internally aware of what a language server can do. We can just make ALE show that in :ALEInfo.

For detecting project files to turn language servers on, we just need to add more possible project files to particular linter definitions.