github / github/vscode-github-actions

Add support for embedding languages for the `runs` keyword

未关闭
#266 5 条评论 15 个 reaction 已指派 0 人 在 GitHub 查看
enhancement
主要语言
TypeScript
星标
660
派生
213
PR 合并指标
30 天内没有已合并 PR

描述

**Is your feature request related to a problem? Please describe.**
Not specifically.

**Describe the solution you'd like**
I would like to see my step `runs` show the correct syntax when I'm editing GH Actions or Workflows. Thank you!

**Additional context**

IntelliJ supports this via a feature called [Language Injection](https://plugins.jetbrains.com/docs/intellij/language-injection.html). Users can either add a comment before the key such as `# language=sh` or modify their JSON Schema to provide the `"x-intellij-language-injection": "Shell Script"` property.

For VSCode, a request for generic support didn't gain much traction. Based on the discussion in [microsoft/vscode#1751](https://github.com/microsoft/vscode/issues/1751#issuecomment-919998146) it seems the preferred way to do this is with an extension using [Grammar Injection](https://code.visualstudio.com/api/language-extensions/syntax-highlight-guide?sa=X&ved=2ahUKEwjd1NjivqXyAhUoJrkGHQyJAq4Q9QF6BAgFEAI#injection-grammars) or [Embedded Languages](https://code.visualstudio.com/api/language-extensions/embedded-languages).

贡献指南

打开贡献指南

调研方向

Start by reviewing the linked VS Code Grammar Injection and Embedded Languages documentation, then compare the IntelliJ Language Injection approach described in the issue. Done means values for the GitHub Actions `runs` key display the appropriate embedded-language syntax when editing workflows.

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

评估

技术栈
github-actions, typescript, vscode
领域
developer-experience, tooling
Issue 类型
功能
难度
5/5
预计耗时
一周以上
活跃度
冷清
描述清晰度
需要澄清
新手友好度
35/100

把新 issue 发到你的邮箱

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