lsp

:clojure-lsp: Clojure implementation of the Language Server Protocol: https://clojure-lsp.io/
2021-06-01T10:05:43.091700Z

lately i started to get

LSP :: `workspace/executeCommand' with `cursor-info' failed.

(error "The connected server(s) does not support method workspace/executeCommand.
To find out what capabilities support your server use 'M-x lsp-describe-session'

--
lsp--send-request-async: The connected server(s) does not support method textDocument/codeAction.
randomly in emacs.

2021-06-01T10:07:09.092800Z

what seems to work sometimes is to remove ~/.lsp but itโ€™s starting to get really painful. is there somethign else i could check?

2021-06-01T10:15:41.093500Z

i am running the latest clojure-lsp version

Luis Thiam-Nye 2021-06-01T10:49:16.093600Z

Does it work on the version prior to the latest?

2021-06-01T12:01:30.093800Z

havenโ€™t really tried, will try ๐Ÿ™‚

pithyless 2021-06-01T12:31:11.096300Z

Is there any way to configure LSP to differentiate references in test files? For example, I'd like to toggle lens mode to show 0 references if they only exist in test namespaces.

borkdude 2021-06-01T12:33:43.096800Z

@pithyless you could probably get this custom analysis using clj-kondo as a library as well.

borkdude 2021-06-01T12:34:27.097500Z

or using carve: in that case, only analyze the src folder and not the test folder

pithyless 2021-06-01T12:35:48.098900Z

yeah, this sounds like a use-case for carve (which I have not tried yet); it just came up b/c the lens is already there in front of me... and I was surprised by the behavior (until I realized that all the references are in a test namespace) :)

borkdude 2021-06-01T12:40:28.100Z

the use case makes sense though. perhaps you can also make an .lsp dir inside your test folder and ignore the test folder in the parent dir (not include it in the classpath of lsp)

Luis Thiam-Nye 2021-06-01T13:00:03.100100Z

I think clojure-lsp is already supposed to do this for the lens. I'm not sure what the requirements are though.

pithyless 2021-06-01T13:10:13.100500Z

Nice! But for some reason I'm not seeing that. clojure-lsp 2021.05.27-17.42.34

borkdude 2021-06-01T14:28:43.102700Z

Perhaps that's a reflection issue with GraalVM native-image?

2021-06-01T14:31:51.104Z

looks like. iโ€™ll try with the latest jar.

2021-06-01T14:39:23.105600Z

yep, it works fine with the jar. so definitely something weird going on with the native image. we are still on java 1.8. could it be related? ๐Ÿค•

borkdude 2021-06-01T14:39:49.105900Z

neh, it's a reflection config issue probably. @ericdallo

2021-06-01T14:40:46.106500Z

ok, @ericdallo let me know if you want me to raise an issue.

ericdallo 2021-06-01T15:11:21.106600Z

@jmayaalv it is related with graalvm reflection config and it started to happen with latest support of completion item Insert text feature on lsp-mode, I'll fix it

๐Ÿ‘ 1
ericdallo 2021-06-01T15:13:06.106800Z

@pithyless it should work if notice the reference is in a test file

ericdallo 2021-06-01T15:17:58.107Z

test file a mean, some file with contains _test. in their name

ericdallo 2021-06-01T15:50:47.107400Z

Fixed on master, I should release it soon

๐Ÿง™ 1
ericdallo 2021-06-01T16:44:00.108300Z

:clojure-lsp: Patch 2021.06.01-16.19.44 release: โ€ข Fix graalvm issue on completionItem InsertTextMode c/c @jmayaalv โ€ข Bump clj-kondo and rewrite-clj to latest releases.

โค๏ธ 6
borkdude 2021-06-01T16:45:56.108700Z

Thanks Eric!

๐Ÿ‘ 1
nonrecursive 2021-06-01T22:24:47.110Z

hey y'all, apologies is this is a poorly worded question but is there a way to have every def'd symbol appear in imenu with clojure-lsp?

nonrecursive 2021-06-01T22:25:02.110300Z

for example I want all tests defined with deftest to appear

jcsims 2021-06-01T22:43:16.110900Z

I think imenu just works for me at the moment, but don't know if lsp is giving the results or cider is, hmmm...

ericdallo 2021-06-01T22:44:43.111Z

@nonrecursive lsp-mode has a command I think to show symbols on imenu, did you try that?

nonrecursive 2021-06-01T22:48:24.111800Z

i see lsp-ui-imenu and the list displayed there is the same as the one displayed by counsel-imenu

nonrecursive 2021-06-01T22:48:42.112300Z

well this is strange, in one test namespace test symbols appear, but in another they don't

2021-06-01T23:14:17.112400Z

i can confirm that the problems is gone. thank you eric.

๐Ÿ‘ 1