You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'd like to use deno as the default formatter for all web-related files and languages.
However, not all languages in the formatter docs seem to be supported, and more "fringe" language modes like Post CSS don't seem to be supported either, even though the file has a supported extension (e.g. .css).
I'm not familiar with this part of the VSCode language client / protocol, but since these file extensions do seem to be supported (e.g. when running deno formatter via cli), presumably this should just be as simple as adding JSON, Post CSS and Tailwind CSS as supported formatting languages in this extension.
Steps to Reproduce
In VSCode, when a .css file is identified as either Post CSS or Tailwind CSS language modes, the following error is observed:
FormattingExtension 'Deno' is configured as formatter but it cannot format 'PostCSS'-files
All works fine if the language mode is identified as CSS instead. Similarly, running deno fmt foo.css works fine, even with @tailwind annotations in the file.
Expected behavior
Deno extension should be able to format all extensions / "languages" supported by deno fmt, including .css, .json.
Screenshots
Versions
vscode: 1.96.2 deno: 2.1.4 extension: 3.43.2
The text was updated successfully, but these errors were encountered:
pattobrien
changed the title
Formatter doesn't work with Tailwind CSS and Post CSS language modes
Formatter doesn't work with JSON, Tailwind CSS, and other language modes
Jan 6, 2025
After some more investigation, when I select deno via Format Document With..., all works fine... I'm not sure if that alludes to this being a VSCode issue, or if there is some further configuration that the deno extension needs to do to register the deno formatter to the file association.
Describe the bug
I'd like to use deno as the default formatter for all web-related files and languages.
However, not all languages in the formatter docs seem to be supported, and more "fringe" language modes like
Post CSS
don't seem to be supported either, even though the file has a supported extension (e.g..css
).I'm not familiar with this part of the VSCode language client / protocol, but since these file extensions do seem to be supported (e.g. when running deno formatter via cli), presumably this should just be as simple as adding
JSON
,Post CSS
andTailwind CSS
as supported formatting languages in this extension.Steps to Reproduce
In VSCode, when a
.css
file is identified as eitherPost CSS
orTailwind CSS
language modes, the following error is observed:All works fine if the language mode is identified as
CSS
instead. Similarly, runningdeno fmt foo.css
works fine, even with@tailwind
annotations in the file.Expected behavior
Deno extension should be able to format all extensions / "languages" supported by
deno fmt
, including .css, .json.Screenshots
Versions
vscode: 1.96.2 deno: 2.1.4 extension: 3.43.2
The text was updated successfully, but these errors were encountered: