复现步骤
- 在工程根目录放入下面这份
.clangd
CompileFlags:
Add:
- -Wall
Diagnostics:
Suppress: "*"
---
If:
PathMatch: tests/.*
Index:
Background: Skip
- 用 EIDE 打开工程
- 打开 Output 面板的 eide-log
实际结果
日志出现
YAMLParseError: Source contains multiple documents; please use YAML.parseAllDocuments() at line 6, column 1:
Suppress: "*"
---
^
期望结果
合法的多 fragment .clangd 应能被读入,且后续写回时 保留全部 fragment(包括带 If 的条件段),而不是只处理第一段、或把多段压成一个文档。
相关文件
涉及到的源文件
https://github.com/github0null/eide/blob/master/src/clangdConfigProvider.ts
Clangd 的配置说明
https://clangd.llvm.org/config
里有提到
Each file can contain multiple fragments separated by --- lines. (This is only useful if the fragments have different If conditions).
环境信息
- EIDE: 3.27.2
- OS: Windows 10
- 已启用
EIDE.Option.EnableClangdConfigGenerator
复现步骤
.clangd实际结果
日志出现
期望结果
合法的多 fragment .clangd 应能被读入,且后续写回时 保留全部 fragment(包括带 If 的条件段),而不是只处理第一段、或把多段压成一个文档。
相关文件
涉及到的源文件
https://github.com/github0null/eide/blob/master/src/clangdConfigProvider.ts
Clangd 的配置说明
https://clangd.llvm.org/config
里有提到
环境信息
EIDE.Option.EnableClangdConfigGenerator