lsp

:clojure-lsp: Clojure implementation of the Language Server Protocol: https://clojure-lsp.io/
anonimitoraf 2021-03-30T12:40:23.148200Z

I forgot the reason why workspace symbols need to be prefixed with clj?

ericdallo 2021-03-30T14:52:27.148900Z

They don't need anymore, it was fixed some releases ago:

anonimitoraf 2021-03-30T20:20:11.149400Z

Oh right. I'll try it out in a bit thanks! Out of curiosity, why was it needed before?

ericdallo 2021-03-31T21:49:21.175900Z

https://github.com/clojure-lsp/clojure-lsp/commit/f786f3386688d17fa30db59b96f717154d25376f 🙂 Available when happen the next release, thanks!

anonimitoraf 2021-03-31T21:49:37.176100Z

Damn, so quick. Thanks!

🤘 1
anonimitoraf 2021-03-31T21:50:42.176400Z

Weird, which part of the code actually fixed it? the reflect config?

ericdallo 2021-03-31T21:52:45.176700Z

exactly :man-shrugging:

ericdallo 2021-03-31T21:53:17.176900Z

that's why I'm adding more integration tests to get those kind of bugs that only happens on native compile images

anonimitoraf 2021-04-01T07:07:48.180900Z

Forgot to reply lol. I see. How did you find out that was it?

ericdallo 2021-04-01T13:22:38.181300Z

Because the java object was with all fields null, then I realized it was missing that java class on the reflect config

ericdallo 2021-03-30T20:28:13.149500Z

because it was filtering only on client side, clojure-lsp was returning all symbols ignoring the query

ericdallo 2021-03-30T20:28:25.149700Z

now, we filter on server side using a fuzzy match

ericdallo 2021-03-30T21:05:01.151800Z

:clojure-lsp: Released 2021.03.30-20.42.34 • Bump clj-kondo to 2021.03.22-20210327.192113-4 - Fixes https://github.com/clojure-lsp/clojure-lsp/issues/385 c/c @pez • Add support for outgoing call hierarchy 🎉 - Fixes https://github.com/clojure-lsp/clojure-lsp/issues/384 • Improve and fix missing completion item kinds (lsp-mode https://twitter.com/yonchovski/status/1376237915412574210) The outgoing call hierarchy is the inverse of the incoming call hierarchy, it show all the var usages that a the current function/var uses lazily and recursively

5
🎉 9
anonimitoraf 2021-03-30T21:29:20.152300Z

AH

anonimitoraf 2021-03-30T21:36:36.152500Z

