Fork me on GitHub
#lsp
<
2021-06-01
>
jmayaalv10:06:43

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.

jmayaalv10:06:09

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

Luis Thiam-Nye10:06:16

Does it work on the version prior to the latest?

jmayaalv12:06:30

haven’t really tried, will try 🙂

jmayaalv10:06:41

i am running the latest clojure-lsp version

pithyless12:06:11

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.

Luis Thiam-Nye13:06:03

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

pithyless13:06:13

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

ericdallo15:06:06

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

ericdallo15:06:58

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

borkdude12:06:43

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

borkdude12:06:27

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

pithyless12:06:48

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) :)

borkdude12:06:28

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)

borkdude14:06:43

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

jmayaalv14:06:51

looks like. i’ll try with the latest jar.

jmayaalv14:06:23

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? 🤕

borkdude14:06:49

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

jmayaalv14:06:46

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

ericdallo15:06:21

@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

👍 3
ericdallo15:06:47

Fixed on master, I should release it soon

🧙 3
ericdallo16:06:00

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.

❤️ 18
jmayaalv23:06:17

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

👍 3
borkdude16:06:56

Thanks Eric!

👍 3
nonrecursive22:06:47

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?

nonrecursive22:06:02

for example I want all tests defined with deftest to appear

jcsims22:06:16

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

ericdallo22:06:43

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

nonrecursive22:06:24

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

nonrecursive22:06:42

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

ericdallo00:06:36

it should work, what on this test file is different from the working one?

nonrecursive03:06:59

There is so much crazy stuff going on in this project it could take some time to tease that out 🙂 if i come up with some minimal repro i’ll give an update

👍 3