From 3db16ceeea947517f0dc1404c24dcb5ab0c91d26 Mon Sep 17 00:00:00 2001 From: Joshua Sattler <34030048+jsattler@users.noreply.github.com> Date: Wed, 30 Jul 2025 03:02:51 +0200 Subject: fix(tailwindcss): use ".git" root marker fallback for tailwind v4 #3980 Since tailwind v4 it is not required to have a tailwind.config.* in the project 1. The current configuration is preventing the LSP to attach to the configured file types in cases when no tailwind.config.* or none of the other markers (package.json etc.) is present. This commit fixes this limitation by providing .git as a fallback and by documenting this limitation. --- lsp/tailwindcss.lua | 2 ++ 1 file changed, 2 insertions(+) (limited to 'lsp/tailwindcss.lua') diff --git a/lsp/tailwindcss.lua b/lsp/tailwindcss.lua index cba3b642..8eb067a6 100644 --- a/lsp/tailwindcss.lua +++ b/lsp/tailwindcss.lua @@ -123,6 +123,8 @@ return { 'theme/static_src/tailwind.config.mjs', 'theme/static_src/tailwind.config.ts', 'theme/static_src/postcss.config.js', + -- Fallback for tailwind v4, where tailwind.config.* is not required anymore + '.git', } local fname = vim.api.nvim_buf_get_name(bufnr) root_files = util.insert_package_json(root_files, 'tailwindcss', fname) -- cgit v1.2.3-70-g09d2