Wie mache ich Clangd in VSCODE nur index die aktuell geöffneten Datei- und Standard -Header -Dateien?C++

Programme in C++. Entwicklerforum
Anonymous
 Wie mache ich Clangd in VSCODE nur index die aktuell geöffneten Datei- und Standard -Header -Dateien?

Post by Anonymous »

Ich bin ein algorithmischer Wettbewerbsteilnehmer, und ich habe einen VSCODE -Arbeitsbereich, in dem ich meinen Code aus verschiedenen Online -Richtersystemen in Ordner organisiert habe. Der Verzeichnisbaum sieht ungefähr so ​​aus: < /p>

Code: Select all

OI (Workspace Root)
- Codeforces
- - CF001A.cpp
- - CF002B.cpp
- ATCoder
- - abc001_a.cpp
- - abc002_b.cpp
- luogu
- - P1001.cpp
- - P1002.cpp
< /code>
Eindeutig sind meine Problemdateien unabhängig voneinander und ich brauche oder möchte den Inhalt anderer Dateien in einer Datei nicht einbeziehen. Ich muss nur System -Header -Dateien wie iOstream 
und vector einbeziehen. Unten ist ein Teil des Clangd loges

Code: Select all

I[10:43:16.044] Indexing c++2b standard library in the context of d:/Coding/OI/atcoder/abc261_g.cpp
I[10:43:16.195] Built preamble of size 7253168 for file d:/Coding/OI/atcoder/abc261_g.cpp version 1 in 0.97 seconds
......
I[10:43:18.601] Indexed c++2b standard library: 14142 symbols, 958 filtered
I[10:43:19.203] --> textDocument/publishDiagnostics
I[10:43:19.205] --> reply:textDocument/documentLink(1) 3818 ms, error: Task was cancelled.
[Error - 10:43:19] Request textDocument/documentLink failed.
[object Object]
I[10:43:19.205] --> reply:textDocument/inlayHint(2) 3809 ms, error: Task was cancelled.
I[10:43:19.206] --> reply:textDocument/inlayHint(3) 3801 ms, error: Task was cancelled.
[Error - 10:43:19] Request textDocument/inlayHint failed.
[object Object]
[Error - 10:43:19] Request textDocument/inlayHint failed.
[object Object]
I[10:43:19.207] --> reply:textDocument/semanticTokens/full(5) 3382 ms
I[10:43:19.208] --> reply:textDocument/documentLink(6) 3210 ms
I[10:43:19.209] --> reply:textDocument/documentSymbol(7) 2103 ms
I[10:43:19.210] --> reply:textDocument/inlayHint(8) 1800 ms
I[10:43:19.210] --> reply:textDocument/inlayHint(9) 1800 ms
I[10:43:19.211] --> reply:textDocument/codeAction(11) 793 ms
Als ich jedoch einen Arbeitsbereich mit nur einer Datei erstellt habe, wurde die Leistung von clangd wieder normal.
Playground (Workspace Root)
- test1.cpp
< /code>
Ich vermute, dass Clangd den gesamten Ordner (oder sogar den Arbeitsbereich) des Codes jedes Mal scannt, wenn er eine Autokonpletion ausführt (obwohl ich sie nicht aufgenommen habe). Wie kann ich dieses Verhalten ändern? Öffnete Datei in.
Bearbeiten: Das Problem tritt nur in Fenstern auf.

Quick Reply

Change Text Case: 
   
  • Similar Topics
    Replies
    Views
    Last post