lsp

pez 2025-11-17T17:35:29.676299Z

A little bird told me that clj-kondo will provide better bracket matching diagnostics in the next version and that maybe clojure-lsp nightly could provide this already with a bump of the kondo version. Would be nice to test this!

ericdallo 2025-11-17T17:38:42.314429Z

yes, sure! I will do a clojure-lsp release soon, but if that's already on clj-kondo master I can bump it already

pez 2025-11-17T17:39:26.037079Z

Letโ€™s summon the little bird ๐Ÿ˜ƒ @borkdude

๐Ÿ˜‚ 1
borkdude 2025-11-17T17:40:33.198709Z

it is! since two weeks. 6 commits ago or so

borkdude 2025-11-17T17:40:56.959839Z

perhaps make a nightly job to bump kondo? would be awesome for early feedback on kondo too

seancorfield 2025-11-17T17:44:28.083839Z

Does the nightly lsp not already include the nightly kondo?

ericdallo 2025-11-17T17:50:53.697199Z

every push to clojure-lsp master releases a nightly, but I need to manually bump it

ericdallo 2025-11-17T17:51:13.861159Z

maybe a job or something would be nice, but not sure about automatically doing it

seancorfield 2025-11-17T17:53:40.457769Z

If every push to LSP master releases a nightly build, updating kondo automatically seems like a natural step to me -- otherwise, how can I get LSP to use more recent Kondo versions for testing? ๐Ÿ™‚

ericdallo 2025-11-17T17:58:59.159509Z

yeah, I think it makes sense, we could create a gh action for that, but not sure how unless in clj-kondo repo

lread 2025-11-17T18:22:19.456419Z

Could maybe setup a schedule in clojure-lsp github actions workflow to check clj-kondo master for updates. (Probably good to only use if tests were green). Daily could be enough.

ericdallo 2025-11-17T18:22:38.658959Z

yeah that sounds interesting

ericdallo 2025-11-17T18:26:27.739489Z

Just pushed the bump, nightly in the way!

๐Ÿค˜ 4
๐Ÿค˜๐Ÿป 1
cjohansen 2025-11-17T19:41:56.328689Z

If unmatched parens are detected, the user should receive instructions for how to enable paredit ๐Ÿ˜

๐Ÿ‘ 1
๐Ÿ‘๐Ÿป 1
borkdude 2025-11-17T19:42:38.333419Z

and/or use https://github.com/borkdude/parmezan to ff-ing fix those copy/paste forgotten parens

borkdude 2025-11-17T19:43:04.320499Z

because I have to disable paredit to make it let me fix it ;)

cjohansen 2025-11-17T20:16:03.952599Z

Hehe ๐Ÿ˜Š

2025-11-17T20:52:16.089689Z

