mirror of
https://github.com/NotAShelf/nvf.git
synced 2025-12-08 21:23:53 +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
|
|
@ -510,3 +510,8 @@
|
|||
|
||||
- Add inline typst concealing support under `vim.languages.typst` using
|
||||
[typst-concealer].
|
||||
|
||||
[Shyrogan](https://github.com/Shyrogan):
|
||||
|
||||
- Add `vim.languages.tailwind.lsp.opts` option to Tailwind (for third party such as
|
||||
[cva](https://beta.cva.style/)) along an example on how to use it.
|
||||
|
|
|
|||
|
|
@ -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