mirror of
https://github.com/NotAShelf/nvf.git
synced 2025-12-13 07:31:02 +00:00
feat(tailwind): allow for custom options in LSP (example with cva)
This commit is contained in:
parent
09470524a2
commit
2d8093f468
2 changed files with 23 additions and 0 deletions
|
|
@ -21,6 +21,11 @@
|
|||
lspconfig.tailwindcss.setup {
|
||||
capabilities = capabilities;
|
||||
on_attach = default_on_attach;
|
||||
settings = {
|
||||
tailwindCSS = {
|
||||
${cfg.lsp.opts}
|
||||
},
|
||||
},
|
||||
cmd = ${
|
||||
if isList cfg.lsp.package
|
||||
then expToLua cfg.lsp.package
|
||||
|
|
@ -49,6 +54,19 @@ in {
|
|||
type = either package (listOf str);
|
||||
default = servers.${cfg.lsp.server}.package;
|
||||
};
|
||||
|
||||
opts = mkOption {
|
||||
description = "Options to pass to tailwindcss-lsp";
|
||||
type = str;
|
||||
default = "";
|
||||
example = ''
|
||||
experimental = {
|
||||
classRegex = {
|
||||
{ "cva\\(([^)]*)\\)", "[\"'`]([^\"'`]+)[\"'`]" },
|
||||
},
|
||||
},
|
||||
'';
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue