Closed Sarcasm closed 6 years ago
The two commits address issues when an editor does not support snippets (snippetSupport: false
). lsp-mode announces it supports snippets (check with M-x lsp-capabilities
) so the two commits should have no effect.
include_snippets
is true. insert
is always updatedinclude_snippets
is false
do_insert
is true, update insert
do_insert
is false, don't update insert
Here is a sample response
{
"jsonrpc": "2.0",
"id": 61,
"result": {
"isIncomplete": false,
"items": [
{
"label": "insert",
"kind": 2,
"detail": "std::vector<int, std::allocator<int> >::iterator insert(std::vector<int, std::allocator<int> >::const_iterator __position, const std::vector<int, std::allocator<int> >::value_type &__x)",
"documentation": "",
"sortText": "...........",
"insertText": "insert(${1:std::vector<int, std::allocator<int> >::const_iterator __position}, ${2:const std::vector<int, std::allocator<int> >::value_type &__x})$0",
"insertTextFormat": 2
}
]
}
}
Sorry for this bug report, it was due to my config. When my Emacs start, I enable yasnippet "lazily" after some idle time. I guess LSP does not like it when yasnippet is enabled/disabled dynamically.
I'm not sure this is an issue with emacs-cquery, but when I do completion in a clean Emacs, I have the feeling snippets aren't available at first. If I revert the buffer and try again, it seems to work.
Can you reproduce the issue? I'm not sure, but I don't think I noticed this issue initially.
Is it possible that one of the recent commit in cquery triggered this?