Seems to be still needed for me (Just downloaded the latest today from https://github.com/clojure-lsp/clojure-lsp/releases/latest/download/clojure-lsp-native-linux-amd64.zip)

ericdallo 2021-03-30T21:37:29.152900Z

weird, is it not filtering anything?

anonimitoraf 2021-03-30T21:37:41.153100Z

Nope, unless I put in some prefix

anonimitoraf 2021-03-30T21:37:57.153300Z

anonimitoraf 2021-03-30T21:38:21.153700Z

Oh, do I have to wipe out my LSP/kondo database files?

ericdallo 2021-03-30T21:38:41.153900Z

not really, it should work :thinking_face:

ericdallo 2021-03-30T21:39:21.154100Z

Like this:

anonimitoraf 2021-03-30T21:39:37.154500Z

I wonder if it's a cljs thing. Let me try on a clj project

ericdallo 2021-03-30T21:39:57.154700Z

it worth the try

ericdallo 2021-03-30T21:40:23.154900Z

Could you post the output of lsp-clojure-server-info ?

anonimitoraf 2021-03-30T21:40:30.155100Z

Hmm, same behavior in a clj project

anonimitoraf 2021-03-30T21:40:49.155500Z

LSP :: {:project-root "file:///home/anonimito/sandbox/clojure-sandbox",
 :project-settings {:cljfmt {:indents {>defn [[:inner 0]]}}},
 :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 (`make debug-bin`)",
 :server-version "2021.03.30-20.42.34",
 :clj-kondo-version "2021.03.22-SNAPSHOT",
 :log-path "/tmp/clojure-lsp.3842339907995882215.out"}

ericdallo 2021-03-30T21:41:13.155700Z

it could be a graalvm error

ericdallo 2021-03-30T21:41:22.155900Z

let me test it with the native binary

ericdallo 2021-03-30T21:41:36.156100Z

also, check if there is any error on clojure-lsp std err buffer

anonimitoraf 2021-03-30T21:41:39.156300Z

Oh, how do I know if I'm using the graalvm one?

anonimitoraf 2021-03-30T21:42:02.156500Z

Empty clojure-lsp stderr

ericdallo 2021-03-30T21:42:23.156900Z

the native you downloaded is the graalvm one

anonimitoraf 2021-03-30T21:43:02.157200Z

Ah, how does one download a non-native one?

anonimitoraf 2021-03-30T21:43:16.157400Z

NVM, I see the releases have native in them

ericdallo 2021-03-30T21:43:36.157600Z

the only way is compiling manyally or download the deprecated clojure-lsp file from release

ericdallo 2021-03-30T21:43:45.157800Z

anything on the log?

/tmp/clojure-lsp.3842339907995882215.out

anonimitoraf 2021-03-30T21:44:14.158Z

Actually, I actually probably want a non-native one since I have long-running projects, right? Also, do you mean this is deprecated?

ericdallo 2021-03-30T21:44:45.158400Z

not really, the native one should work well for all project kinds

👍 1
ericdallo 2021-03-30T21:44:51.158600Z

yes, that one

anonimitoraf 2021-03-30T21:45:46.158800Z

2021-03-30T21:41:13.203Z home-desktop INFO [clojure-lsp.main:391] - Starting server...
2021-03-30T21:41:13.206Z home-desktop DEBUG [clojure-lsp.nrepl:24] - nrepl not found, skipping nrepl server start...
2021-03-30T21:41:13.211Z home-desktop INFO [clojure-lsp.main:293] - Initializing...
2021-03-30T21:41:13.670Z home-desktop INFO [clojure-lsp.crawler:162] - Paths analyzed, took 0.010028586 secs. Caching for next startups...
2021-03-30T21:41:13.670Z home-desktop DEBUG [clojure-lsp.main:?] - :initialize 458ms
2021-03-30T21:41:13.673Z home-desktop INFO [clojure-lsp.main:339] - Initialized!
2021-03-30T21:41:13.673Z home-desktop DEBUG [clojure-lsp.main:?] - :initialized 0ms
2021-03-30T21:41:13.679Z home-desktop DEBUG [clojure-lsp.main:?] - :didOpen 4ms
2021-03-30T21:41:13.684Z home-desktop DEBUG [clojure-lsp.main:?] - :documentSymbol 2ms
2021-03-30T21:41:13.684Z home-desktop DEBUG [clojure-lsp.main:?] - :documentSymbol 0ms
2021-03-30T21:41:13.685Z home-desktop DEBUG [clojure-lsp.main:?] - :documentHighlight 1ms
2021-03-30T21:41:13.685Z home-desktop DEBUG [clojure-lsp.main:?] - :documentHighlight 0ms
2021-03-30T21:41:13.690Z home-desktop DEBUG [clojure-lsp.main:?] - :codeAction 6ms
2021-03-30T21:41:13.690Z home-desktop DEBUG [clojure-lsp.main:?] - :codeAction 7ms
2021-03-30T21:41:13.782Z home-desktop DEBUG [clojure-lsp.main:?] - :documentHighlight 0ms
2021-03-30T21:41:13.783Z home-desktop DEBUG [clojure-lsp.main:?] - :codeAction 1ms
2021-03-30T21:41:15.672Z home-desktop DEBUG [clojure-lsp.main:?] - :workspaceSymbol 1ms
2021-03-30T21:41:17.295Z home-desktop DEBUG [clojure-lsp.main:?] - :workspaceSymbol 0ms
2021-03-30T21:41:17.447Z home-desktop DEBUG [clojure-lsp.main:?] - :workspaceSymbol 0ms
2021-03-30T21:41:17.631Z home-desktop DEBUG [clojure-lsp.main:?] - :workspaceSymbol 0ms
2021-03-30T21:41:17.719Z home-desktop DEBUG [clojure-lsp.main:?] - :workspaceSymbol 0ms
2021-03-30T21:41:17.895Z home-desktop DEBUG [clojure-lsp.main:?] - :workspaceSymbol 0ms
2021-03-30T21:41:18.087Z home-desktop DEBUG [clojure-lsp.main:?] - :workspaceSymbol 0ms
2021-03-30T21:41:18.215Z home-desktop DEBUG [clojure-lsp.main:?] - :workspaceSymbol 0ms
2021-03-30T21:41:35.140Z home-desktop DEBUG [clojure-lsp.main:?] - :documentHighlight 0ms
2021-03-30T21:41:35.141Z home-desktop DEBUG [clojure-lsp.main:?] - :hover 0ms
2021-03-30T21:41:35.141Z home-desktop DEBUG [clojure-lsp.main:?] - :codeAction 1ms
2021-03-30T21:41:39.055Z home-desktop INFO [clojure-lsp.producer:15] - {:type :info, :message "{:project-root \"file:///home/anonimito/sandbox/clojure-sandbox\",\n :project-settings {:cljfmt {:indents {>defn [[:inner 0]]}}},\n :client-settings\n {:dependency-scheme \"jar\",\n  :source-paths #{\"src\" \"test\"},\n  :macro-defs {},\n  :project-specs nil,\n  :cljfmt {:indents {}},\n  :document-formatting? true,\n  :document-range-formatting? true},\n :port \"NREPL only available on :debug profile (`make debug-bin`)\",\n :server-version \"2021.03.30-20.42.34\",\n :clj-kondo-version \"2021.03.22-SNAPSHOT\",\n :log-path \"/tmp/clojure-lsp.3842339907995882215.out\"}\n"}

anonimitoraf 2021-03-30T21:46:06.159Z

There seems to be no log messages for when I start typing a search term

ericdallo 2021-03-30T21:46:20.159300Z

seems correct, actually the workspaceSymbol request is to fast

ericdallo 2021-03-30T21:46:35.159500Z

mine take ~30ms

anonimitoraf 2021-03-30T21:46:49.159700Z

OH wait, right, I see it. This is a minimal clj sandbox though

ericdallo 2021-03-30T21:47:02.159900Z

yeah, maybe is that

ericdallo 2021-03-30T21:47:16.160100Z

I'll test with a local native compiled clojure-lsp, one sec

👍 1
anonimitoraf 2021-03-30T21:47:27.160400Z

No rush and thanks

ericdallo 2021-03-30T21:47:31.160600Z

meanwhile, could you check the server/client json communication?

ericdallo 2021-03-30T21:47:39.160800Z

you can see that with:

ericdallo 2021-03-30T21:48:08.161Z

• set (setq lsp-log-io t) • then lsp-workspace-show-log

👍 1
ericdallo 2021-03-30T21:48:20.161200Z

and reproduce the issue and get the log

ericdallo 2021-03-30T21:51:06.161500Z

Yeah, I could reproduce the issue with the native one

ericdallo 2021-03-30T21:51:14.161700Z

I'll debug more

anonimitoraf 2021-03-30T21:51:51.162300Z

anonimitoraf 2021-03-30T21:52:18.162700Z

(It seems to not debounce, I'm seeing queries for t, tr, try, etc so I just posted the last one)

anonimitoraf 2021-03-30T21:52:51.162900Z

Oh I see. Thanks. BTW, no rush or anything. It's the most minor inconvenience in the world.

👍 1
ericdallo 2021-03-30T21:53:46.163100Z

the debounce is something that lsp-mode should improve but is not the issue here

ericdallo 2021-03-30T21:54:01.163400Z

thanks for finding it 🙂

👍 1
anonimitoraf 2021-03-30T21:54:29.163600Z

Yes, just justifying why I included just the last workspaceSymbol query 🙂

😅 1