lsp

:clojure-lsp: Clojure implementation of the Language Server Protocol: https://clojure-lsp.io/
zane 2021-02-21T00:01:29.034700Z

How do I retrieve the client <-> server log?

ericdallo 2021-02-21T00:02:28.034900Z

check the lsp-log-io section: https://emacs-lsp.github.io/lsp-mode/page/troubleshooting/

zane 2021-02-21T00:11:53.035200Z

Thanks. Filed here: https://github.com/clojure-lsp/clojure-lsp/issues/332

ericdallo 2021-02-21T00:14:46.035500Z

Thank you!

nmkip 2021-02-21T01:14:20.038600Z

Hi!! Is there to turn off lsp-headerline-breadcrumb-mode? I copied this from the docs and the breadcrumb mode is enabled by default in my clojure buffers.

(use-package lsp-mode
    :ensure t
    :hook ((clojure-mode . lsp)
           (clojurec-mode . lsp)
           (clojurescript-mode . lsp))
    :config
    ;; add paths to your local installation of project mgmt tools, like lein
    (setenv "PATH" (concat
                    "/usr/local/bin" path-separator
                    (getenv "PATH")))
    (dolist (m '(clojure-mode
                 clojurec-mode
                 clojurescript-mode
                 clojurex-mode))
      (add-to-list 'lsp-language-id-configuration `(,m . "clojure")))
    (setq lsp-clojure-server-command '("bash" "-c" "clojure-lsp"))
    (lsp-headerline-breadcrumb-mode nil)) 
I guess I can add a hook and toggle it.

ericdallo 2021-02-21T01:15:45.038700Z

Yes, you can (setq lsp-headerline-breadcrumb-enable nil)

ericdallo 2021-02-21T01:15:59.038900Z

For more details, check https://emacs-lsp.github.io/lsp-mode/tutorials/how-to-turn-off/

nmkip 2021-02-21T01:21:05.039300Z

Oh, I saw that variable but I thought it kept the mode enabled with the breadcrumbs invisible. Ill try it.

nmkip 2021-02-21T01:21:10.039500Z

thanks

nmkip 2021-02-21T01:23:47.039700Z

works great

ericdallo 2021-02-21T01:28:55.039900Z

๐Ÿ™‚

nmkip 2021-02-21T03:31:34.040800Z

Does clojure-lsp conflict in any way with clj-refactor?

ericdallo 2021-02-21T03:34:30.040900Z

LSP replace most clj-refactor features, and AFAIK only conflicts with creating a new ns which can be solved like this tutorial explains: https://emacs-lsp.github.io/lsp-mode/tutorials/clojure-guide/

nmkip 2021-02-21T03:35:41.041200Z

Yeah, I noticed similar functions. I might just replace clj-refactor with LSP.

nmkip 2021-02-21T03:38:37.041400Z

Thanks again ๐Ÿ˜„

๐Ÿ‘ 1
ericdallo 2021-02-21T13:10:03.042400Z

Thank you for the sponsor @nicdaoraf โค๏ธ

anonimitoraf 2021-02-21T14:22:37.046500Z

No worries ๐Ÿ™‚ I appreciate all your efforts I'd contribute with code if I could but currently have a full-time job and a startup-ish with a friend

ericdallo 2021-02-21T14:23:13.046800Z

No problem, that support already helps a lot ๐Ÿ˜‰

1
borkdude 2021-02-21T15:39:15.048800Z

lsp-mode becomes unbearably slow for me when developing clj-kondo itself (e.g. in clj_kondo/impl/analyzer.clj). So slow that I have to turn it off unfortunately, because I can't even type anymore :(

ericdallo 2021-02-21T15:39:56.049100Z

There are a lot of things that may cause that: https://emacs-lsp.github.io/lsp-mode/page/performance/

ericdallo 2021-02-21T15:40:58.049400Z

Like, emacs version, lsp-doctor, and other missing tweaks

borkdude 2021-02-21T15:42:05.049600Z

I'll try

borkdude 2021-02-21T15:44:10.049800Z

It's a big file though, 2000 lines almost.

ericdallo 2021-02-21T15:44:54.050Z

Yeah, I'm trying here but it works for me well There is something that we could improve though related to file changes

ericdallo 2021-02-21T15:45:48.050200Z

but it's a corner case only when changing a function arity (that will trigger other scans in references), it should not make the experience that bad

ericdallo 2021-02-21T15:46:51.050600Z

BTW, i use Emacs Gcc, which is very fast compared with other emacs versions

borkdude 2021-02-21T15:46:56.050800Z

I have emacs 27.1 with native json support and checked most of these things, still very slow

ericdallo 2021-02-21T15:47:26.051100Z

Chech the /tmp/clojure-lsp.out log, we print the ms of each lsp function

ericdallo 2021-02-21T15:47:39.051300Z

otherwise is a lsp-mode issue

borkdude 2021-02-21T15:47:40.051500Z

I mean, so slow that my CPU fans are making noise and I can't do anything

borkdude 2021-02-21T15:49:48.051700Z

I am watching this:

$ tail -f /tmp/clojure-lsp.out
2021-02-20T11:32:36.922Z MBP2019.local INFO [clojure-lsp.main:350] - Shutting down
2021-02-20T11:32:37.213Z MBP2019.local INFO [clojure-lsp.main:355] - Exit
Nothing to see here?

ericdallo 2021-02-21T15:50:46.051900Z

this looks a old session log

ericdallo 2021-02-21T15:50:53.052100Z

check lsp-clojure-server-info

ericdallo 2021-02-21T15:51:02.052300Z

it should has a log-path

borkdude 2021-02-21T15:51:40.052500Z

{:project-root "file:///Users/borkdude/Dropbox/dev/clojure/clj-kondo",
 :project-settings {:auto-add-ns-to-new-files? false},
 :client-settings
 {:dependency-scheme "jar",
  :source-paths #{"src" "test"},
  :macro-defs {},
  :project-specs nil,
  :cljfmt {:indents {}},
  :document-formatting? true,
  :document-range-formatting? true},
 :port "NREPL only available on :debug profile compiled binary",
 :version "2021.02.19-00.19.27",
 :log-file
 "/var/folders/2m/h3cvrr1x4296p315vbk7m32c0000gp/T/clojure-lsp.3323505275673554799.out"}

ericdallo 2021-02-21T15:52:07.052700Z

tail log-file and reproduce the slowness

borkdude 2021-02-21T15:53:50.052900Z

https://gist.github.com/borkdude/9162c9bed4fca8722f7ca964244d82ea :didChange 14 seconds?

ericdallo 2021-02-21T15:53:59.053100Z

yeah, that's the issue

ericdallo 2021-02-21T15:54:05.053300Z

for me takes 1s though

ericdallo 2021-02-21T15:54:16.053500Z

it was a recent feature

ericdallo 2021-02-21T15:54:49.053700Z

When you change a function arity, it re scan all the references of that file

ericdallo 2021-02-21T15:55:08.053900Z

I tested with your analyze-children function and it took 1s

ericdallo 2021-02-21T15:55:45.054100Z

This slowness happens only when changing function arity? otherwise it could be a performance issue on clojure-lsp

borkdude 2021-02-21T15:55:57.054300Z

For example I'm just editing the comment form at the bottom of the file and I tried typing (+ 1 2 3):

(comment
  (+    )
  (parse-string "#js [1 2 3]"))
It takes 14 seconds before the space shows up

ericdallo 2021-02-21T15:56:34.054500Z

It's a performance issue indeed, we should not re analyze anything in this case

ericdallo 2021-02-21T15:56:56.054700Z

I'll add a feature flag for that disabled by default and focus on improve it soon

ericdallo 2021-02-21T15:57:01.054900Z

that should fix for your case for now

borkdude 2021-02-21T15:57:50.055200Z

Can't linting / analyzing be async? It should never slow down my typing imo.

ericdallo 2021-02-21T15:58:17.055400Z

In clojure-lsp yes, it could

ericdallo 2021-02-21T15:58:24.055600Z

this could be another improvement indeed

borkdude 2021-02-21T16:02:45.055800Z

The question is also, why does it take 14 seconds ....

:didChange 14192ms
If I lint this file using clj-kondo only it takes 1 second:
$ time clj-kondo --config '{:output {:analysis {:locals true :keywords true} :format :edn}}' --lint src &gt; /dev/null
clj-kondo --config  --lint src &gt; /dev/null   1.08s  user 0.12s system 99% cpu 1.212 total

borkdude 2021-02-21T16:02:52.056Z

(this is for all of the source dir even)

ericdallo 2021-02-21T16:03:34.056200Z

We lint all the reference files

ericdallo 2021-02-21T16:03:52.056400Z

this way if user go to a referenced file and the function arity was changed it will have the most updated lint

borkdude 2021-02-21T16:03:53.056600Z

Why is this? They didn't change?

ericdallo 2021-02-21T16:04:01.056800Z

imagine this case:

ericdallo 2021-02-21T16:05:12.057Z

I have a.clj:

(defn foo [a b])
b.clj
(foo 1 2)
If I change the arity of foo, I want clj-kondo warn that (foo 1 2) has another arity now

ericdallo 2021-02-21T16:05:38.057200Z

if we don't do that, user will notice that only if enter on b.clj change the buffer, and clj-kondo relint b.clj and notice that the arity changed

borkdude 2021-02-21T16:05:38.057400Z

yes, of course, clj-kondo already takes care of this itself.

borkdude 2021-02-21T16:06:11.057600Z

imo you should only lint/analyze the current file

ericdallo 2021-02-21T16:06:35.057800Z

but if analyze only the current file, clj-kondo will not return findings of the other files

borkdude 2021-02-21T16:06:38.058Z

this is what clj-kondo itself has been doing, and lint warnings you will get when you visit the other files, because it persists through the cache

ericdallo 2021-02-21T16:06:39.058200Z

if I lint with text

ericdallo 2021-02-21T16:06:55.058400Z

let me test it so

ericdallo 2021-02-21T16:07:14.058600Z

But this is a old clojure-lsp issue

borkdude 2021-02-21T16:07:17.058800Z

why should clj-kondo returning warnings for other files? you will see those warnings when you visit the other file

ericdallo 2021-02-21T16:07:42.059Z

not really, because the diagnostics are not updated when visiting a file

ericdallo 2021-02-21T16:07:57.059200Z

only when changing it

ericdallo 2021-02-21T16:08:19.059400Z

what we would need to do is: when changing a.clj publish diagnostics for b.clj also

borkdude 2021-02-21T16:08:37.059600Z

I am not interested in seeing lint warnings for other files than the current one. Supporting that is way too unperformant, this is why clj-kondo doesn't do that. If I opt out of linting via lsp-mode I also want to opt out of this slow behavior

ericdallo 2021-02-21T16:09:38.059800Z

yeah, that should be considered too, I'll disable that as default, we may need to think more about that as a improvement

borkdude 2021-02-21T16:11:50.060Z

For now I'll have to disable lsp-mode for this project, as it's not workable unfortunately. Maybe I can see what clojure-lps is analyzing? Maybe it tries to analyze all my deps as well, by accident? This takes about 5-10 seconds on my machine

borkdude 2021-02-21T16:14:19.060500Z

I was going to look into the arglist issue for you, but this is now taking up my time instead ;)

ericdallo 2021-02-21T16:14:27.060700Z

I'm adding a flag to that right now, disabled as default

borkdude 2021-02-21T16:14:33.060900Z

I'lll work on the arglist issue first

ericdallo 2021-02-21T16:14:37.061100Z

hahaha,sorry about that

borkdude 2021-02-21T16:15:08.061300Z

can you also add the analyzed files to the log output perhaps?

borkdude 2021-02-21T16:15:43.061500Z

I'll then try that from a branch which I will compile locally

ericdallo 2021-02-21T16:15:48.061700Z

Yes, I can add a debug log

ericdallo 2021-02-21T16:21:35.062300Z

Oh, somehow I could reproduce the 14s issue

ericdallo 2021-02-21T16:21:48.062500Z

that's incredible not usable hahaha

ericdallo 2021-02-21T16:22:02.062700Z

the issue is waiting sync for analyzing each reference indeed

ericdallo 2021-02-21T16:22:14.062900Z

well, will commit the log with the flag turned off

ericdallo 2021-02-21T16:23:32.063100Z

I noticed a bug on that, we are analysing the same uri multiple times ๐Ÿ™‚

borkdude 2021-02-21T16:24:38.063500Z

Maybe you can also apply some debouncing, e.g. when the user types again, the previous requests get cancelled?

ericdallo 2021-02-21T16:25:09.063900Z

lsp-mode should already handles that

borkdude 2021-02-21T16:25:15.064100Z

ok

ericdallo 2021-02-21T16:30:36.064800Z

Also I found that the didChange on clojure-lsp could be complete async (confirming with lsp-mode folks)

ericdallo 2021-02-21T16:34:51.065800Z

https://github.com/clojure-lsp/clojure-lsp/pull/334

borkdude 2021-02-21T16:52:28.066100Z

@ericdallo This was added by snoe: https://github.com/clojure-lsp/clojure-lsp/issues/324#issuecomment-782887656 Isn't this what you need here?

ericdallo 2021-02-21T16:52:58.066800Z

@borkdude yes, I use that, but is not the same

ericdallo 2021-02-21T16:53:09.067Z

that return all the available signatures for a function

ericdallo 2021-02-21T16:53:17.067200Z

we'd need each arg of a signature

ericdallo 2021-02-21T16:53:49.067400Z

to know if user is hovering over a or b ins a (foo 1 2)function

ericdallo 2021-02-21T16:54:24.067700Z

from a (defn foo [a b]) var-definition

borkdude 2021-02-21T16:54:48.067900Z

so you need the locations, or only the list? if you need only the list, I think you can parse the arglist-strs as edn?

ericdallo 2021-02-21T16:55:43.068100Z

hum, I think parsing would solve, not sure it'd solve for all cases (`& rest`)

borkdude 2021-02-21T16:56:31.068300Z

user=&gt; (edn/read-string "[a b {:keys [:foo]}]")
[a b {:keys [:foo]}]
user=&gt; (edn/read-string "[a b &amp; xs]")
[a b &amp; xs]

borkdude 2021-02-21T16:58:01.068500Z

I think it could maybe fail on this:

user=&gt; (edn/read-string "[{::str/keys [:x]}]")
Execution error at user/eval14 (REPL:1).
Invalid token: ::str/keys
but this is such a niche use case that you could maybe not support this one

borkdude 2021-02-21T16:59:00.068700Z

but we could also change :arglist-strs to [["x" "y"]] instead of [["x y"]], would that make sense?

ericdallo 2021-02-21T16:59:16.069Z

what we would need is a list of the args like ["a" "b" "&amp; rest"] this way I can count the children of the function usage with rewrite-clj and get the arg name via the index

borkdude 2021-02-21T16:59:57.069200Z

yeah, I think you should just skip the &amp; as this is a special case

ericdallo 2021-02-21T17:00:01.069400Z

(foo 1 2) => 2 children then I could (nth paramters (-&gt; children dec))

borkdude 2021-02-21T17:00:08.069600Z

so just parse to EDN and filter on &amp; should work for 99% of cases

ericdallo 2021-02-21T17:00:27.069800Z

I think so

ericdallo 2021-02-21T17:00:31.070Z

I'll give a try

borkdude 2021-02-21T17:01:21.070500Z

Edamame also works here btw, you can resolve aliases to a dummy namespace

borkdude 2021-02-21T17:02:13.070700Z

edamame already comes with clj-kondo as a dependency

borkdude 2021-02-21T17:03:34.070900Z

user=&gt; (e/parse-string "{::str/keys [:a]}" {:auto-resolve (fn [ns] (symbol ns))})
#:str{:keys [:a]}

borkdude 2021-02-21T17:04:19.071100Z

or even:

user=&gt; (e/parse-string "{::str/keys [:a]}" {:auto-resolve (fn [ns] (symbol (str ":" ns)))})
#::str{:keys [:a]}
to fake it more ;)

