nvim-lua / lsp-status.nvim

Utility functions for getting diagnostic status and progress messages from LSP servers, for use in the Neovim statusline
MIT License
625 stars 41 forks source link

what about gopls #17

Closed smartding closed 3 years ago

smartding commented 3 years ago

README says this plugin is for clangd and Microsoft's Python language server.

What about gopls? I used coc.nvim before, It seems to me gopls supports info such as current containing function too.

wbthomason commented 3 years ago

I don't personally use Go/gopls, so I don't know much about it. If you can find documentation on any protocol extensions it supports for status messages, or that it supports $/progress messages (https://microsoft.github.io/language-server-protocol/specifications/specification-current/#progress) and these are not being displayed by lsp-status, please link to it here (I couldn't find any such documentation in a brief perusal).

I'll also note that this plugin works for any language server that supports $/progress messages (including e.g. RLS); clangd and pyls_ms are exceptions which implement their own protocol extensions for status messages, which this plugin also supports.

PRs are also always welcome, if you'd like to look into how coc.nvim's gopls support implements status messages and port it over.

Thanks!

smartding commented 3 years ago

I tried lsp-status.nvim with gopls, everything seems to work, the status() function returns the current containing function and also the number of errors, warnings, etc. are correct. I also tried lsp-status.nvim with diagnosticls, there's no current containing function info.