Fork me on GitHub
#spacemacs
<
2018-08-02
>
dumrat09:08:24

Hi, I'm new to spacemacs and cider. Have a week or so of free time so wanted to give it a go. I'm specifically looking for correct set up instructions for testing. Is there any resource which properly documents how to structure tests folder, run all tests, auto load tests, etc? Right now, if I do SPC m t n from my source file, I get this error: No test namespace: prm.model.core-test. I can't get it to work. Attaching screenshot of my structure.

Sam H09:08:46

it could be the extra test you have in the middle of prm.model.test.core-test

👍 4
Sam H09:08:38

I think you should have test/clj/prm/model/core-test.clj

dumrat09:08:58

Thanks! This was generated by luminus hmm

Sam H09:08:02

ah ok, must need some extra set up in spacemacs then

Sam H09:08:27

so the problem is SPC m t n uses https://github.com/clojure-emacs/cider/blob/master/cider-test.el#L602 to infer the test ns, which defaults to the same ns but with the -test added to the end of the ns. Looks like you can define a custom function but I’m not sure how you’d do it

eggsyntax14:08:45

I frequently do SPC / to do a fuzzy search for text across the project. Sometimes it would be really useful for the output to be sorted. Anyone have any hints on how I might accomplish that? I tried

(defun helm-project-search-sorted (&optional default-inputp)
    (interactive)
    (sort
     (spacemacs/helm-project-smart-do-search)
     '<))
But the results end up not being sorted -- or to be more specific, sections of the results appear to be sorted, but the whole is not. I'm guessing this is because ripgrep is farming out the search to multiple threads, and my fn isn't smart enough to put those together properly before sorting. Any tips would be appreciated! My emacs lisp skills aren't very strong.

Mario C.16:08:10

Does anyone know how to make the mini buffer window larger?

Mario C.16:08:26

Its so small. Like 3 row height

Sam H16:08:39

looks like max-mini-window-height might be what you’re after

Mario C.16:08:44

Where would I add that to?

Mario C.16:08:13

Because I did which-key-side-window and nothing seemed to happen

Sam H16:08:07

if you do SPC h d v and search for max-mini-window-height, you should be able to set the value

Mario C.16:08:23

I did that and did not notice any effects

Mario C.16:08:34

But I am thinking its because that is the 'grow height'

Mario C.16:08:42

I want a default height

Mario C.16:08:12

Like when I hit SPC I want a good sized window to pop up. Not a window that can grow to my max height, if that makes sense

ag16:08:39

what you're talking about is which-key buffer.

Mario C.17:08:22

lol okay so I am stuck in this custom buffer. The easy customization buffer

Mario C.17:08:30

how do I kill it or get rid of it

ag17:08:55

SPC b d

ag17:08:21

you might be in non-evil mode, you can change that by C-z

Mario C.17:08:22

Im inside a buffer and I can't get to the regular mini buffer that would allow me to do SPC b d

ag17:08:20

press C-z, cursor color should change, then you'd be able to do SPC etc etc

Mario C.17:08:46

There we go!

Mario C.17:08:04

I kept thinking SHIFT-C Z 😅

ag17:08:45

when you don't have evil enabled you can also press whatever key is set in dotspacemacs-emacs-leader-key

ag17:08:53

by default it's set to M-m

ag17:08:11

meaning M-m does the same thing as SPC in evil

ag17:08:43

you can set which-key-side-window-max-height, the max amount is 1, I don't know if that's enough

Mario C.18:08:39

Thanks @ag. Do you know how to work with magit in spacemacs?

ag18:08:17

I feel like I do

Mario C.18:08:59

Sorry its just that switching over to spacemacs feels like learning how to walk all over again

Mario C.18:08:21

anyways, after executing the command SPC-g-s

Mario C.18:08:36

I get the a status page. How can I undo changes that have not yet been committed?

Mario C.18:08:29

Okay so after entering SPC-g-s. I can enter SHIFT-? which pops up the menu

Mario C.18:08:39

After that it is pretty straightforward

ag19:08:05

Magit is huge.. It will take you some time to master it. I've been thinking about recording a video on sorta "advanced" tricks, but swamped with much stuff at work

Mario C.20:08:09

Ah I didn't mean it like that. Just meant that getting rid of changes was pretty straight forward from that point on

Mario C.20:08:20

Also when I hit ctrl-l (control el) in the eshell

Mario C.20:08:30

the shell screen clears but it doesn't scroll to top

ag20:08:07

the function you need is afaik is (eshell/clear-scrollback)

ag20:08:32

see if C-l bounds to something like that

Mario C.22:08:40

I started a REPL in Cursive which provides me with a host ip and a port number. CIDER allows me to connect to it. So far so good. In the Cursive side I loaded up a file and switched to its namespace. But in CIDER when I call those functions that were loaded in (via cursive) it yells and says "no such function".

practicalli-johnny00:08:31

I’ve never even considered running a REPL in one editor and connecting to that REPL in another editor. You could try looking up if nrepl broadcasts all changes to all connections to a REPL. I am curious to know what benefit you get from running two editors attactched to one REPL. Are you just comparing the different experiences.

Mario C.05:08:50

Very good question. The reason I did that earlier was because I was having issues starting up CIDER from spacemacs. And I just wanted to get a REPL up and running. So I figured as a workaround for the moment I could start a REPL session via Cursive and then connect to it from spacemacs.

Mario C.22:08:59

Is this expected? Or is it an error on my part? what gives?