From c540b9ada3eb63f7954d19b65835ad8c188d4690 Mon Sep 17 00:00:00 2001 From: Sedana Yoga <9g.yoga27@gmail.com> Date: Sat, 12 Jul 2025 18:41:16 +0800 Subject: [PATCH] fix(lang): support indirect tailwindcss for lsp detection --- lua/lazyvim/plugins/extras/lang/tailwind.lua | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/lua/lazyvim/plugins/extras/lang/tailwind.lua b/lua/lazyvim/plugins/extras/lang/tailwind.lua index cbdd612e..b1ac903e 100644 --- a/lua/lazyvim/plugins/extras/lang/tailwind.lua +++ b/lua/lazyvim/plugins/extras/lang/tailwind.lua @@ -24,6 +24,14 @@ return { filetypes_include = {}, -- to fully override the default_config, change the below -- filetypes = {} + root_dir = function(fname) + local node_modules = vim.fs.dirname(vim.fs.find("node_modules", { path = fname, upward = true })[1]) + if not node_modules then + return nil + else + return node_modules + end + end, }, }, setup = {