orzechowskid / tsx-mode.el

a batteries-included Emacs major mode for Typescript, Javascript, TSX, and JSX files
GNU General Public License v3.0
100 stars 10 forks source link

Support LSP based CSS completions #14

Open stevemolitor opened 2 years ago

stevemolitor commented 2 years ago

I had been using the vscode-style-components plugin with lsp-mode for CSS in JS completion, via this configuration:

(setq lsp-clients-typescript-plugins
      (vector
       (list :name "typescript-styled-plugin"
               :location "/path/to/styled-components.vscode-styled-components-1.7.0")))

CSS mode capf seems to work fine too; can't really say which is better yet. But it'd be nice to support both options. Not a huge issue, but might be nice sort of thing.

orzechowskid commented 2 years ago

if we enable lsp-mode for the hidden CSS buffer then if we're clever enough I bet we can get LSP's eldoc, xref, and other cool things as well. I might have some time to look into this today.

orzechowskid commented 2 years ago

huh, maybe I'm missing something but it doesn't seem as though the default css-ls backend supports textDocument/completion...