This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2023-11-29
Channels
- # adventofcode (1)
- # announcements (2)
- # beginners (163)
- # biff (3)
- # calva (19)
- # cider (56)
- # cljs-dev (5)
- # clojure (43)
- # clojure-belgium (2)
- # clojure-europe (47)
- # clojure-norway (32)
- # clojure-uk (2)
- # clojurescript (24)
- # datomic (5)
- # events (1)
- # fulcro (2)
- # hoplon (11)
- # hyperfiddle (12)
- # jobs (1)
- # lsp (15)
- # malli (7)
- # music (1)
- # polylith (2)
- # re-frame (7)
- # reagent (7)
- # shadow-cljs (25)
- # specter (9)
- # squint (16)
- # xtdb (5)
Does Calva have any refactoring tools for things like changing the name of an alias in a namespace definition
Yes, clojure-lsp provides Calva with refactor-rename. Place the cursor on the alias or a symbol qualified by the alias. Press F2
.
There are shown some options in Quick Fixes but when you click on them the say command not found.
Interesting. We may need to do something in Calva to provide that. I didn’t know it existed even (as I have already revealed).
Meanwhile: There might be a way to do it from the command line with clojure-lsp. Or from an editor that has the necessary glue, such as Emacs with clojure-lsp mode and I think also IntelliJ has a plugin for it these days.
Does anyone have issues with the repl output buffer not printing the full error message? is something I can fix with settings?
Do you have a repro with expected and actual outputs? Is calva truncating something that a CLI repl (or nREPL) isn't truncating?
a quick attempt at repro'ing this with a 4000-character error msg prints the whole thing:
(throw (ex-info (apply str (repeat 1000 "abc ")) {}))
this prints a whole lot of 'abc'scalva:
clj꞉tuchos.config꞉>
; Execution error (ExceptionInfo) at schema.core/assert-schema (core.clj:33).
; Value does not satisfy schema
spacemace:
the repl buffer is the same as above but another buffer opens
Unhandled clojure.lang.ExceptionInfo
Value does not satisfy schema
{:error-value nil,
:explanation {:namespace/key ["missing required key"]},
:type :schema-validation-error}
Just to clarify, am I understanding that the 'REPL output window' is identical in both, but that spacemacs does an extra thing?
@U013JFLRFS8 I tried you example but modified the map
(throw (ex-info (apply str (repeat 1000 "abc ")) {:foo "bar"}))
and I got the error but the map doesn't come back.It would be ideal to get that map back in the repl buffer because it usually has the helpful information
Using a custom repl command: https://calva.io/custom-commands/