Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support formatting github-actions-workflow language (yaml) #1170

Open
jgoux opened this issue Sep 27, 2024 · 2 comments
Open

Support formatting github-actions-workflow language (yaml) #1170

jgoux opened this issue Sep 27, 2024 · 2 comments

Comments

@jgoux
Copy link

jgoux commented Sep 27, 2024

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

When using the https://marketplace.visualstudio.com/items?itemName=GitHub.vscode-github-actions extension and editing GitHub workflows files, Deno isn't formatting the yml files because the extension has its own language github-actions-workflow.

Describe the solution you'd like

Include the "github-actions-workflow" as a target language to format, similar to this PR: https://github.com/bluebrown/vscode-extension-yamlfmt/pull/9/files

@vicary
Copy link

vicary commented Jan 12, 2025

Since Deno already formats yaml, it feels like trivial work.

diff --git a/client/src/extension.ts b/client/src/extension.ts
--- client/src/extension.ts
+++ client/src/extension.ts
@@ -94,8 +94,9 @@
       { scheme: "file", language: "scss" },
       { scheme: "file", language: "sass" },
       { scheme: "file", language: "less" },
       { scheme: "file", language: "yaml" },
+      { scheme: "file", language: "github-actions-workflow" },
       { scheme: "file", language: "sql" },
       { scheme: "file", language: "svelte" },
       { scheme: "file", language: "vue" },
       { scheme: "file", language: "astro" },
@@ -113,8 +114,9 @@
       { scheme: "untitled", language: "scss" },
       { scheme: "untitled", language: "sass" },
       { scheme: "untitled", language: "less" },
       { scheme: "untitled", language: "yaml" },
+      { scheme: "untitled", language: "github-actions-workflow" },
       { scheme: "untitled", language: "sql" },
       { scheme: "untitled", language: "svelte" },
       { scheme: "untitled", language: "vue" },
       { scheme: "untitled", language: "astro" },
@@ -132,8 +134,9 @@
       { scheme: "deno", language: "scss" },
       { scheme: "deno", language: "sass" },
       { scheme: "deno", language: "less" },
       { scheme: "deno", language: "yaml" },
+      { scheme: "deno", language: "github-actions-workflow" },
       { scheme: "deno", language: "sql" },
       { scheme: "deno", language: "svelte" },
       { scheme: "deno", language: "vue" },
       { scheme: "deno", language: "astro" },

@harrysolovay
Copy link

Format Document (forced) works. Otherwise does not. Would be great to be able to specify the deno formatter within vscode settings and have it respected.

"[github-actions-workflow]": {
  "editor.defaultFormatter": "denoland.vscode-deno"
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants