[PATCH] D62999: [clangd] Return empty results on spurious completion triggers
Ilya Biryukov via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Fri Jun 7 09:09:15 PDT 2019
ilya-biryukov marked 2 inline comments as done.
ilya-biryukov added inline comments.
================
Comment at: clang-tools-extra/clangd/ClangdLSPServer.cpp:734
+ "ignored auto-triggered completion, preceding char did not match",
+ ErrorCode::RequestCancelled));
Server->codeComplete(Params.textDocument.uri.file(), Params.position, CCOpts,
----------------
sammccall wrote:
> this error code seems bogus, we should have a comment explaining that returning and empty list breaks vscode and any other error code breaks coc.nvim.
>
> (Might want to file a vscode or LSP bug - trigger char is a heuristic, if [] isn't the preferred way for a server to say "no" then we should spell it out, if it is then vscode is wrong)
Returning empty completion results seems to work just fine.
Added a comment anyway, but I don't think we need an LSP bug for this, returning empty results seems less cheesy than a 'request cancelled' error.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D62999/new/
https://reviews.llvm.org/D62999
More information about the cfe-commits
mailing list