Fork me on GitHub
#cider
<
2020-11-19
>
borkdude11:11:24

in emacs / prelude / cider, what is the thing called that gives a visual effect on the line I'm typing when I press enter?

borkdude11:11:33

I want to turn that off in vterm

practicalli-johnny17:11:56

FYI if you want to keep the beacon package for some things, beacon-mode should toggle it, its just a minor mode.

borkdude17:11:24

Yeah, don't really care about that one, but thanks :)

practicalli-johnny17:11:13

Ironically I just started using it with Spacemacs, I quite like it... maybe I just havent used it long enough to get bored with it 🙂

bozhidar13:11:12

@borkdude Can you show me the visual effect as I don't remember anything that's triggered on enter.

borkdude13:11:03

@bozhidar It might be an effect of zenburn, I'm not sure how I can replicate this...

borkdude13:11:36

when I disable global-hl-line-mode then it goes away, but it isn't the same as hl-line-mode

bozhidar13:11:40

Hmm, I trying this now on the latest Prelude but I don't see any effect when I press Return.

borkdude13:11:14

I'll let you know when I see this again.

borkdude13:11:31

@bozhidar There I have it, after calling cider-connect and hitting return in the REPL.

John Maruska13:11:56

I have a similar effect called beacon, it might be that https://elpa.gnu.org/packages/beacon.html

bozhidar13:11:36

Yeah, that's beacon.

bozhidar13:11:53

I've removed it from Prelude recently, that's why I wouldn't see the effect. 🙂

bozhidar13:11:43

Normally there should be an animation only for bigger movements in the buffer, though. Guess that's some bug in beacon.

borkdude13:11:37

ah, then I should update my prelude :)

👍 3
borkdude15:11:08

Updated and I don't see it anymore

borkdude15:11:53

I want to disable hl-line-mode in vterm. How can I do that?

(add-hook
 'vterm-mode-hook
 (lambda()
   (setq hl-line-mode nil) ;; hmm..?
   (setq show-trailing-whitespace nil)))

borkdude15:11:59

@bozhidar What is the new line number stuff and how do I disable it?

bozhidar15:11:45

global-nlinum-mode

bozhidar15:11:20

From the changelog/docs:

bozhidar15:11:22

* Enable `nlinum-mode` by default. Can be disabled by setting `prelude-minimalistic-ui` to `nil`.

bozhidar15:11:52

Ops, that should be t, not nil. 😄

borkdude15:11:10

like this? (setq prelude-minimalistic-ui t) ?

borkdude15:11:44

fwiw it doesn't work for me (in init.el)

bozhidar15:11:54

It should go the preload config - e.g. preload/personal.el.

bozhidar15:11:38

The var needs to be set before the UI is initialized otherwise some UI elements would briefly appear and then disappear.

borkdude15:11:48

Makes sense!

borkdude16:11:03

That worked.

borkdude16:11:23

@bozhidar what is used for highlighting the current line in a buffer and how do I turn this off for vterm only? I have a half-assed attempt a couple of lines up

bozhidar16:11:06

global-hl-line-mode. I you think you can just add a hook for vterm that looks like (lambda () (hl-line-mode -1)).

bozhidar16:11:31

Haven't used vterm, but it guess it defines a major mode named vterm-mode or something like this can you can hook into.

borkdude17:11:58

that's true. I found vterm using a couple of searches as one of the best alternatives to ansi-term, etc

practicalli-johnny17:11:10

vterm is what people using Spacemacs have been recommending for a while, looks very good.

bozhidar21:11:01

So, I've heard, but I was always too lazy to set it up. I did it just now and it looks pretty nice indeed.

borkdude17:11:25

I tried this, but even in the buffer where I'm executing (hl-line-mode -1) the current line stays highlighted

borkdude17:11:18

I found this code on stackoverflow. It works:

(global-hl-line-mode)
(make-variable-buffer-local 'global-hl-line-mode)
(add-hook 'some-mode-hook (lambda () (setq global-hl-line-mode nil)))

(add-hook
 'vterm-mode-hook
 (lambda()
   (setq global-hl-line-mode nil)
   (setq show-trailing-whitespace nil)))
The only unsatisfying thing about this is that I don't know why one has to do it like this.

bozhidar21:11:20

That's weird. I can reproduce it for every buffer, so it's not something to do with vterm. Seems something is off in hl-line-mode as normally the non-global version of the mode should work just fine within one buffer to disable/enable it.

borkdude12:11:34

You wrote a blog about it and you didn't even tell me? https://emacsredux.com/blog/2020/11/21/disable-global-hl-line-mode-for-specific-modes/ Thanks!

😄 1
bozhidar07:11:59

I often get inspired to write blog posts from random conversations. And I'm very forgetful! 😄

Felipe Cortez22:11:20

hi! I'm tackling this: https://github.com/clojure-emacs/cider/issues/2901 the remaining problem is that cider-font-lock-as-clojure doesn't work well with mixed Clojure code and ANSI color codes. cider-ansi-color-string-p (which is used in cider-font-lock-as) only applies the color codes if the string starts with a color code (e.g. "\033[33mHello\033[0m"). in matcher-combinators we have "(mismatch \033[33mHello\033[0m)" etc. what's the best solution here? is always running ansi-color-apply on the font-locked Clojure code acceptable for test reports?

bozhidar13:11:31

Can't we just adjust the predicate method?

bozhidar13:11:54

> is always running ansi-color-apply on the font-locked Clojure code acceptable for test reports?

bozhidar13:11:57

Probably that'd be fine.

Felipe Cortez14:11:30

yep, adjusting the predicate method is what I meant :)

Felipe Cortez14:11:26

I’ll open a PR soon-ish then

Felipe Cortez15:11:54

here's the one for cider-nrepl: https://github.com/clojure-emacs/cider-nrepl/pull/683, unrelated to the coloring issue. I'm not sure how to test it, though. my first idea was to add a cider.nrepl.middleware.test-custom-print ns with a failing test containing custom print logic, filtering it out with :test-selectors, and then calling it with session/message to run the assertions. does that sound good?