Skip to content
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

Completion can not work any more when update company-lsp #92

Closed
maobaoqi opened this issue Mar 13, 2019 · 5 comments · Fixed by #93
Closed

Completion can not work any more when update company-lsp #92

maobaoqi opened this issue Mar 13, 2019 · 5 comments · Fixed by #93

Comments

@maobaoqi
Copy link

maobaoqi commented Mar 13, 2019

Hi, When I update company-lsp new commit "218898c", LSP based on clang can not work on my laptop.I write some demo C and C++ code and it is likely that company-lsp can not be called by LSP, it works using company-clang.And I go back to previous company-lsp commit, emacs can show correctly completion using company-lsp.

I don't know where is going wrong.

@maobaoqi maobaoqi changed the title Complete can not work any more when update company-lsp Completion can not work any more when update company-lsp Mar 13, 2019
@tigersoldier
Copy link
Owner

Hi, what's the language server you are using? Is it ccls, cquery, or clangd?

Can you try M-x company-lsp and paste the output here?

@maobaoqi
Copy link
Author

@tigersoldier I use clangd as c and c++ server. I try M-x company-lsp, it shows Cannot complete at point in minibuffer.

@maobaoqi
Copy link
Author

@tigersoldier Type M-x company-lsp on a blank line of c code, emacs can show completion menu using
company-lsp, but the menu contains few completion items, no complete c standard library funtions. Old company-lsp can work well.

tigersoldier pushed a commit that referenced this issue Mar 14, 2019
Per spec filterText should be used for filtering when the server provides it.
If it's not provided, label should be used.

Some language server such as clangd adds some prefix to labels, such as empty
spaces. They don't work well with prefix-based filter since the additional prefix
will never match the completion prefix.

Should fix #92 and may also help #79.
tigersoldier pushed a commit that referenced this issue Mar 14, 2019
Per spec filterText should be used for filtering when the server provides it.
If it's not provided, label should be used.

Some language server such as clangd adds some prefix to labels, such as empty
spaces. They don't work well with prefix-based filter since the additional prefix
will never match the completion prefix.

Should fix #92 and may also help #79.
tigersoldier pushed a commit that referenced this issue Mar 14, 2019
Per spec filterText should be used for filtering when the server provides it.
If it's not provided, label should be used.

Some language server such as clangd adds some prefix to labels, such as empty
spaces. They don't work well with prefix-based filter since the additional prefix
will never match the completion prefix.

Should fix #92 and may also help #79.
@tigersoldier
Copy link
Owner

@maobaoqi I just commited #93 and #94 which should fix the clangd filtering issue. Please update to the latest version. MELPA should pick up the changes in an hour or two.

@maobaoqi
Copy link
Author

@tigersoldier I test it right now and it works! thank you for so quick fix.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants