lsp

:clojure-lsp: Clojure implementation of the Language Server Protocol: https://clojure-lsp.io/
ericdallo 2021-02-19T00:38:29.208200Z

:clojure-lsp: Hey all, https://github.com/clojure-lsp/clojure-lsp/releases/tag/2021.02.19-00.19.27 clojure-lsp version should fix the issue with completing non valid code like foo/ or (foo/) without the need of adding the first letter (foo/b) πŸŽ‰

1
πŸŽ‰ 6
anonimitoraf 2021-02-19T09:09:47.209100Z

Thanks so much @ericdallo @borkdude and all others involved πŸ™‚

borkdude 2021-02-19T09:55:33.209300Z

@ericdallo The completion is not working for me.., not even when I type a letter. On the other hand, it does also not create a sqlitedb for me, nor does it ask to import the project

anonimitoraf 2021-02-19T10:07:12.210100Z

Oh, I thought it completes sometimes for me but it turns out, it's completing keywords (used elsewhere)

ericdallo 2021-02-19T11:07:00.211700Z

@borkdude are you testing in a project or a tmp file? We don't create a analysis cache if is not a project and lsp-mode doesn't ask for the project root if you already informed it previous, you can try lsp-workspace-folders-remove

ericdallo 2021-02-19T11:07:26.211900Z

Also lsp-mode has a cache for completions, but should not a be a problem I think

borkdude 2021-02-19T11:09:10.212300Z

Thank you. Yes, I'm often editing scripts in a tmp folder. This is what I do a lot with babashka.

borkdude 2021-02-19T11:09:46.212500Z

lsp-workspace-folders-remove helped, thanks a bunch! I almost made a Youtube video about clojure-lsp this morning, but I got into these problems, so I switched to another topic. Maybe another time!

borkdude 2021-02-19T11:10:30.212700Z

I was thinking we could maybe add babashka-specific support. Whenever you have a shebang or something, it will automatically include analysis for the libs inside babashka?

borkdude 2021-02-19T11:11:26.212900Z

Or maybe a more general solution for other projects as well.

ericdallo 2021-02-19T11:11:29.213100Z

Hahaha nice! It probably could be done :) We could have a classpath-cmd default for babashka scripts

borkdude 2021-02-19T11:11:35.213300Z

yeah!

ericdallo 2021-02-19T11:12:12.213500Z

Is there any way to get the babashka deps just checking some file or something like that? Or maybe a babashka deps?

borkdude 2021-02-19T11:13:32.213700Z

I think using a deps.edn with these deps: https://github.com/babashka/babashka/blob/master/deps.edn#L15-L37 should do the trick. You don't need sci since that's not exposed inside babashka.

borkdude 2021-02-19T11:14:19.214100Z

I will make a list of the libs that are available in bb itself

ericdallo 2021-02-19T11:14:46.214300Z

Yes, that would be great, so we could get those deps via bb

anonimitoraf 2021-02-19T11:15:10.214500Z

Completion doesnt seem to work for me (even within a project)

borkdude 2021-02-19T11:15:18.214900Z

{:deps {org.clojure/clojure {:mvn/version "1.10.2"},
        babashka/babasha.curl {:local/root "babashka.curl"}
        babashka/fs {:local/root "fs"}
        org.clojure/core.async {:mvn/version "1.3.610"},
        org.clojure/tools.cli {:mvn/version "1.0.194"},
        org.clojure/data.csv {:mvn/version "1.0.0"},
        cheshire/cheshire {:mvn/version "5.10.0"}
        org.clojure/data.xml {:mvn/version "0.2.0-alpha6"}
        clj-commons/clj-yaml {:mvn/version "0.7.106"}
        com.cognitect/transit-clj {:mvn/version "1.0.324"}
        org.clojure/test.check {:mvn/version "1.1.0"}
        nrepl/bencode {:mvn/version "1.1.0"}
        http-kit/http-kit {:mvn/version "2.5.1"}
        org.clojure/core.match {:mvn/version "1.0.0"}
        hiccup/hiccup {:mvn/version "2.0.0-alpha2"}}}

borkdude 2021-02-19T11:16:02.215100Z

@nicdaoraf I had the same, but using lsp-workspace-folders-remove and lsp-workspace-folders-add worked for me

ericdallo 2021-02-19T11:16:49.215300Z

@nicdaoraf that should work, make sure you have a company-min-length Of 2 or something like that

ericdallo 2021-02-19T11:17:30.215500Z

@borkdude your idea is to provide some bb command to get those deps, right?

ericdallo 2021-02-19T11:18:00.215700Z

A bb classpath would be perfect

borkdude 2021-02-19T11:19:06.215900Z

My idea is: lsp mode will detect (via a command, maybe lsp-clojure-babashka-script?) that you are in a babashka script and then it will add those deps to the analysis. Babashka doesn't have a command for this but maybe I could add one that will spit a deps.edn file to stdout?

borkdude 2021-02-19T11:20:06.216100Z

bb --deps-edn => will print {:deps ...} ?

borkdude 2021-02-19T11:20:47.216300Z

Let's talk in an issue

borkdude 2021-02-19T11:21:28.216500Z

https://github.com/babashka/babashka/issues/733

anonimitoraf 2021-02-19T11:23:15.216900Z

Cool, curious though, why does company-min-length have to be > 2? (I had 1 before and I guess that's why it wasnt working)

ericdallo 2021-02-19T11:27:08.217300Z

that's something to investigate on lsp-mode side πŸ˜… I don't know exactly/never investigated further, but I have 2 also configured

anonimitoraf 2021-02-19T11:28:46.217500Z

Ah ok πŸ˜… Is there an issue for that? Perhaps I can look into it

ericdallo 2021-02-19T11:29:30.217700Z

not sure, it'd need to check lsp-mode side, I don't know that much about the completion feature πŸ˜•

πŸ‘ 1
anonimitoraf 2021-02-19T11:30:04.218Z

Ok, I'll have a look at Issues and raise 1 if needed πŸ™‚

1
anonimitoraf 2021-02-19T12:48:45.218500Z

FYI: https://github.com/emacs-lsp/lsp-mode/issues/2624

1
dharrigan 2021-02-19T10:06:09.210Z

Does anyone have a working example of using semantic highlighting with vim?

slipset 2021-02-19T10:53:03.211400Z

Sorry if this is FAQ (or known issue), but the lense here indicates on hover that it’s clickable, but nothing happens when I click it? I’d expect it to do a find-references

ericdallo 2021-02-19T11:08:36.212100Z

Yeah, ATM it calls a unknown command, so it's just visual, but it could call a find references I think

ericdallo 2021-02-19T12:28:48.218300Z

BTW, not sure that would be possible, since we can only return a LSP command for a lens and the find-references features is not considered a LSP command πŸ˜•

borkdude 2021-02-19T18:24:10.220300Z

After hearing the question "but can clj-kondo also fix the things it complains about?" and answering it with "no" for so many times, I will now answer it with "enter #lsp and you will be enlightened".

πŸ‘ 3
ericdallo 2021-02-19T18:25:44.220500Z

hahahaha cool!

ericdallo 2021-02-19T19:38:29.221800Z

Is there anyone that uses windows with emacs mingw to help debug that: https://github.com/clojure-lsp/clojure-lsp/issues/326 ?