Fork me on GitHub
#lsp
<
2024-03-01
>
Eric Dvorsak10:03:36

Hello! Has anyone been able to successfully get completion out of lsp-tailwindcss (https://github.com/merrickluo/lsp-tailwindcss) alongside clojure-lsp? I have this basic config

(use-package lsp-tailwindcss :after lsp-mode
  :init
  (setq lsp-tailwindcss-add-on-mode t
        lsp-tailwindcss-experimental-class-regex ["\"([^\"]*)\""]
        lsp-tailwindcss-major-modes '(rjsx-mode web-mode html-mode css-mode typescript-mode typescript-tsx-mode clojure-mode clojurec-mode clojurescript-mode)))
I see both clojure-lsp and tailwindcss in the modline but it doesn't attempt to complete any classes lsp-log ends with this:
[Global] Adding watch patterns: /home/yenda/redsky/tailwind.config.js, /home/yenda/redsky
[tailwind.config.js] Initializing...
[tailwind.config.js] Loaded Tailwind CSS config file: /home/yenda/redsky/tailwind.config.js
[tailwind.config.js] Loaded postcss v8.4.31: /home/yenda/redsky/node_modules/postcss
[tailwind.config.js] Loaded tailwindcss v3.3.5: /home/yenda/redsky/node_modules/tailwindcss
[tailwind.config.js] Building...

ericdallo11:03:37

Never use that, but maybe check if server is returning completions properly for what you are typing, via enabling lsp-log-io, and then lsp-workspace-show-log

ericdallo11:03:51

If everything looks fine then it's a emacs config indeed

Eric Dvorsak11:03:24

ok, well hard to say seems like it's going nuts, in the same session clojure-lsp logs are 1M and tailwind-lsp 140M, emacs is hanging just by looking at it

ericdallo11:03:05

try to filter only for textDocument/completion and avoid doing other LSP stuff or moving the cursor a lot

ericdallo11:03:17

lsp-workspace-restart would reset that log

Eric Dvorsak11:03:46

interesting I got completion for a brief moment after doing that

Eric Dvorsak11:03:09

seems like it is logging so much it's getting too slow in a matter of seconds

Eric Dvorsak11:03:48

well thanks, looks like just disabling the logs was enough

Eric Dvorsak11:03:00

the logs were killing it

ericdallo11:03:05

yeah, the logs are heavy but are good to understand the behavior

Eric Dvorsak11:03:29

well clojure-lsp logs are fine they don't grow from 0 to 100mb in one minute it's that tailwind-lsp

ericdallo11:03:41

I see, which means the tailwind-lsp must be doing a lot of stuff too, which I suppose may impact performance

lassemaatta16:03:48

Someone used cape for tailwind when trying to get tailwind lsp working, https://drshapeless.com/blog/posts/writing-go-templ-with-emacs.html

😂 1
magnars14:03:02

That's the best blog post I've read all year. 😄

ericdallo16:03:42

clojure-lsp Released clojure-lsp https://github.com/clojure-lsp/clojure-lsp/releases/tag/2024.03.01-11.37.51 with lots of fixes and a new clojure-lsp/different-aliases linter, check how it works https://clojure-lsp.io/settings/#clojure-lspdifferent-aliases! • General ◦ Bump clj-kondo to 2024.02.13-20240228.191822-15. ◦ Add :clojure-lsp/different-aliases linter. https://github.com/clojure-lsp/clojure-lsp/issues/1770 ◦ Fix unused-public-var false positives for definterface methods. https://github.com/clojure-lsp/clojure-lsp/issues/1762 ◦ Fix rename of records when usage is using an alias. https://github.com/clojure-lsp/clojure-lsp/issues/1756 • Editor ◦ Fix documentation resolve not working for clients without hover markdown support. ◦ Added setting to allow requires and imports to be added within the current comment form during code action and completion: :add-missing :add-to-rcf https://github.com/clojure-lsp/clojure-lsp/issues/1316 ◦ Fix suppress-diagnostics not working on top-level forms when preceded by comment. https://github.com/clojure-lsp/clojure-lsp/issues/1678 ◦ Fix add missing import feature on some corner cases for java imports. https://github.com/clojure-lsp/clojure-lsp/issues/1754 ◦ Fix semantic tokens and other analysis not being applied for project files at root. https://github.com/clojure-lsp/clojure-lsp/issues/1759 ◦ Add support for adding missing requires and completion results referring to JS libraries which already have an alias in the project https://github.com/clojure-lsp/clojure-lsp/pull/1587 Thank you clojurists-together and all contributors for the support and help! gratitude

🎉 11
clojure-lsp 4
clojurists-together 1
RAJKUMAR22:03:27

I'm going through the comments in clojure support for zed editor pr https://github.com/zed-industries/zed/pull/6988

RAJKUMAR22:03:08

just want to confirm form evaluation in REPL is not supported correct?