Eglot 配合 C++ 的 language server 为什么找不到系统头文件了?

今天刚从 github 上下的编译好的最新 clangd 和自己 clone 编译的 ccls 都不行。

用 ccls 报的错是这个:

[server-reply] (id:15) ERROR Sat Oct  3 23:20:16 2020:
(:jsonrpc "2.0" :id 15 :error
          (:code -32603 :message "drop older completion request"))

ccls 开始索引文件的日志是这个:

[client-notification] Sat Oct  3 23:19:54 2020:
(:jsonrpc "2.0" :method "workspace/didChangeConfiguration" :params
          (:settings nil))
[stderr] 23:19:54 ccls           initialize.cc:297 I initializationOptions: {"compilationDatabaseCommand":"","compilationDatabaseDirectory":"","cache":{"directory":"/tmp/ccls-cache","format":"binary","hierarchicalPath":false,"retainInMemory":2},"capabilities":{"documentOnTypeFormattingProvider":{"firstTriggerCharacter":"}","moreTriggerCharacter":[]},"foldingRangeProvider":true,"workspace":{"workspaceFolders":{"supported":true,"changeNotifications":true}}},"clang":{"excludeArgs":[],"extraArgs":[],"pathMappings":[],"resourceDir":""},"client":{"diagnosticsRelatedInformation":true,"hierarchicalDocumentSymbolSupport":true,"linkSupport":true,"snippetSupport":true},"codeLens":{"localVariables":true},"completion":{"caseSensitivity":2,"detailedLabel":true,"dropOldRequests":true,"duplicateOptional":true,"filterAndSort":true,"include":{"blacklist":[],"maxPathSize":30,"suffixWhitelist":[".h",".hpp",".hh",".inc"],"whitelist":[]},"maxNum":100,"placeholder":true},"diagnostics":{"blacklist":[],"onChange":1,"onOpen":0,"onSave":0,"spellChecking":true,"whitelist":[]},"highlight":{"largeFileSize":2097152,"lsRanges":false,"blacklist":[],"whitelist":[]},"index":{"blacklist":[],"comments":2,"initialNoLinkage":false,"initialBlacklist":[],"initialWhitelist":[],"maxInitializerLines":5,"multiVersion":0,"multiVersionBlacklist":[],"multiVersionWhitelist":[],"name":{"suppressUnwrittenScope":false},"onChange":false,"parametersInDeclarations":true,"threads":1,"trackDependency":2,"whitelist":[]},"request":{"timeout":5000},"session":{"maxNum":10},"workspaceSymbol":{"caseSensitivity":1,"maxNum":1000,"sort":true},"xref":{"maxNum":2000}}
[stderr] 23:19:54 ccls           initialize.cc:329 I use -resource-dir=/home/glgl-schemer/llvm-800/build/lib/clang/8.0.0
[stderr] 23:19:54 ccls           initialize.cc:361 I workspace folder: /home/glgl-schemer/tea/
[stderr] 23:19:54 ccls              project.cc:426 I loaded /home/glgl-schemer/tea/compile_commands.json
[stderr] 23:19:54 ccls           initialize.cc:386 I start 1 indexers
[stderr] 23:19:54 ccls           initialize.cc:394 I dispatch initial index requests
[stderr] 23:19:54 preamble     sema_manager.cc:736 I create session for /home/glgl-schemer/tea/gbcMain.cc
[stderr] 23:19:54 indexer0         pipeline.cc:298 I load cache for /home/glgl-schemer/tea/gefMain.cc
[stderr] 23:19:54 ccls              project.cc:426 I loaded /home/glgl-schemer/tea/compile_commands.json
[stderr] 23:19:54 ccls         sema_manager.cc:745 I clear all sessions
[server-request] (id:0) Sat Oct  3 23:19:54 2020:
(:jsonrpc "2.0" :method "client/registerCapability" :id 0 :params
          (:registrations
           [(:id "didChangeWatchedFiles" :method "workspace/didChangeWatchedFiles" :registerOptions
                 (:watchers
                  [(:globPattern "**/*")]))]))