Serve formatting through clang-format
Per the user's decision, textDocument/formatting runs clang-format as a bounded child process with a 5s deadline and capped streams. A bounded core builds the arguments (workspace .clang-format when present, otherwise the LSP tab options as an explicit LLVM style) and the whole-document edit, refusing output over 32 MiB. Registered feature tests cover the arguments, bounds and edit shape; a real stdio session formatted a misindented document. clang-format becomes a runtime dependency of formatting.
This commit is contained in:
1 parent
7acbfc4029
commit
3344a9f170
12 files changed
+247
-5
No files matched your search
@@ -79,6 +79,7 @@ void build(Void::Build::Project &project) {
|
||||
"src/features/CallHierarchy.cpp",
|
||||
"src/features/CodeLens.cpp",
|
||||
"src/features/DocumentLinks.cpp",
|
||||
"src/features/Formatting.cpp",
|
||||
"src/debug/live/LiveSession.cpp",
|
||||
"src/modules/ModuleWorkQueue.cpp",
|
||||
"src/modules/GccScan.cpp",
|
||||
@@ -162,7 +163,7 @@ void build(Void::Build::Project &project) {
|
||||
"tests/features/SemanticTokensTests.cpp", "tests/features/InlayHintsTests.cpp",
|
||||
"tests/features/FileOperationsTests.cpp", "tests/features/IncludeUpdateTests.cpp",
|
||||
"tests/features/CallHierarchyTests.cpp", "tests/features/CodeLensTests.cpp",
|
||||
"tests/features/DocumentLinksTests.cpp"});
|
||||
"tests/features/DocumentLinksTests.cpp", "tests/features/FormattingTests.cpp"});
|
||||
auto live_worker = project.executable("vls_live_worker_fixture");
|
||||
live_worker.cxx_standard(CxxStandard::Cxx26)
|
||||
.sources({"tests/debug/LiveWorkerFixture.cpp"})
|
||||
|
||||
Reference in new issue
Block a user