-
-
Notifications
You must be signed in to change notification settings - Fork 912
Add support for Clojure/ClojureScript via clojure-lsp
#791
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Codecov Report
@@ Coverage Diff @@
## master #791 +/- ##
=======================================
Coverage 51.51% 51.51%
=======================================
Files 5 5
Lines 66 66
=======================================
Hits 34 34
Misses 32 32
Continue to review full report at Codecov.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good, one minor comment:
lsp-clojure.el
Outdated
name)) | ||
|
||
(lsp-register-client | ||
(make-lsp-client :new-connection (lsp-stdio-connection '("bash" "-c" "clojure-lsp")) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you extract the command into defcustom variable for windows users? Even better will be if you can provide default value that will work for windows as well.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
good shout, looking into it
I did some testing and it looks promising, there is functionality that is not currently present in cider(e. g. finding references) and the fact that it performs static analysis is nice too. There are several extension methods what we might want to implement (introducing locals, inlining locals, etc). You may On the bad side it seems like it is not supported very well by company-lsp (cc @tigersoldier). The server requires client-side filtering but company-lsp fails most of the time probably due to incorrect prefix calculation. |
yeah indeed. finding references is there in also it seems that next step would be to look at integrating the refactorings |
Additionally enable jumping into jarred dependencies if the server is configured to return the URI in the right format. Command to start server is configurable via a defcustom.
Added the |
Thank you for contributing to I will merge it as it is and we could work on exposing the extension methods/windows support and fixing company-lsp.
I am actually clojure/java programmer in real life so thank you for your work on refactor-nrep!. As a side note, is there an issue tracking the effort on making refactor-nrepl work with the latest cider? PS: By the way, this is not the only possibility for collaboration between emacs-lsp and clojure-emacs. I think that even at this point, dap-mode supports debugging clojurescript and also it won't be hard to be adjusted to work for clojure. |
thanks for the merge! I am using latest clj-refactor, refactor-nrepl 2.4.0 with latest cider. feel free to file an issue if you have a problem with latest versions or maybe you have a slightly older one? |
I had some issues in the past and I am checking clj-refactor readme compatibility table from time to time - https://github.com/clojure-emacs/clj-refactor.el . It still says that it supports only cider 0.17/0.18. Is this info out of date? |
i suppose it is, my versions
|
Thank you, I will try it when I am back at work. |
let me know if you have any probs, ta! |
Additionally enable jumping into jarred dependencies if the server is
configured to return the URI in the right format