microsoft / microsoft/vscode-cpptools-api

Allow pointing `SourceFileConfigurationItem` to a compile_commands.json file.

未关闭
#50 2 条评论 2 个 reaction 已指派 0 人 在 GitHub 查看

还没有人认领这个 Issue。

主要语言
TypeScript
星标
33
派生
20
PR 合并指标
30 天内没有已合并 PR

描述

Feature Request

When implementing a CustomConfigurationProvider for intellisense, it would be good to be able to construct a SourceFileConfigurationItem from an existing compile_commands.json.

At Arm we're developing an extension where different files in a project could belong to different build "contexts" e.g. for a different target or compiler toolchain, so we need to be able to set different intellisense configurations depending on which file is being viewed.

Currently I am trying to parse out the command portion of the compile_commands.json to get the compiler args/fragments, and building up the compilerFragments list, but it would be so much better to point at compile_commands.json directly, similar to how it is being done in the c_cpp_properties.json config.

I hope this makes sense. If you have any alternative ideas on how to achieve this, it would be great to hear about it.

Thanks!

贡献指南

这个仓库没有索引到贡献指南

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

调研方向

从 SourceFileConfigurationItem 和 CustomConfigurationProvider API 入手,然后将它们当前的行为与 issue 中提到的 c_cpp_properties.json 处理方式进行比较。确定 compile_commands.json 文件应如何提供每个文件的 IntelliSense 配置,并与维护者确认预期的 API 和测试;当调用方无需手动解析编译器命令即可指向该文件时,即表示完成。

由索引模型根据 Issue 内容生成。

评估

技术栈
cpp
领域
devtools
Issue 类型
功能
难度
5/5
预计耗时
一周以上
活跃度
停滞
描述清晰度
需要澄清
新手友好度
25/100

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。