Repository navigation
Compatibility with clojure-lsp? #3434
Replies: 11 comments
Compatible in what sense? You can run an LSP server alongside nREPL if that's what you're asking for, but you'll have to be careful with
CIDER's backend is already portable, as nREPL is an open protocol and everything's just nREPL middleware. We can certainly implement LSP in terms of nREPL and provide a runtime-powered alternative to |
|
I use lsp alongside of CIDER. They work fine together but i have the following config. It mainly makes CIDER in charge of indentation and completion. (use-package lsp-mode
:init
(setq lsp-clojure-server-command '("bash" "-c" "cd ~/projects/clojure/clojure-lsp && lein run"))
(setq lsp-enable-indentation nil)
(setq lsp-enable-completion-at-point nil)
;; (setq indent-region-function #'clojure-indent-function)
(add-hook 'clojure-mode-hook #'lsp)
(add-hook 'clojurec-mode-hook #'lsp)
(add-hook 'clojurescript-mode-hook #'lsp)
:config
(require 'lsp-clojure)
(add-to-list 'lsp-language-id-configuration '(clojure-mode . "clojure"))
(add-to-list 'lsp-language-id-configuration '(clojurec-mode . "clojure"))
(add-to-list 'lsp-language-id-configuration '(clojurescript-mode . "clojurescript"))) |
|
@dpsutton Alternatively you can disable the LSP indentation/completion when |
|
@bbatsov oh i like that! i'm gonna switch it over |
|
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contribution and understanding! |
|
@dpsutton did you manage to make them play well together? |
|
I'm trying to use LSP + Cider and one problem I see is that Cider redefines the key mappings for things like <M-.> and <C-.>. I'd prefer to be able to tell Cider not to be xref and imenu provider because I prefer LSP for that. |
|
Hey all, I hope this helps :) |
|
that's pretty cool, thanks. One problem I keep having is alternating the formatting between cider and lsp. I'm using latest stable releases for both while your example seems to use unstable versions? |
|
Yes, @gdanov they should not conflict with each other AFAIK, lsp formatting is achieved via |
|
lsp seems to be interacting with indent-region by advising it. Not sure how and why |
Uh oh!
There was an error while loading. Please reload this page.
Is the functionality in CIDER compatible with https://github.com/snoe/clojure-lsp ? I figure that would allow all of the CIDER goodies to work across platforms/editors if it was under LSP.
All reactions