microsoft / microsoft/vscode-cpptools-api
Allow specific file paths in `includePath` and `browse.path` from a custom provider and `c_cpp_properties.json`
还没有人认领这个 Issue。
- 主要语言
- TypeScript
- 星标
- 33
- 派生
- 20
- PR 合并指标
- 30 天内没有已合并 PR
描述
Hello,
currently only folders can be specified in browse.path and includePath.
This leads to issues in bigger projects that contain smaller sub-projects.
project
├───common_include
│ ├───foo.h
│ └───bar.h
├───target_include
│ ├───foo.h
│ └───bar.h
└───main.c
As an example, here only common_include/foo.h and target_include/bar.h are required but as only folders can be defined via browse.path and includePath both */foo.h and */bar.h files will be parsed.
This may be solved by using compile_commands.json files however this is not possible in my case.
I know all the correct files that should be used in IntelliSense however I'm unable to define them as these
browse.path: Path is not a directory: c:\path\to\common_include\foo.h
includePath: Path is not a directory: c:\path\to\target_include\bar.h
errors are raised while entering specific files (applies to both .h and .c files).
At the same time forcedInclude allows to define specific files that should be included.
Would it be possible to allow specific files to also be defined in the other settings in the c_cpp_properties.json file and by a custom provider?
贡献指南
这个仓库没有索引到贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
调研方向
先从 c_cpp_properties.json 中的 includePath 和 browse.path 设置开始,然后检查 custom provider 入口点,并将它们的路径处理方式与 forcedInclude 进行比较。完成的标准是:来自两个配置源的特定 .c 和 .h 路径都能在没有目录错误的情况下被接受,并且只解析请求的文件。
由索引模型根据 Issue 内容生成。
评估
- 技术栈
- c, cpp
- 领域
- devtools, tooling
- Issue 类型
- 功能
- 难度
- 4/5
- 预计耗时
- 3-5 天
- 活跃度
- 停滞
- 描述清晰度
- 基本清楚
- 新手友好度
- 48/100