This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
- # announcements (2)
- # babashka (15)
- # beginners (13)
- # chlorine-clover (17)
- # cider (14)
- # clj-kondo (1)
- # cljfx (3)
- # clojure (21)
- # clojure-australia (2)
- # clojure-europe (3)
- # clojure-nl (4)
- # clojurescript (25)
- # core-async (7)
- # cursive (8)
- # datomic (4)
- # defnpodcast (17)
- # events (1)
- # honeysql (5)
- # jobs-discuss (18)
- # pathom (8)
- # polylith (6)
- # reagent (2)
- # reveal (1)
- # shadow-cljs (2)
- # spacemacs (12)
- # tools-deps (13)
- # xtdb (2)
After a month or so of experimenting with the clojure-lsp and Cider, I've created a minimally invasive LSP client and server configuration that seems to work well with Cider.
The lsp configuration has been added to practicalli/spacemacs.d configuration for Spacemacs.
Details of the configuration can be found at https://practicalli.github.io/spacemacs/install-spacemacs/clojure-lsp/configure-lsp-and-cider.html
• lsp-ui with minimal decoration
◦ lense - shows number of times a function definition of var is referenced (useful for code archaeology)
◦ hidden sideline (as I find it very distracting - set to
t if you wish to see that information constantly
◦ customise doom-gruvbox-light theme using theming layer to set a subtle lsp syntax highlight face
• Use cider-mode formatting rather than lsp - disable lsp formatting and indentation
If you are using this configuration and do not wish to use lsp yet, then remove the comment from the two variables in the clojure layer configuration
This will disable LSP for cider, although LSP can still be used with other languages. I still have a lot to learn about LSP, so welcome feedback and suggestions. If you do suggest enabling other features, it would be helpful to know the details of why you find it useful (rather than just saying its useful - which I'm afraid isn't that useful).
;; clojure-backend 'cider ;; use cider and disable lsp ;; clojure-enable-linters 'clj-kondo ;; clj-kondo included in lsp
I think LSP format can be disabled on client side with just
(setq lsp-enable-identation nil) instead of manually changing lsp cljfmt server config 🙂
in LSP layer variables,
lsp-modeline--enable-diagnostics is a internal function, I think you meant
I am not sure I understand, sorry.
I have set
lsp-enable-identation nil when adding LSP.
The only thing I believe I am doing in
.lsp/config.edn is to disable cljfmt.
Are you saying that
lsp-enable-identation nil will disable cljfmt?
disabling on client side will make lsp-mode don't request any format method to server, what means that server will not use cljfmt
For the practicalli/spacemacs.d project, I would like to make the configuration as self-contained as possible. Then its just a single clone to configure Emacs.
alright, and why my suggestion doesn't fit that? it'll achieve the same result you want without the need to change
I think you are saying I can drop the dot-lsp/config.edn file completely, if I use
lsp-enable-identation nil . I will try this out on Sunday. Thanks.