This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2022-11-16
Channels
- # announcements (7)
- # babashka (8)
- # beginners (48)
- # calva (4)
- # cider (6)
- # circleci (2)
- # clj-commons (14)
- # clj-kondo (3)
- # clj-on-windows (7)
- # cljs-dev (34)
- # clojure (49)
- # clojure-dev (25)
- # clojure-europe (48)
- # clojure-losangeles (1)
- # clojure-nl (4)
- # clojure-norway (33)
- # clojure-uk (2)
- # clojurescript (37)
- # community-development (5)
- # conjure (17)
- # cursive (2)
- # data-science (1)
- # editors (10)
- # emacs (50)
- # events (22)
- # honeysql (11)
- # introduce-yourself (1)
- # jobs-discuss (13)
- # lsp (42)
- # malli (9)
- # off-topic (7)
- # pathom (11)
- # portal (5)
- # re-frame (3)
- # reagent (22)
- # reitit (8)
- # reveal (1)
- # rewrite-clj (4)
- # shadow-cljs (38)
- # xtdb (21)
[Sorry, user error - ignore]
Should renaming a namespaces in the src
tree also be applied to requires
of that namespace in files under the test
tree? Renaming seems to work okay for files that require the changed namespace under src
tree
Or is this a feature to implemented?
Example: using lsp-rename
to rename a namespace …handlers to …handler which is defined in src/practicalli/api/handlers.clj
, a require in the test namespace test/practicalli/api/handler-test.clj
was not updated to the new name,
A file under the src
tree that requires the changed namespace was updated, src/practicalli/api/router.clj
If relevant, I’m using LSP :: lsp-mode
with clojure-lsp 2022.11.03-00.14.57
( clj-kondo 2022.11.02 )
You could do lsp-clojure-server-info
and paste that into a gist and post the link here, then we'll know the answer
The :source-paths
key included values for the full path of the project I was working on and relative src and test paths.
@ericdallo would there be any interest to add something like this https://github.com/babashka/babashka/blob/b57981bcd5545ee0b223a3dfa51f15a023fbc407/examples/normalize-keywords.clj as an action maybe? It rewrites keywords that are aliased to their full/expanded form, so ::foo to :bar/foo and so on.
@U050SC7SV I added comment with some considerations, could you take a look?
Done! Please test it if possible and let me know if bugs, the feature for replace all project occurrences should not be hard to implement as well, we could think in different kind of answers maybe for making that easier
Downloading to /var/folders/zz/zyxvpxvq6csfxvn_n0000000000000/T/tmp.5xRxRafd
[clojure-lsp-native-macos-aarch64.zip]
End-of-central-directory signature not found. Either this file is not
a zipfile, or it constitutes one disk of a multi-part archive. In the
latter case the central directory and zipfile comment will be found on
the last disk(s) of this archive.
unzip: cannot find zipfile directory in one of clojure-lsp-native-macos-aarch64.zip or
clojure-lsp-native-macos-aarch64.zip.zip, and cannot find clojure-lsp-native-macos-aarch64.zip.ZIP, period.
kind of a doom/cider/emacs question, but figured i’d try to ask here as i’m currently puzzled. i have a pretty vanilla install of doom, and things like (System/|)
do not complete in the .clj file buffer, but they do complete in the cider buffer. Clojure fns and other requires from the file complete just fine, but not things like java.lang.System, even after explicitly importing it.
apologies for asking here, but it’s an active clojure-focused channel with some expert emacs lispers so i figured it’d be worth a shot
figured it out, needed to (setq lsp-enable-completion-at-point nil) to get cider’s completions back
It's expected to not have java methods available on completion since we don't have java analysis for methods only classes
Disabling lsp completion will make you only rely on cider, so repl connected always
I posted this in response to the same question in #emacs , but it might be of interest here too. You can use https://github.com/minad/cape to combine lsp and cider for completion. This seems to work with corfu, but may or may not need adapting to work with company:
(setq-local completion-at-point-functions (list (cape-super-capf #'cider-complete-at-point #'lsp-completion-at-point)))
hey folks, is there a smart way of checking if there is an active lsp session for my project. I'm using emacs btw 🙂
lsp-describe session was actually my first guess, but I want to use it in a defun if and since it has the sideeffect of showing the session buffers etc. I wasnt shure if that was the way to go
hm, that looks good
that's what lsp-describe-session
uses internally and it's a public lsp-mode function, so harder to stop working in the future
cool, found it, thx!