This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2021-06-25
Channels
- # announcements (2)
- # asami (16)
- # babashka (55)
- # beginners (27)
- # calva (14)
- # cider (5)
- # clj-kondo (16)
- # cljs-dev (22)
- # clojure (72)
- # clojure-europe (89)
- # clojure-nl (10)
- # clojure-uk (7)
- # clojured (1)
- # clojurescript (14)
- # community-development (4)
- # core-async (15)
- # emacs (10)
- # events (2)
- # fulcro (3)
- # graalvm (1)
- # graalvm-mobile (71)
- # helix (7)
- # honeysql (2)
- # introduce-yourself (1)
- # jobs-discuss (17)
- # juxt (3)
- # lsp (62)
- # malli (13)
- # meander (7)
- # off-topic (14)
- # pathom (54)
- # polylith (6)
- # re-frame (11)
- # releases (1)
- # sci (22)
- # sql (9)
- # tools-deps (84)
- # vim (37)
- # xtdb (18)
The latest clojure-lsp has become more instable for me than the previous one. E.g. when I do clojure-sort-ns
in emacs (powered not by LSP), lsp locks up emacs and CPU spikes to 100%
(setq gc-cons-threshold (* 100 1024 1024)
read-process-output-max (* 1024 1024)
treemacs-space-between-root-nodes nil
lsp-headerline-breadcrumb-enable nil
company-idle-delay 0.5
lsp-idle-delay 0.5
company-minimum-prefix-length 1
;; lsp-lens-enable t
lsp-enable-file-watchers nil
lsp-file-watch-threshold 10000
lsp-signature-auto-activate nil
lsp-clojure-custom-server-command '("/Users/borkdude/Dropbox/bin/clojure-lsp")
lsp-diagnostics-provider :none
lsp-enable-indentation nil ;; uncomment to use cider indentation instead of lsp
;; lsp-enable-completion-at-point nil ;; uncomment to use cider completion instead of lsp
lsp-completion-provider :capf)
Not related to lsp, it also happens without lsp. Sorry for the false alarm! (tl;dr: it was clojure-sort-ns itself stuck in a loop!)
I mean, there's no reason why you couldn't have this stuff as a git pre-commit hook or so right
I think lib is nice. You could also expose it via the command line (e.g. using sci) via scripts, or as a babashka pod
So lib first (designing API is the hardest problem probably?) and then you can build the rest on top of it: scripting, pod
I think I could also deprecate carve possibly, since the logic in clojure-lsp can do much more
Need to work in some corner cases and integration tests for that () then I can announce as experimental 🙂
@ericdallo Can you configure what it will "fix"?
And does it also remove unused vars... and unused locals... that can be a bit dangerous I guess :)
ATM no, but it'd be easy to introduce opt-outs.
it cleans only the ns
form, maybe clean-ns
as the api would be more clear
Perhaps you could configure this in .lsp/config.edn
what to "automatically" fix on a CLI invocation
yes, I made the API consider the .lsp/config.edn as well, so it'd be easy to introduce customizations
e.g. with carve you can specify which vars to ignore or define "API" namespaces so unused vars are left alone
yes, I need to test, but if you configure your linter that way it may work as expected 🙂
no warning = no action (only sort, that could be disabled in a future setting as well)
Not related to lsp, it also happens without lsp. Sorry for the false alarm! (tl;dr: it was clojure-sort-ns itself stuck in a loop!)