zed icon indicating copy to clipboard operation
zed copied to clipboard

Support rootFontSize in Tailwind LSP

Open silvenon opened this issue 1 year ago • 2 comments

Check for existing issues

  • [X] Completed

Describe the feature

It seems like currently the only configurable part of the Tailwind's LSP is emmetCompletions, did I understand the codebase correctly?

I would like to be able to configure rootFontSize because my project is not based on 16px, so px values in intellisense are wrong.

I tried doing all diffrent variants of stuff like:

{
  "lsp": {
    "tailwindcss-language-server": {
      "initialization_options": {
        "tailwindCSS": {
          "rootFontSize": 12
        }
      }
    }
  }
}

but nothing worked.

If applicable, add mockups / screenshots to help present your vision of the feature

The screenshot isn't the best example because it's from a modified configuration, hence the fraction pixel values, but hopefully it's enough to illustrate.

Zed tooltip of a Tailwind class with pixel calculations of rem values

silvenon avatar Apr 22 '24 09:04 silvenon

Also, this would only make sense if lsp option was available in folder-specific settings, which isn't mentioned in the docs, but I hope is supported!

silvenon avatar Apr 22 '24 09:04 silvenon

Related #6759

Moshyfawn avatar Apr 22 '24 14:04 Moshyfawn