mirror of
https://github.com/LazyVim/LazyVim.git
synced 2025-08-28 22:08:19 +02:00
Merge 277780eaa7
into 25abbf546d
This commit is contained in:
commit
db2800f956
1 changed files with 15 additions and 0 deletions
|
@ -24,6 +24,21 @@ return {
|
|||
filetypes_include = {},
|
||||
-- to fully override the default_config, change the below
|
||||
-- filetypes = {}
|
||||
root_dir = function(fname)
|
||||
local node_modules = vim.fs.find("node_modules", { path = fname, upward = true })[1]
|
||||
local root = vim.fs.dirname(node_modules)
|
||||
if not node_modules then
|
||||
return nil
|
||||
else
|
||||
local tailwind_path = node_modules .. "/tailwindcss"
|
||||
|
||||
if vim.fn.isdirectory(tailwind_path) ~= 0 then
|
||||
return root
|
||||
else
|
||||
return nil
|
||||
end
|
||||
end
|
||||
end,
|
||||
},
|
||||
},
|
||||
setup = {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue