Fork me on GitHub
#lsp
<
2021-03-12
>
practicalli-johnny10:03:23

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.

👍 3
ribelo18:03:11

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)

☝️ 3
practicalli-johnny00:03:39

The face configuration looks very useful, thank you.

😉 4
practicalli-johnny18:03:50

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

ribelo18:03:50

LSP has recently changed face names

ribelo18:03:04

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

practicalli-johnny18:03:15

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

practicalli-johnny18:03:33

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))))

ribelo19:03:34

depending on the font, often just bold is enough

ribelo19:03:06

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

practicalli-johnny19:03:20

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.

😉 3
👍 3
bringe23:03:49

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

borkdude23:03:20

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

bringe23:03:34

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.

borkdude23:03:43

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

bringe23:03:32

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

borkdude23:03:09

In the past that may have been the case

👍 3
bringe23:03:39

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

bringe23:03:57

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

borkdude23:03:23

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

borkdude23:03:17

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

👍 3
bringe23:03:15

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

borkdude23:03:13

There is only need for one cache dir

borkdude23:03:26

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

borkdude23:03:33

I'm afk now, g'night

👋 4