llvm-project/clang-tools-extra/clangd/tool
Nathan James 8b88ff0803
[clangd] Add option to use dirty file contents when building preambles.
Adds a option `use-dirty-preambles` to enable using unsaved in editor contents when building pre-ambles.
This enables a more seamless user experience when switching between header and implementation files and forgetting to save inbetween.
It's also in line with the LSP spec that states open files in the editor should be used instead of on the contents on disk - https://microsoft.github.io/language-server-protocol/overviews/lsp/overview/
For now the option is defaulted to off and hidden, Though I have a feeling it should be moved into the `.clangd` config and possibly defaulted to true.

Addresses https://github.com/clangd/clangd/issues/488

Reviewed By: sammccall

Differential Revision: https://reviews.llvm.org/D95046
2022-01-17 10:55:35 +00:00
..
CMakeLists.txt [clangd] CMake: express -Iclangd/ at top level and inherit 2021-07-02 09:52:36 +02:00
Check.cpp [clangd] Cleanup unneeded use of shared_ptr. NFC 2021-12-15 02:13:50 +01:00
ClangdMain.cpp [clangd] Add option to use dirty file contents when building preambles. 2022-01-17 10:55:35 +00:00