To simplify re-ranking the code completion results, some clients might
want to mimic receiving the completion lists which are always incomplete.
Details
- Reviewers
- None
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
some drive-by comments:
if this is a client-specific option, wouldn't it be equally hard for client to just set this in the LSP layer, instead of telling clangd to do that?
by looking at the current patch, it rather seems like a user-specific option, which will help users who want to prevent their editors from re-ranking results.
clang-tools-extra/clangd/ClangdLSPServer.cpp | ||
---|---|---|
983 | nit: ClangdServerOpts.AlwaysIncomplete || List->HasMore | |
clang-tools-extra/clangd/tool/ClangdMain.cpp | ||
405 | if we want clients to set it wouldn't it be better to make it an initialization option instead? |
The idea is this is an easy option for the user to work-around editors that do client-side filtering badly (everyone lets you add flags).
But as mentioned offline, I don't think we actually have an example of an editor this fixes (I think it fixes neither vscode nor coc.nvim). So in that case we shouldn't land it.
nit: ClangdServerOpts.AlwaysIncomplete || List->HasMore