ericdallo 2021-02-21T17:04:43.071300Z

nice, this should work

ericdallo 2021-02-21T17:12:03.071500Z

I''ll merge the performance fix, made some tests and it really improved the performance for analyzer/impl.clj file ๐Ÿ™‚

borkdude 2021-02-21T17:13:57.071700Z

๐Ÿ˜…

ericdallo 2021-02-21T17:43:39.071900Z

That works like a charm https://github.com/clojure-lsp/clojure-lsp/issues/324#issuecomment-782889893 โœจ

ericdallo 2021-02-21T17:43:48.072200Z

Thank you!

borkdude 2021-02-21T17:45:52.072400Z

I'm not sure what the referenced commit below that comment here does: https://github.com/dharrigan/clojure-lsp/commit/581263159654838a7a0d5c6b8f1ec65977aba907 It seems like you're parsing the arglists yourself?

ericdallo 2021-02-21T17:59:01.072900Z

Yeah, I don't get it that commit too ๐Ÿ˜… it seems @dharrigan made a rebase with his branch and because of the

Fixes clojure-lsp#324
comment it linked it somehow

ericdallo 2021-02-21T17:59:28.073100Z

but that was done before our conversation of today @borkdude

borkdude 2021-02-21T18:50:16.073400Z

ah ok

