Fork me on GitHub
#spacemacs
<
2020-07-07
>
practicalli-johnny10:07:38

I've created a pull request to add a few clojure-mode refactor keybindings for namespaces. As its clojure-mode these work even without the REPL running. The key bindings should not conflict with clj-refactor (if that projects documentation is correct). SPC m r a n insert a namespace form at the beginning of the buffer SPC m r a N insert a namespace form at point SPC m r s u sort included namespace names within the ns form (e.g. sort required namespaces by alphabetical name) https://github.com/syl20bnr/spacemacs/pull/13755

flefik11:07:57

wouldn't it be nicer if the linter did the last item for you?

practicalli-johnny11:07:19

linters are intended to show issues rather than change code and I would prefer it remained that way 🙂 Refactor tools are intended to change code. I also prefer to sort namespaces by purpose, especially as the number of referred namespaces increases. It makes refactoring a (legacy - i..e anything I haven't worked on for a few weeks) project so much easier.

flefik11:07:38

> linters are intended to show issues rather than change code and I would prefer it remained that way having the dubious pleasure of working with golang lately, the only saving grace is the fact that the linter fixes lots of formatting and small issues for you automatically on file save.

practicalli-johnny11:07:17

That sounds really annoying to me I am afriad

practicalli-johnny11:07:12

I pushed some docs on the new keybindings to the Practicalli Spacemacs book, although you will have to grab the PR or wait for it to be merged to use the key bindings. The commands already exist though. https://practicalli.github.io/spacemacs/refactor/namespace-definitions.html

mccraigmccraig14:07:39

i just found myself want to access the kill-ring from within the minibuffer (for replace-string), and while i could use M-x helm-show-kill-ringi wasn't able to use the spacemacs menu M-SPC r y (i'm using holy-mode with a M-SPC leader key) - anyone have any idea why this should be ?

practicalli-johnny15:07:06

@mccraigmccraig Running SPC SPC replace-string followed by M-m r y I do get helm showing the kill ring. I have the default M-m as the leader key that works in any state, holy or evil. Using Spacemacs develop and packages updated in the last couple of days. C-y pulls the latest value from the kill ring and puts it in the mini-buffer or in a helm prompt. There have been a few changes in helm over the last month. If you updated Emacs packages then that may have changed something (just a guess).

mccraigmccraig15:07:15

what's the symbol for the any-state leader-key @jr0cket? is it just dotspacemacs-emacs-leader-key ?

practicalli-johnny16:07:52

@mccraigmccraig I believe so. Emacs (holy) keys are always available unless over-ridden by Evil states

practicalli-johnny16:07:17

My Spacemacs config is in this repo if you want to compare anything https://github.com/practicalli/spacemacs.d

Drew Verlee21:07:41

Does anyone use intelliji and spacemacs? I'm going to setup intelliji this weekend so i can see how the java interopt changes my workflow.

jumar06:07:31

You mean using both of them simultaneously? I use Intelij mostly for DB navigator and ocassional browsing through Java source code (e.g. clojure.lang); and very rarely for debugging clojure itself I use spacemacs for most of my Clojure development.

Drew Verlee15:07:02

Yes, i suppose i mean simultaneously. I'm going to try the work flow your suggesting. Though now that i'm getting more comfterable with whats possible, it seems i'll need to use google and javadocs enough that intelliji isn't as clear a win as I thought for interopt.