Plugin does not work with clangd and ccls
Closed this issue · 5 comments
It seems like micro-plugin-lsp doesn't work with clangd and ccls, i.e. none of lsp features can be triggered.
Here is part of my settings.json
file with micro-plugin-lsp configuration:
"lsp.server": "cpp=clangd --log=error",
"lsp.autocompleteDetails": false,
"lsp.formatOnSave": false,
"lsp.ignoreMessages": "LS message1 to ignore|LS message 2 to ignore|...",
"lsp.ignoreTriggerCharacters": "completion,signature",
"lsp.tabcompletion": true
Hey @mrkubax10 , can you provide some code example to test the clangd / ccls ?
Not sure if I understood correctly but you can use this C++ example:
#include <iostream>
class Test{
public:
void test(){
std::cout<<"Test"<<std::endl;
}
};
int main(){
Test test;
test. // After pressing Ctrl+Space here completion event should be triggered but nothing happens
return 0;
}
It seems the correct filetype to go into the lsp.server configuration is not "cpp" but "c++". So the correct configuration string would look like this:
"lsp.server": "c++=clangd"
or for ccls:
"lsp.server": "c++=ccls"
However, the +
characters in the filetype are unexpected and lead to an issue parsing this directive. I will investigate this further.
@mrkubax10 : I created a fix for the above issue in the attached PR. Can you check if this fixes the issue on your side?
Yes, this fixes the issue