aboutsummaryrefslogtreecommitdiffstats
path: root/lsp/tailwindcss.lua
diff options
context:
space:
mode:
authorDavid Bernheisel <dbernheisel@users.noreply.github.com>2025-05-09 20:44:12 -0400
committerGitHub <noreply@github.com>2025-05-09 17:44:12 -0700
commitaf4a9f5ce58763365999bfc558ddecd20d41f2b7 (patch)
treeeb001885979974b249f943163b778a833ebd87be /lsp/tailwindcss.lua
parentdocs: update configs.md (diff)
downloadnvim-lspconfig-af4a9f5ce58763365999bfc558ddecd20d41f2b7.tar
nvim-lspconfig-af4a9f5ce58763365999bfc558ddecd20d41f2b7.tar.gz
nvim-lspconfig-af4a9f5ce58763365999bfc558ddecd20d41f2b7.tar.bz2
nvim-lspconfig-af4a9f5ce58763365999bfc558ddecd20d41f2b7.tar.lz
nvim-lspconfig-af4a9f5ce58763365999bfc558ddecd20d41f2b7.tar.xz
nvim-lspconfig-af4a9f5ce58763365999bfc558ddecd20d41f2b7.tar.zst
nvim-lspconfig-af4a9f5ce58763365999bfc558ddecd20d41f2b7.zip
feat(tailwindcss): add detection for Phoenix projects #3831
Enhance root directory detection for the latest versions of TailwindCSS v4, which no longer require tailwind.config.* or postcss.config.*. For Phoenix projects, they are typically generated or add Tailwind installed via https://github.com/phoenixframework/tailwind which will now be detected by scanning the mix.lock file for the included package. Phoenix projects that install tailwindcss via package.json should still work.
Diffstat (limited to 'lsp/tailwindcss.lua')
-rw-r--r--lsp/tailwindcss.lua1
1 files changed, 1 insertions, 0 deletions
diff --git a/lsp/tailwindcss.lua b/lsp/tailwindcss.lua
index 1c5b3555..7f9af21a 100644
--- a/lsp/tailwindcss.lua
+++ b/lsp/tailwindcss.lua
@@ -117,6 +117,7 @@ return {
}
local fname = vim.api.nvim_buf_get_name(bufnr)
root_files = util.insert_package_json(root_files, 'tailwindcss', fname)
+ root_files = util.insert_mix_exs(root_files, 'tailwind', fname)
on_dir(vim.fs.dirname(vim.fs.find(root_files, { path = fname, upward = true })[1]))
end,
}