styled-components / typescript-styled-plugin

TypeScript server plugin that adds intellisense to styled component css strings
MIT License
75 stars 7 forks source link

How can I use this as a plugin for typescript LSP? #12

Open skulltraill opened 1 year ago

skulltraill commented 1 year ago

For context: I am trying to use this with the helix editor, so that I can have styled-components in ts files with CSS autocomplete.

Helix does not support plugins yet, so I need to add it as a plugin to the typescript-language-server LSP.

Having read Helix's LSP integration documentation and also the typescript-language-server initializationOptions for plugins, as well as this repos documentation, it is not clear to me how I would go about integrating typescript-styled-plugin with typescript-language-server to work globally across all my usage of Helix.

I'd rather not install typescript-styled-plugin as a dev dependency via npm to all of my projects, and would rather integrate it with Helix LSP so that I can use it seamlessly across all my typescript + styled-components projects whenever I use helix.

I'm hoping someone has achieved this already and can share some insight.

johnend commented 5 months ago

Same I would like to do the same within NeoVim. I work on a team that mostly uses VSCode and I would prefer to not pollute the tsconfig for them when they can use the VSCode plugin. Global configuration would be really good to document if it is indeed possible via the LSP.

I realise this issue is old, but I'm failing to find how to do this anywhere.