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!
yes, sure! I will do a clojure-lsp release soon, but if that's already on clj-kondo master I can bump it already
it is! since two weeks. 6 commits ago or so
perhaps make a nightly job to bump kondo? would be awesome for early feedback on kondo too
Does the nightly lsp not already include the nightly kondo?
every push to clojure-lsp master releases a nightly, but I need to manually bump it
maybe a job or something would be nice, but not sure about automatically doing it
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? ๐
yeah, I think it makes sense, we could create a gh action for that, but not sure how unless in clj-kondo repo
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.
yeah that sounds interesting
Just pushed the bump, nightly in the way!
If unmatched parens are detected, the user should receive instructions for how to enable paredit ๐
and/or use https://github.com/borkdude/parmezan to ff-ing fix those copy/paste forgotten parens
because I have to disable paredit to make it let me fix it ;)
Hehe ๐
C-q (
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?
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.
That's the most annoying thing and I wish lsp-mode (or clojure-lsp?) would turn these bells and whistles off by default.
Perhaps a #good-first-issue for me. Thank you for confirming it. ๐
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)don't copy everything, but this is the relevant bit:
lsp-headerline-breadcrumb-enable niloh i tried to fight the file watches a while back. iโll take your fix here
> don't copy everything ๐ฎ
it watches everything. and you canโt specify two directories, you have to specify the ones you donโt want watched
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
It actually makes sense.
I agree it should be disabled by default, and I'm actually considering send a PR for it
My intuition is that the breadcrumbs should be displayed by default, but the 'show errors as squiggles on breadcrumb' should be opt-in
thatโs enabled by default in most clients right?
interesting @hhausman, they are very customizable tho
Instead we (probably you ๐ ) can make a "getting started section for emacs with good defaults" in the clojure-lsp repo
> they are very customizable tho Cool. I will look around.
itโs a sane default and invites people to customize their emacs config.
@dpsutton yeah, vscode's breadcrumb was my inspiration at the time
I don't see a breadcrumb though? just some files being highlighted in different colors, less intrusive
@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
personally I don't think the breadcrumb even without errors doesn't really help me during development, but people like different things
yeah, I myself disabled it years ago ๐
what do you use it for? I might learn something. aaah ok
it sounded a nice feature when me and @yyoncho created 5 years ago ๐
Got it: (setq lsp-headerline-breadcrumb-enable-diagnostics nil)
I guess the breadcrumb could help with navigation but I use dired for it
yeah, I can see usages for it, and there are lsp-mode users that use and love, I think it's just preferences
omg, I needed this: (add-hook 'lsp-after-apply-edits-hook (lambda (&rest _) (save-buffer)))
when renaming I had to save 20 buffers with save-some-buffers
It's time to create a var to do that in lsp-mode ๐
> @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. ๐
@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))
))That's cute, and you bind that to M-.?
and then:
(define-key clojure-mode-map (kbd "M-.") #'find-definition)yes
Thank you for that.
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)@ericdallo it's interesting you have a CSharp server. Are you using CSharp for anything?
I used for coding Unity developing games, but now I use Godot :)