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
bogus autocomplete and index #15
Comments
Have you installed company-lsp? (defun company-lsp--client-capabilities ()
"Return the extra client capabilities supported by company-lsp."
(when company-lsp-enable-snippet
'(:textDocument (:completion (:completionItem (:snippetSupport t)))))) Can you check if When it is true, ccls uses LSP snippets Not directly related but a tip. If you want to disable snippets on ccls's side, you may customize initialization options as follows: (setq ccls-extra-init-params '(:client (:snippetSupport :json-false)))
These pieces of information will be helpful: the project name (if not confidential), how you get |
Thanks for your reply, it seems that company-backends is a variable defined in ‘company.el’.
Its value is (company-lsp company-bbdb company-nxml company-css company-eclim company-semantic company-clang company-xcode company-cmake company-capf company-files
(company-dabbrev-code company-gtags company-etags company-keywords)
company-oddmuse company-dabbrev) and (lsp--client-capabilities)
(:workspace (:applyEdit t :executeCommand (:dynamicRegistration t)) :textDocument (:synchronization (:willSave t :didSave t :willSaveWaitUntil t) :documentSymbol (:symbolKind (:valueSet [1 2 3 4 5 6 7 8 9 10 11 12 ...]) :hierarchicalDocumentSymbolSupport t) :formatting (:dynamicRegistration t) :codeAction (:dynamicRegistration t) :completion (:completionItem (:snippetSupport t)))) For the second issue, I will wait to have this working and try to give you more informations. |
btw (setq ccls-extra-init-params '(:client (:snippetSupport :json-false))) do not change the behavior |
Since Sep 14, the initialization option Can you use {"jsonrpc":"2.0","id":11,"result":{"isIncomplete":false,"items":[{"label":"result : struct Result","kind":5,"detail":"Out_cclsInfo","sortText":"...........","filterText":"result","insertText":"result","insertTextFormat":1,"textEdit":{"range":{"start":{"line":64,"character":8},"end":{"line":64,"character":8}},"newText":"result"},"additionalTextEdits":[]} Take a look what |
Packages version : I could not install sysdig (not in debian buster repository as I write these lines ...) Content-Length: 466....{"jsonrpc":"2.0","id":6,"result":{"isIncomplete":false,"items":[{"label":"bar(int a, double b, std::string c) -> void","kind":2,"detail":"foo","sortText":"...........","insertText":"bar(${1:int a}, ${2:double b}, ${3:std::string c})$0","filterText":"bar","insertTextFormat":2},{"label":"bar2(double a, double b) -> void","kind":2,"detail":"foo","sortText":"........../","insertText":"bar2(${1:double a}, ${2:double b})$0","filterText":"bar2","insertTextFormat":2}]}} and with Content-Length: 387....{"jsonrpc":"2.0","id":7,"result":{"isIncomplete":false,"items":[{"label":"bar(int a, double b, std::string c) -> void","kind":2,"detail":"foo","sortText":"...........","insertText":"bar(","filterText":"bar","insertTextFormat":1},{"label":"bar2(double a, double b) -> void","kind":2,"detail":"foo","sortText":"........../","insertText":"bar2(","filterText":"bar2","insertTextFormat":1}]}} Seems coherent with what you expect right ? But the final insertion still insert the Content-Length: 453....{"jsonrpc":"2.0","id":4,"result":{"isIncomplete":false,"items":[{"label":"bar(int a, double b, std::string c) -> void","kind":2,"detail":"foo","sortText":"...........","insertText":"bar(int a, double b, std::string c) -> void","filterText":"bar","insertTextFormat":1},{"label":"bar2(double a, double b) -> void","kind":2,"detail":"foo","sortText":"........../","insertText":"bar2(double a, double b) -> void","filterText":"bar2","insertTextFormat":1}]}} |
This is expected when snippetSupport is enabled (with company-lsp installed)
This is also correct. When snippetSupport is disabled, only text before the first placeholder is inserted.
This is the You can open According to https://microsoft.github.io/language-server-protocol/specification
|
Issue solved: Then I install and activate yasnippet, I just don't get that I have to to get nice completion working. I will test now the other issue I have and try to give you proper way to reproduce. |
Hi,
I'm trying to setup my configuration, and get some trouble with ccls+lsp+company
First test an a unique file, give completion, but when accept a completion, the text is not what expected see here:
after selecting the first entry:
On this simple example, vanilla company perform well.
The other problem I face is using a bigger project, ccls seems to run (as I can see from the log file), but the proposed completion are totally wrong. reference navigation seems to me ok btw.
I new to ccls and lsp, so feel free to ask any relevant information and what I should test to resolve the situation.
I'm using vanilla emacs (no spacemacs nor doom...)
The text was updated successfully, but these errors were encountered: