This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2021-10-21
Channels
- # announcements (13)
- # babashka (29)
- # beginners (52)
- # calva (95)
- # cider (18)
- # clj-commons (7)
- # cljs-dev (42)
- # clojure (121)
- # clojure-australia (1)
- # clojure-dev (39)
- # clojure-europe (36)
- # clojure-france (4)
- # clojure-greece (1)
- # clojure-italy (20)
- # clojure-nl (3)
- # clojure-portugal (1)
- # clojure-uk (7)
- # clojurescript (47)
- # conjure (2)
- # cursive (9)
- # datalevin (5)
- # datascript (8)
- # datomic (66)
- # defnpodcast (2)
- # deps-new (5)
- # fulcro (18)
- # graalvm (21)
- # gratitude (9)
- # jobs (6)
- # jobs-discuss (17)
- # leiningen (3)
- # lsp (80)
- # lumo (1)
- # malli (9)
- # mount (2)
- # off-topic (16)
- # other-languages (8)
- # podcasts (19)
- # reitit (5)
- # remote-jobs (5)
- # shadow-cljs (29)
- # sql (5)
- # tools-deps (13)
- # vim (11)
- # xtdb (19)
I didn’t know what an amazingly interactive experience it is to hack on clojure-lsp. Did you? I have updated the dev docs to reflect this: https://github.com/clojure-lsp/clojure-lsp/blob/master/docs/development.md Demo here: https://www.youtube.com/watch?v=4UvT0yqBDw8
In the latest version, I'm getting this error out in my editor Classpath lookup failed when running
lein classpath`. Some features may not work correctly.` This is a bit worrying, since in this project, there is both a deps.edn
and a project.clj
and I think (by looking at crawler.clj
) it's mapping through each of the default project specs, to build up a classpath (so it should be okay). However, the error message is off putting. Am I interpreting this correctly?
When you run lein classpath
yourself does it return any errors? I’ve encountered an error message like this myself, and it’s usually been my fault.
Actually, yes, it does return an error, but here's the pinch, it's not a catastrophic error, since I'm using clojure deps to fire up the repl, not lein
Thus, I'm not concerned that lein is returning an error, in fact, I would say this is slowing down lsp from starting up, for it maps through all the default project specs to gather up the classpath
:project-specs [{:project-path "deps.edn"
:classpath-cmd ["clojure" "-A:dev:test" "-Spath"]}]
Be aware that this will make clojure-lsp always ignore lein for every project you run since you added to your home
Also, eve clojure-lsp saying classpath lookup failed for lein, it will safely use the deps.edn one, so you can just ignore if for some reason the lein error makes sense
We have this message error for some time now, and since the error happens with only running lein classpath
, it'srelated with your project indeed and not clojure-lsp
we have this all the time at nubank 😅 lein classpath fail if we don't have aws creds setup since we have our maven repository at s3
so it's pretty common to see folks complaining there that clojure-lsp is not working because their forgot to setup aws creds and lein classpath fails
I guess it's fine now, I know how to handle the issue if it arises (yup, we're migrating to deps from lein...but having a transition period)
seems that autocomplete on code from my own project doesnt' work anymore, not sure what changed
no completion on it but it does show the signature when in (clojure.string/includes?|)
The signature has nothing related with the completion, I suspect your source-paths are wrong indeed
it seems it works if the thing is fully qualified ex: if I type (clojure.string/incl|)
it will autocomplete, but my require alias gets no completion
if I type (s/|)
autocomplete pops saying s is a Property (it's an alias to clojure spec in that case), but nothing gets completed on it
and my emacs config so you have a complete picture : https://github.com/mpenet/emax/blob/master/init.el#L486-L505
another clue: if clojure.spec.alpha is required it breaks all completion on (clojure.spec.alpha/|)
same with my own code, or an exernal lib on the classpath, once required completion on it fails
added nrepl+cider-nrepl to classpath just to test, the error goes away but completion behavior is still the same
and now it works, not sure what fixed it. I rm'ed my .emacs.d/straight/* files and copied your .lsp/config.edn. About the straight part, I did do a straight-pull-all before all these tests, so I am not sure what's different
same pinned version of all repositories in straight too, a real mistery. In any case, sorry about the noise 🙂 at least I got to learn how to work-on /debug clojure-lsp
(add-hook 'cider-mode-hook (lambda () (remove-hook 'completion-at-point-functions #'cider-complete-at-point))) ; use lsp
only in the current ns I am working on, maybe something fishy that lsp doesn't like on it
it's weird, completion on core works at the end of the ns (after a bunch of code), not right after the ns declaration
odd, if you manage to reproduce again feel free to open an issue with a sample repro where I can try
Coming back to my message from yesterday and the issues I face with finding a var’s references, I am able to reproduce the behaviour even in clojure-lsp’s own https://github.com/clojure-lsp/clojure-lsp:
• I start with opening just the clojure-lsp.handlers
namespace and for call-hierarchy-outgoing
I get 0 references from the lens and the lsp-find-references
command does not return any results https://clojurians.slack.com/files/U9V9M9MFZ/F02JMGHSJF5/image.png
• When I then open the clojure-lsp.server
namespace (which has a reference to clojure-lsp.handlers/call-hierarchy-outgoing
) I can view the reference and the lens gets updated https://files.slack.com/files-pri/T03RZGPFR-F02J6RQJ7FH/image.png
@U9V9M9MFZ this sounds like wrong workspace configured in your lsp-mode
could you try lsp-workspace-folders-remove
, and remove any wrong folder, like your home and the clojure-lsp project