biome-vscode: ๐Ÿ› Not working for Tailwind CSS files

VS Code version

0.41.3 (Cursor)

Extension version

2.3.0

Biome version

1.9.3

Operating system

  • Windows
  • macOS
  • Linux

Description

I donโ€™t get the extension to format/lint my CSS files (the Biome CLI works) despite having this in my VSCode settings:

  "[css]": {
    "editor.defaultFormatter": "biomejs.biome"
  },

CleanShot 2024-10-08 at 16 54 06@2x

The extension is working seamlessly for all other file types.

And Iโ€™m not having any stuff ignored in biome.js.

Steps to reproduce

see above

Expected behavior

see above

Does this issue occur when using the CLI directly?

No

Link to a minimal reproduction

No response

Logs

No response

About this issue

  • Original URL
  • State: closed
  • Created 2 years ago
  • Comments: 15 (5 by maintainers)

Most upvoted comments

Youโ€™re correct, I was thinking of something else.

Fixed in f2c4e1a. Will release a new pre-release in a bit.

Using pre-release version with biome 2.0.0-beta.2, I have issues with CSS files when the language is โ€œtailwindcssโ€. If I switch back to โ€œcssโ€ as the language, the extension works fine.

[info] [Error - 4:59:18 PM] Request textDocument/codeAction failed.
[info]   Message: The file does not exist in the workspace.
  Code: -32603 
Error(Diagnostic { path: Some(File("file:///Users/simon/Code/Github/project/src/styles/app.css")), source: The file does not exist in the workspace. })
[info] [Error - 4:59:18 PM] Request textDocument/codeAction failed.
[info]   Message: The file does not exist in the workspace.
  Code: -32603 
Error(Diagnostic { path: Some(File("file:///Users/simon/Code/Github/project/src/styles/app.css")), source: The file does not exist in the workspace. })
[info] [Error - 4:59:18 PM] file:///Users/simon/Code/Github/project/src/styles/app.css internalError/fs  INTERNAL  โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”

  ร— The file does not exist in the workspace.
  
  ! This diagnostic was derived from an internal Biome error. Potential bug, please report it if necessary.
# Trace
[info] [Trace - 4:59:18 PM] Sending request 'textDocument/codeAction - (7)'.
[info] Params: {
    "textDocument": {
        "uri": "file:///Users/simon/Code/Github/project/src/styles/app.css"
    },
    "range": {
        "start": {
            "line": 0,
            "character": 0
        },
        "end": {
            "line": 12,
            "character": 0
        }
    },
    "context": {
        "diagnostics": [],
        "only": [
            "quickfix.biome"
        ],
        "triggerKind": 2
    }
}


[info] [Trace - 4:59:18 PM] Received response 'textDocument/codeAction - (7)' in 2ms. Request failed: The file does not exist in the workspace. (-32603).
[info] Error data: "Error(Diagnostic { path: Some(File(\"file:///Users/simon/Code/Github/project/src/styles/app.css\")), source: The file does not exist in the workspace. })"

Hereโ€™s some relevant VS Code settings:

{
  "[css][tailwindcss]": {
    "editor.defaultFormatter": "biomejs.biome"
  },
  "editor.codeActionsOnSave": {
    "quickfix.biome": "explicit",
    "source.organizeImports.biome": "explicit",
    "source.removeUnusedImports": "always"
  },
  "editor.formatOnSave": true,
  "files.associations": {
    "*.css": "tailwindcss"
  },
}