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

Tailwind intelisense on neovim #239

Open
xonha opened this issue Dec 30, 2024 · 1 comment
Open

Tailwind intelisense on neovim #239

xonha opened this issue Dec 30, 2024 · 1 comment
Labels
help wanted Extra attention is needed

Comments

@xonha
Copy link

xonha commented Dec 30, 2024

Was anyone able to set it up?
I could use some help.

@markuswustenberg markuswustenberg added the help wanted Extra attention is needed label Dec 30, 2024
@Taar
Copy link

Taar commented Jan 2, 2025

This is assuming you're using the latest version of the language server

Note: If you are using mason.nvim you'll need to install mason-lspconfig.nvim and follow their setup instructions.

Here is an example of what I have currently:

local capabilities = vim.lsp.protocol.make_client_capabilities()
local lspconfig = require("lspconfig")
-- ... other stuff
-- npm install -g @tailwindcss/language-server
lspconfig.tailwindcss.setup({
  capabilities = capabilities,
  filetypes = {
    "go",
  },
  settings = {
    tailwindCSS = {
      includeLanguages = {
        go = "html",
      },
      experimental = {
        classRegex = {
          {"Class(?:es)?[({]([^)}]*)[)}]", "[\"`]([^\"`]*)[\"`]"},
        },
      },
    },
  },
})

For those of you that want to know where I found this information, the documentation mentions this config in the Tailwindcss IntelliSense section which leads to the TailwindCSS auto-complete in your IDE section which is part of the gomponents-starter-kit repository.

If you're still not able to get it working post your config here and I'll take a look when I have a free moment :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

3 participants