ericdallo 2021-02-21T21:41:00.075600Z

:clojure-lsp: Released https://github.com/clojure-lsp/clojure-lsp/releases/tag/2021.02.21-21.02.51 of clojure-lsp adding support for signatureHelp ๐ŸŽ‰

3
anonimitoraf 2021-02-22T08:17:33.098900Z

Hmm, I don't seem to have the signature help. Even despite stealing this from your dotfiles @ericdallo (setq lsp-signature-function 'lsp-signature-posframe) Also, how do I remove the file paths? (You don't have them)

ericdallo 2021-02-22T10:57:07.100200Z

That doesn't look signature help, but hover request. Try lsp-signature-activate and ame sure your have posframe installed with that config of mine

1
anonimitoraf 2021-02-22T11:35:31.100400Z

Ah! It works I see. I had the expectation that it would come up automatically without having to invoke anything.

borkdude 2021-02-22T11:37:01.100800Z

yeah, that's what I would expect too, like in cider

anonimitoraf 2021-02-22T11:37:05.101Z

Is there a way to edit the faces so that the current arg is colored more obviously?

ericdallo 2021-02-22T11:38:55.101500Z

Tรด come automatically we d need to pass to client a character that it'll know that should show the signature

ericdallo 2021-02-22T11:39:04.101700Z

Like ( for java constructors

anonimitoraf 2021-02-22T11:39:18.101900Z

> yeah, that's what I would expect too, like in cider Oh, I didnt know cider does this ๐Ÿ˜ฎ

ericdallo 2021-02-22T11:39:29.102100Z

But in clojure there isn't a character common for that

borkdude 2021-02-22T11:40:23.102300Z

Maybe check in cider.el how they are doing this?

ericdallo 2021-02-22T11:40:57.102500Z

Cider is specific for clojure, they are probably checking if it's a function arg

ericdallo 2021-02-22T11:41:06.102700Z

Lsp must be generic :/

ericdallo 2021-02-22T11:41:40.102900Z

Sรณ client doesn't know that, it can only pass the character that user is inputting

borkdude 2021-02-22T11:41:44.103100Z

ah yes, I see, you are not controlling the client

anonimitoraf 2021-02-22T11:42:20.103300Z

Ah, I see. Performance-aside, it can be "every char" being typed?

ericdallo 2021-02-22T11:42:21.103500Z

Exactly, the lap client is generic for multiple languages, so it can only do things that follow the lsp spec

ericdallo 2021-02-22T11:43:03.103800Z

Yes @nicdaoraf, but that would show the signature everytime, even on non sense places

anonimitoraf 2021-02-22T11:43:35.104Z

nonsense places like fns without overloads?

ericdallo 2021-02-22T11:44:20.104200Z

Like, show the signature in every keystroke

anonimitoraf 2021-02-22T11:46:14.104400Z

Right. Actually, I write a lot of Typescript (usually via vscode) and signature help auto-pops up. But I've realized that the trigger char is probably , myFunc(arg1, arg2, arg3)

anonimitoraf 2021-02-22T11:47:39.104700Z

Ok, anyways, workflow optimization that is probably not worth the effort* ๐Ÿ™‚ C-S SPC isn't hard at all to press. So thanks for the explanation

ericdallo 2021-02-22T11:48:22.105Z

Yeah, I agree that would perfect for clojure, but I could not find a character that makes sense

ericdallo 2021-02-22T11:48:44.105200Z

( probably is another trigger char for ts

anonimitoraf 2021-02-22T11:49:34.105400Z

Actually, can't ( be the trigger for Clojure too?

ericdallo 2021-02-22T11:49:57.105600Z

No, because the function comes after it not before

ericdallo 2021-02-22T11:50:14.105800Z

Sรณ we wouldn't know the function name when typed (

anonimitoraf 2021-02-22T11:50:53.106Z

Ah, I see. I guess they didnt have Lisps in mind when they designed the protocol (I mean MS)

ericdallo 2021-02-22T11:51:20.106200Z

I can re check the spec but I could not find anything to work that with clojure

anonimitoraf 2021-02-22T11:52:15.106400Z

Is this it?

ericdallo 2021-02-22T11:52:59.106900Z

Hum, maybe we could use ( as trigger and space as retrigger?

ericdallo 2021-02-22T11:53:03.107100Z

Yes

borkdude 2021-02-22T11:53:10.107300Z

yeah :)

ericdallo 2021-02-22T11:53:12.107500Z

Also not sure the context field can help us

anonimitoraf 2021-02-22T11:53:57.107800Z

> Hum, maybe we could useย `(`ย as trigger and space as retrigger? But as you said, you don't know the function name yet when you're only at (?

borkdude 2021-02-22T11:54:26.108Z

setup at (, trigger at space, is this possible?

ericdallo 2021-02-22T11:54:56.108200Z

I think if server return nil ( when don't know the function) a retrigger will no twork

ericdallo 2021-02-22T11:55:01.108400Z

But I can test it

borkdude 2021-02-22T11:55:17.108700Z

maybe the server can remember some kind of state, the user typed '(` and then the next space will return something?

borkdude 2021-02-22T11:55:23.108900Z

sounds brittle

ericdallo 2021-02-22T11:55:31.109100Z

As a retrigger probably works only when user close the window but the signature is valid

ericdallo 2021-02-22T11:56:18.109300Z

Yeah, that could leave to false positives, thats why we should use the client info, the context field maybe can be hacked to make that work

anonimitoraf 2021-02-22T11:57:08.109500Z

TLDR for context field?

ericdallo 2021-02-22T11:57:49.110300Z

Is a field containing the information about the current signature, maybe can help us Check the spec for more info

๐Ÿ‘ 1
borkdude 2021-02-22T11:59:32.110800Z

@ericdallo clojure-lsp also has a rewrite-clj representation of the AST right? Can you use this to scan backwards to see which function call you are in (if any)?

1
ericdallo 2021-02-22T13:26:20.119900Z

We already do that, we scan backward to get the function name, but when user type ( the function name doesn't exists yet, but when one type a space, it should exists

๐ŸŽฏ 1
borkdude 2021-02-21T21:47:29.076200Z

@ericdallo I am trying it now. Performance seems better now in the big analyzer.clj file in clj-kondo. But when I type 1111 and keep typing ones in the comment block at the bottom, it's still lagging, i.e. it slows down my typing. Is there something that can be done about this?

borkdude 2021-02-21T21:48:38.076400Z

It's as if I'm connected to a remote terminal with half a second of network lag. I think an editor tool should never slow the user down while typing.

ericdallo 2021-02-21T21:50:57.076700Z

in clojure-lsp logs is there any method taking to much time? It turns out didChange is a notification and don't block user input, I suggest you follow performance section on lsp-mode as well

borkdude 2021-02-21T21:51:59.076900Z

I have already gone through this

borkdude 2021-02-21T21:52:12.077100Z

I'll check the logs

borkdude 2021-02-21T21:53:37.077300Z

borkdude 2021-02-21T21:55:00.077700Z

but since you could reproduce my previous issue, I suspect you will be able to reproduce this one too. it's the same, only less slow

borkdude 2021-02-21T21:56:28.078Z

2021-02-21T21:56:05.528Z MBP2019.local DEBUG [clojure-lsp.main:?] - :completion 329ms
2021-02-21T21:56:05.528Z MBP2019.local DEBUG [clojure-lsp.main:?] - :completion 330ms
2021-02-21T21:56:05.671Z MBP2019.local DEBUG [clojure-lsp.main:?] - :didChange 472ms

borkdude 2021-02-21T21:58:52.078300Z

I tried finding the notify-references-on-change flag to see if I could turn this off but I can't find it anywhere in the code

borkdude 2021-02-21T22:00:33.078500Z

Don't get me wrong, I think clojure-lsp is awesome but I will turn it off in clj-kondo again now, just can't work like this in this project.

ericdallo 2021-02-21T22:02:39.079Z

I will try to reproduce it, this is not normal

ericdallo 2021-02-21T22:07:17.079200Z

notify-references-on-change is already off by default

borkdude 2021-02-21T22:07:41.079400Z

Thanks a lot in advance. About the signatureHelp: does this also work without lsp-ui? E.g. show it in the mini-buffer, like cider does?

2021-02-21T22:18:26.080400Z

I'm trying to force lsp to work with .cljc files

2021-02-21T22:18:35.080600Z

unsuccessfully

2021-02-21T22:18:42.080800Z

; (

ericdallo 2021-02-21T22:20:35.080900Z

What is your issue @huxley ?

ericdallo 2021-02-21T22:21:03.081100Z

Yes, by default it uses emacs lv to show in the bottoom similar to eldoc

2021-02-21T22:21:41.081300Z

2021-02-21T22:22:06.081700Z

in files other than .cljc works like gold

borkdude 2021-02-21T22:22:25.081900Z

don't really see anything :/

ericdallo 2021-02-21T22:22:34.082100Z

I think you need to configure lsp-mode

ericdallo 2021-02-21T22:22:42.082300Z

doom-emacs/spaceemacs already do that

ericdallo 2021-02-21T22:22:53.082500Z

how you are configuring lsp-mode? use-package?

borkdude 2021-02-21T22:23:25.082800Z

should I install anything else beyond lsp-mode?

ericdallo 2021-02-21T22:23:35.083Z

you need to trigger it manually with lsp-signature-activate

ericdallo 2021-02-21T22:24:49.083200Z

or set lsp-signature-auto-activate to :after-completion to show after completion

2021-02-21T22:25:27.083500Z

I use doom emacs

2021-02-21T22:25:58.083700Z

(use-package! lsp-mode
  :defer t
  :config
  (setq! lsp-ui-sideline-enable t
         lsp-symbol-highlighting-skip-current nil
         lsp-vetur-language-features-code-actions nil
         lsp-ui-sideline-actions-icon nil
         lsp-ui-sideline-show-code-actions nil)
  (pushnew! lsp-file-watch-ignored-directories
            "[/\\\\]\\.cpcache\\'"
            "[/\\\\]\\.shadow-cljs\\'"
            "[/\\\\]\\resources\\'")
  (set-face-foreground 'lsp-face-highlight-read nil)
  (set-face-background 'lsp-face-highlight-read nil)
  (set-face-attribute 'lsp-face-highlight-read nil :weight 'extra-bold)
  (set-face-background 'markdown-code-face nil))

borkdude 2021-02-21T22:26:06.083900Z

wow, cool, thanks

2021-02-21T22:26:19.084100Z

I don't have anything else

ericdallo 2021-02-21T22:27:04.084300Z

try adding :hook ((clojure-mode . lsp)

ericdallo 2021-02-21T22:27:18.084500Z

or :hook ((clojurec-mode . lsp)

ericdallo 2021-02-21T22:28:04.084700Z

BTW the performance adding 1 looks normal to me, but not sure realted to emacsGcc good performance

borkdude 2021-02-21T22:28:24.084900Z

Press 1 and hold the key

ericdallo 2021-02-21T22:29:04.085100Z

that's what I did

2021-02-21T22:29:25.085300Z

works, thanks!

2021-02-21T22:30:06.085500Z

I thought there was nothing but lsp-mode, but there is also lsp itself

๐Ÿ‘ 1
ericdallo 2021-02-21T22:30:11.085700Z

Actually it looks the same performance if LSP is disabled

ericdallo 2021-02-21T22:30:41.086Z

probably this is missing from doom config

2021-02-21T22:30:41.086200Z

btw, writing in clojure was awesome, but with lsp it's even better ; )

ericdallo 2021-02-21T22:30:54.086400Z

thanks ๐Ÿ™‚

ericdallo 2021-02-21T22:31:33.086600Z

Not sure what we could do to improve that, the logs looks ok to me

ericdallo 2021-02-21T22:31:46.086800Z

I'd suggest asking help on lsp-mode discord ๐Ÿ˜•

ericdallo 2021-02-21T22:32:23.087100Z

@yyoncho knows better ways to trace those performance issues on Emacs

borkdude 2021-02-21T22:32:33.087600Z

you are inside the clj-kondo project in analyzer.clj (about 2000 lines long)?

ericdallo 2021-02-21T22:32:44.087800Z

Yep, on the comment section

2021-02-21T22:32:56.088Z

you're welcome

borkdude 2021-02-21T22:33:24.088200Z

ok, I'll try on discord later this week, thanks

๐Ÿ‘ 1
ericdallo 2021-02-21T22:55:51.089200Z

clojure-lsp is on Github trending repos of Clojure ๐Ÿ˜„ ๐ŸŽ‰ :clojure-lsp: Thanks all! https://github.com/trending/clojure?since=monthly

1
๐ŸŽ‰ 3
zane 2021-02-21T23:50:52.089900Z

I donโ€™t think thatโ€™s missing from Doom. @huxley, did you add (clojure +lsp) to init.el in addition to lsp?

โ˜๏ธ 1