C-q (

Harold 2025-11-17T21:53:22.165179Z

Hi! Thanks for lsp, I've got it running, and am learning a great many things. The screenshot below shows a line appearing at the top of my editor window (emacs). The breadcrumbs have little squiggly lines, is that expected? What do they mean?

dpsutton 2025-11-17T21:55:28.528939Z

i think they indicate errors at that point in the tree. somewhere in src is an error. somewhere in async is an error. but flow does not have an error.

borkdude 2025-11-17T21:55:32.029839Z

That's the most annoying thing and I wish lsp-mode (or clojure-lsp?) would turn these bells and whistles off by default.

Harold 2025-11-17T21:56:06.645479Z

Perhaps a #good-first-issue for me. Thank you for confirming it. ๐Ÿ™‡

borkdude 2025-11-17T21:56:11.085139Z

this is my config:

(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 2
      lsp-idle-delay 0.05
      company-minimum-prefix-length 2
      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/bin/clojure-lsp-dev")
      ;; 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
      lsp-enable-on-type-formatting nil)

borkdude 2025-11-17T21:56:29.994529Z

don't copy everything, but this is the relevant bit:

lsp-headerline-breadcrumb-enable nil

dpsutton 2025-11-17T21:56:41.040879Z

oh i tried to fight the file watches a while back. iโ€™ll take your fix here

Harold 2025-11-17T21:56:52.874909Z

> don't copy everything ๐Ÿ˜ฎ

dpsutton 2025-11-17T21:57:01.970189Z

it watches everything. and you canโ€™t specify two directories, you have to specify the ones you donโ€™t want watched

ericdallo 2025-11-17T22:02:22.292469Z

that is the breadcrumb lsp-mode feature, don't throw rocks at me, but was my first big feature for lsp-mode when became a maintainer hehe

๐Ÿ’” 1
๐Ÿชจ 1
Harold 2025-11-17T22:03:11.010939Z

It actually makes sense.

ericdallo 2025-11-17T22:03:12.499639Z

I agree it should be disabled by default, and I'm actually considering send a PR for it

borkdude 2025-11-17T22:03:15.679499Z

we all make mistakes @ericdallo, I still love you

๐Ÿ˜‚ 3
Harold 2025-11-17T22:03:44.740949Z

My intuition is that the breadcrumbs should be displayed by default, but the 'show errors as squiggles on breadcrumb' should be opt-in

โž• 1
dpsutton 2025-11-17T22:03:58.631749Z

thatโ€™s enabled by default in most clients right?

1
ericdallo 2025-11-17T22:04:17.011329Z

interesting @hhausman, they are very customizable tho

borkdude 2025-11-17T22:04:43.272669Z

Instead we (probably you ๐Ÿ˜† ) can make a "getting started section for emacs with good defaults" in the clojure-lsp repo

Harold 2025-11-17T22:04:48.312299Z

> they are very customizable tho Cool. I will look around.

dpsutton 2025-11-17T22:04:49.831769Z

itโ€™s a sane default and invites people to customize their emacs config.

ericdallo 2025-11-17T22:05:00.272479Z

@dpsutton yeah, vscode's breadcrumb was my inspiration at the time

borkdude 2025-11-17T22:05:24.519209Z

I don't see a breadcrumb though? just some files being highlighted in different colors, less intrusive

ericdallo 2025-11-17T22:05:50.684789Z

@hhausman glad you are trying LSP! About UI, you may find https://emacs-lsp.github.io/lsp-mode/tutorials/how-to-turn-off/ tutorial very useful

borkdude 2025-11-17T22:06:04.598019Z

personally I don't think the breadcrumb even without errors doesn't really help me during development, but people like different things

ericdallo 2025-11-17T22:06:30.053769Z

yeah, I myself disabled it years ago ๐Ÿ™ˆ

borkdude 2025-11-17T22:06:36.247409Z

what do you use it for? I might learn something. aaah ok

ericdallo 2025-11-17T22:06:53.791099Z

it sounded a nice feature when me and @yyoncho created 5 years ago ๐Ÿ˜…

Harold 2025-11-17T22:06:59.020549Z

Got it: (setq lsp-headerline-breadcrumb-enable-diagnostics nil)

๐Ÿ‘ 1
borkdude 2025-11-17T22:09:02.262919Z

I guess the breadcrumb could help with navigation but I use dired for it

ericdallo 2025-11-17T22:09:39.935749Z

yeah, I can see usages for it, and there are lsp-mode users that use and love, I think it's just preferences

borkdude 2025-11-17T22:09:59.505789Z

omg, I needed this: (add-hook 'lsp-after-apply-edits-hook (lambda (&rest _) (save-buffer)))

๐Ÿ‘ 1
borkdude 2025-11-17T22:10:18.970999Z

when renaming I had to save 20 buffers with save-some-buffers

ericdallo 2025-11-17T22:11:16.265589Z

It's time to create a var to do that in lsp-mode ๐Ÿ˜…

Harold 2025-11-17T22:11:27.023129Z

> @hhausman glad you are trying LSP! Yes, thank you for the encouragement this weekend. Already had an experience where M-. worked on a symbol without CIDER being connected... My eyes widened, and my muscle memory twitched. ๐Ÿ™‚

๐Ÿ’™ 2
borkdude 2025-11-17T22:12:43.301519Z

@hhausman I've got this set up to combine lsp and CIDER for find-definition:

(defun find-definition ()
  "Try to find definition of cursor via LSP otherwise fallback to cider."
  (interactive)
  (let ((cursor (point))
        (buffer (current-buffer)))
    (lsp-find-definition)
    (when (and (eq buffer (current-buffer))
               (eq cursor (point)))
      (cider-find-var))
    ))

Harold 2025-11-17T22:13:21.540829Z

That's cute, and you bind that to M-.?

borkdude 2025-11-17T22:13:28.431649Z

and then:

(define-key clojure-mode-map (kbd "M-.") #'find-definition)

borkdude 2025-11-17T22:13:29.863989Z

yes

Harold 2025-11-17T22:13:43.617919Z

Thank you for that.

borkdude 2025-11-17T22:13:46.689589Z

and:

(define-key cider-mode-map (kbd "M-.") #'find-definition)
(define-key clojurec-mode-map (kbd "M-.") #'find-definition)
(define-key clojurescript-mode-map (kbd "M-.") #'find-definition)

borkdude 2025-11-17T23:08:26.717979Z

@ericdallo it's interesting you have a CSharp server. Are you using CSharp for anything?

ericdallo 2025-11-17T23:11:54.524539Z

I used for coding Unity developing games, but now I use Godot :)

๐Ÿ‘พ 2