spacemacs

Spacemacs docs: http://develop.spacemacs.org/doc/DOCUMENTATION.html http://develop.spacemacs.org/layers/+lang/clojure/README.html https://practicalli.github.io/spacemacs/
practicalli-john 2020-11-19T17:03:29.159100Z

I am doing more with the cider-inspector (video coming soon) and noticed that there are several inspector related commands without key bindings (inspect last result, function, expression, last-expression) I am raising a pull request (when GitHub lets me - PR's still seem to be degraded) to add key bindings under the SPC m d v menu, , d v in Evil normal. https://github.com/jr0cket/spacemacs/blob/cider-inspect-key-bindings/layers/%2Blang/clojure/packages.el#L212-L216 The only key binding change is that , d v is now , d v i , all other changes are addative only. Any feedback welcome. I imagine it will take a few days to approve the change by the Spacemacs maintainers (once I can create the PR on GitHub)

practicalli-john 2020-11-19T17:05:24.161Z

The inspector is a really useful tool to keep open, especially when working with a lot of nested data structures or large data sets (more than 100 elements) Using the inspector rather than the REPL buffer also means Emacs wont slow down due to the REPL buffer getting too large.

Ben Sless 2020-11-22T21:10:18.165700Z

How about putting the menu under V and not v? Once it's open it always updates to the last result anyway. I find dv to be easy enough to reach for and cover most use cases, unless I'm missing something fundamental

practicalli-john 2020-11-22T22:38:50.166Z

Spacemacs convention is to use lower case characters where possible, so v i should be used over Shift v i , especially as there are several really useful inspector functions under , d v sub menu. If it was just one additional function and that function was a more destructive version of dv then I could have made a case.

👍 1
niveauverleih 2020-11-19T20:01:55.162900Z

Is there a way to launch a clojure file and a corresponding linked nrepl from the command line?

practicalli-john 2020-11-19T20:07:55.163Z

Can you elaborate? I am afraid I don't understand what you are trying to achieve? Is the file part of a project? What Clojure project tool are you using, Leiningen, Clojure CLI, boot. How is the linked Repl started? How is a repl linked to the fille? Should Cider start the repl or connect to it? Is this Clojure or Clojurescript? I am not really clear what launching a file means without more context

practicalli-john 2020-11-19T20:12:17.163400Z

I assume you mean something different to just running lein repl or clj

niveauverleih 2020-11-19T20:15:22.163600Z

Sometimes I want to quickly try out some clojure command. I have a project "fiddle" with "fiddle.clj" under src. I want to place a shortcut on my de5that launches spacemacs, opens fiddle.clj, starts a cider REPL and connects to it. I could run "emacs fiddle/stc/fiddle.clj" and "cd fiddle: lein repl"in parallel but that doesn't link my spacemacs session to the REPL.yet.

niveauverleih 2020-11-19T20:15:47.163800Z

...on my desktop...

practicalli-john 2020-11-19T23:40:52.164100Z

Sounds like some elisp is required. I am guessing you would need to write a function enough to start a REPL, or connect to a running one (starting might be easier as the port would be taken care of). I am not sure how to decide when to trigger such a function, it would need to be run after the file is loaded I guess, but no idea what to trigger it off unless it's a specific file name, but that seems very bad code.

practicalli-john 2020-11-19T23:43:21.164400Z

Try asking in the #cider channel about automating the startup of a repl from elisp

practicalli-john 2020-11-19T23:44:16.164600Z

I think it's just simpler keeping Emacs open and the repl running. Then it's just alt-tab