: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)
π
Thanks so much @ericdallo @borkdude and all others involved π
@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
Oh, I thought it completes sometimes for me but it turns out, it's completing keywords (used elsewhere)
@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
Also lsp-mode has a cache for completions, but should not a be a problem I think
Thank you. Yes, I'm often editing scripts in a tmp folder. This is what I do a lot with babashka.
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!
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?
Or maybe a more general solution for other projects as well.
Hahaha nice! It probably could be done :) We could have a classpath-cmd default for babashka scripts
yeah!
Is there any way to get the babashka deps just checking some file or something like that? Or maybe a babashka deps
?
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.
I will make a list of the libs that are available in bb itself
Yes, that would be great, so we could get those deps via bb
Completion doesnt seem to work for me (even within a project)
{: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"}}}
@nicdaoraf I had the same, but using lsp-workspace-folders-remove and lsp-workspace-folders-add worked for me
@nicdaoraf that should work, make sure you have a company-min-length Of 2 or something like that
@borkdude your idea is to provide some bb command to get those deps, right?
A bb classpath
would be perfect
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?
bb --deps-edn
=> will print {:deps ...}
?
Let's talk in an issue
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)
that's something to investigate on lsp-mode side π I don't know exactly/never investigated further, but I have 2 also configured
Ah ok π Is there an issue for that? Perhaps I can look into it
not sure, it'd need to check lsp-mode side, I don't know that much about the completion feature π
Ok, I'll have a look at Issues and raise 1 if needed π
Does anyone have a working example of using semantic highlighting with vim?
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
Yeah, ATM it calls a unknown command, so it's just visual, but it could call a find references I think
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 π
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".
hahahaha cool!
Is there anyone that uses windows with emacs mingw to help debug that: https://github.com/clojure-lsp/clojure-lsp/issues/326 ?