spacemacs

Spacemacs docs: http://develop.spacemacs.org/doc/DOCUMENTATION.html http://develop.spacemacs.org/layers/+lang/clojure/README.html https://practicalli.github.io/spacemacs/
practicalli-john 2021-03-28T00:10:08.038700Z

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. https://github.com/practicalli/spacemacs.d/ 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

;; clojure-backend 'cider               ;; use cider and disable lsp
    ;; clojure-enable-linters 'clj-kondo    ;; clj-kondo included in lsp
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).

👍 1
ericdallo 2021-03-28T00:16:02.038800Z

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 🙂

ericdallo 2021-03-28T00:19:26.039100Z

in LSP layer variables, lsp-modeline--enable-diagnostics is a internal function, I think you meant lsp-modeline-diagnostics-enable variable

practicalli-john 2021-03-28T00:21:13.039500Z

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?

ericdallo 2021-03-28T00:22:10.039700Z

you are already disabling on client-side, so no need to change any server config

ericdallo 2021-03-28T00:23:13.039900Z

disabling on client side will make lsp-mode don't request any format method to server, what means that server will not use cljfmt

ericdallo 2021-03-28T00:23:28.040100Z

less user config, resulting on the same

practicalli-john 2021-03-28T00:24:22.040300Z

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.

ericdallo 2021-03-28T00:25:40.040500Z

alright, and why my suggestion doesn't fit that? it'll achieve the same result you want without the need to change .lsp/config.edn

practicalli-john 2021-03-28T00:25:54.040700Z

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.

ericdallo 2021-03-28T00:26:03.040900Z

exactly 🙂

practicalli-john 2021-03-28T00:26:15.041100Z

Okay, I understand now. Thanks.

👍 1