m-pilia / vim-ccls

Vim plugin for the ccls language server
MIT License
97 stars 7 forks source link

Better detection of available LSP client #65

Open walkerlala opened 1 year ago

walkerlala commented 1 year ago

Modify function ccls#lsp#request so that when the current vim has both vim-lsp / nvim-lspconfig plugins loaded, we can correctly detect the one truely in-use. Still prefer vim-lsp to nvim-lspconfig, though.

In my senario, I have both vim-lsp and nvim-lspconfig loaded, but I actually use and configure the nvim-lspconfig. The vim-lsp is not used and not configured. Calling :CclsCallHierarchy give me a confusing "ccls language server unvailable" errmsg.

It seems that we are using "exists('*lsp#send_request')" to check whether vim-lsp is usable and go in to the deap branch too early.