Skip to content

Tailwindcss LSP: Invalid experimental.configFile configuration, not initializing #4204

@CaoKha

Description

@CaoKha

Description

tailwindcss lsp doesn't work well with tailwindcss v4 (removal of tailwind config file). I read this issue from their intellisense and tried to fix it in neovim with

vim.lsp.config('tailwindcss', {
        settings = {
          tailwindCSS = {
            experimental = {
              configFile = vim.fs.find(
                { "globals.css" },
                { path = vim.fs.joinpath(LazyVim.root.get(), "packages/ui/src/styles") }
              ),
            },
          },
        },
      }
)

but the lsp.log gave me this message:

 Invalid `experimental.configFile` configuration, not initializing

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions