lsp

:clojure-lsp: Clojure implementation of the Language Server Protocol: https://clojure-lsp.io/
practicalli-john 2021-03-12T10:54:23.011900Z

I find the default symbol highlighting can get quite annoying at times. The variable lsp-enable-symbol-highlighting nil in the lsp package config (layer variable in Spacemacs) switches it off by default. lsp-toggle-symbol-highlight will toggle symbol highlighting on and off.

👍 1
practicalli-john 2021-03-13T18:31:50.050300Z

@huxley hmm, I get an error Invalid face: lsp-face-highlight-textual using that configuration

2021-03-13T18:32:50.050500Z

LSP has recently changed face names

2021-03-13T18:34:04.050900Z

stand on a variable that is more than one, and call describe-face

2021-03-13T18:34:12.051100Z

in emacs

2021-03-13T18:35:13.051500Z

practicalli-john 2021-03-13T18:38:15.052500Z

I'll try using setq instead of set-face, that seemed to work better

practicalli-john 2021-03-13T18:40:33.052700Z

This config did change the faces, but it was still quite distracting, so will try your suggested values

(setq lsp-face-highlight-read '((t (:background "#F8F6D8" :box (:line-width 2 :color "#C6C5AD" :style released-button)))))
  (setq lsp-face-highlight-textual '((t (:inherit lsp-face-highlight-read))))

2021-03-13T19:00:34.054100Z

depending on the font, often just bold is enough

2021-03-13T19:01:06.054300Z

unless someone likes their emacs to glow like a christmas tree 😉

practicalli-john 2021-03-13T19:43:20.054800Z

the doom-gruvbox-light theme I use has a burnt orange color which makes highlighted test hard to read. I hacked the them to remove the background color and add bold, much nicer now.

👍 1
😉 1
2021-03-12T18:47:11.012300Z

i recommend not turning it off, but changing face to a less distracting one. it is very useful to have a look and see where else var has been used

(set-face-foreground 'lsp-face-highlight-textual nil)
  (set-face-background 'lsp-face-highlight-textual nil)
  (set-face-attribute 'lsp-face-highlight-textual nil :weight 'extra-bold)
  (set-face-attribute 'lsp-face-highlight-textual nil :underline t)

☝️ 1
bringe 2021-03-12T23:19:49.014200Z

Was there a change in how cache is stored by default with regards to clj-kondo? I just noticed that if I have no kondo cache or .lsp directory in a project, after clojure-lsp starts, I only have a .lsp directory with a sqlite.db file, but no cache files anywhere. CC @borkdude

borkdude 2021-03-12T23:20:04.014600Z

nope

borkdude 2021-03-12T23:21:20.016Z

but the cache dir is configurable using the --cache argument, so it can be changed by downstream tools

bringe 2021-03-12T23:22:34.017200Z

Hmm. Well, currently with clojure-lsp in Calva, if I open a fresh project, after lsp starts and I see linting, there's still no cache directory. I'm not sure if there's something wrong, but in the past a cache directory was created in the project.

borkdude 2021-03-12T23:26:43.018100Z

@brandon.ringe if there is no .clj-kondo dir, then clj-kondo won't create a .cache inside of it

bringe 2021-03-12T23:27:32.018900Z

Ahh I see. I thought I also recalled a kondo cache dir inside the .lsp dir. But that may have actually been changed. I know there was discussion around cache locations

bringe 2021-03-12T23:27:41.019100Z

Thanks

borkdude 2021-03-12T23:28:09.019500Z

In the past that may have been the case

👍 1
bringe 2021-03-12T23:30:39.020300Z

Does the kondo extension create the .clj-kondo directory automatically?

bringe 2021-03-12T23:30:57.020500Z

I guess clojure-lsp leaves that choice up to the user

borkdude 2021-03-12T23:31:23.020800Z

no, clj-kondo leaves that up to the user as well

bringe 2021-03-12T23:31:31.021Z

Oh ok

borkdude 2021-03-12T23:32:17.021600Z

.clj-kondo serves 3 purposes: indicate the root of your sources, permission to save cache and config location

👍 1
bringe 2021-03-12T23:37:15.023200Z

And there is a reason for having both a .cache and a cache directory in .clj-kondo? I notice when clojure-lsp starts, if I have an empty .clj-kondo directory, I get both those cache directories. This may be more a question for @ericdallo

borkdude 2021-03-12T23:41:13.023400Z

There is only need for one cache dir

borkdude 2021-03-12T23:41:26.023700Z

and by default this is .clj-kondo/.cache

borkdude 2021-03-12T23:41:33.023900Z

I'm afk now, g'night

👋 1