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 for unstable-css as CSS formatter in VSCode #1153

Closed
isAdrisal opened this issue Aug 31, 2024 · 5 comments
Closed

Support for unstable-css as CSS formatter in VSCode #1153

isAdrisal opened this issue Aug 31, 2024 · 5 comments

Comments

@isAdrisal
Copy link

With Deno 1.46, it's now possible to format CSS styles with Deno:

deno fmt --unstable-css styles.css

This works well, but it doesn't seem supported by the VSCode extension, which means it can't be used to format style on save. Setting denoland.vscode-deno as the default CSS formatter results in this error:

Extension 'Deno' is configured as formatter but it cannot format 'CSS'-files

Describe the solution you'd like

Support for the new unstable-css formatter in the extension – or guidance on how to get it working if it can already.

@bartlomieju
Copy link
Member

@nayeemrmn could you handle that?

@nayeemrmn
Copy link
Collaborator

Closed by denoland/deno#25353 and #1154.

@isAdrisal
Copy link
Author

Hey @nayeemrmn, I think I'm missing a step to get this working.

I have v3.39.0 of the VSCode extension installed, and this in my VSCode settings:

{
  "deno.enable": true,
  "deno.lint": true,
  "deno.unstable": true,
  "editor.formatOnSave": true,
  "[css]": {
      "editor.defaultFormatter": "denoland.vscode-deno"
  }
}

I'm no longer seeing the cannot format 'CSS'-files anymore, but no formatting happens after save of a CSS file. Format on save for js/ts/tsx is working as normal.

Any help would be appreciated :)

@bartlomieju
Copy link
Member

bartlomieju commented Sep 3, 2024

@isAdrisal you will have to wait for the next version of Deno to be released, it needs changes in both VSCode extension and the LSP (or upgrade to canary - deno upgrade --canary).

@isAdrisal
Copy link
Author

@bartlomieju Makes sense, thanks!

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