cider

A channel dedicated to the Clojure Interactive Development Environment that Rocks (aka CIDER). :cider:
bozhidar 2020-11-19T06:53:12.038700Z

Unless it produces output, like in the case of the issue I experienced during my live demo. 🙂

dpsutton 2020-11-19T06:55:28.038900Z

yeah the trace over fibs 🙂 i've never used trace before and it looked amazing

borkdude 2020-11-19T11:10:24.039900Z

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

borkdude 2020-11-19T11:10:33.040100Z

I want to turn that off in vterm

bozhidar 2020-11-19T13:05:12.040600Z

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

borkdude 2020-11-19T13:17:03.041Z

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

borkdude 2020-11-19T13:18:36.041400Z

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

bozhidar 2020-11-19T13:24:40.041900Z

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

borkdude 2020-11-19T13:30:14.042200Z

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

borkdude 2020-11-19T13:38:31.042600Z

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

2020-11-19T13:39:56.043500Z

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

bozhidar 2020-11-19T13:47:36.043700Z

Yeah, that's beacon.

bozhidar 2020-11-19T13:47:53.044100Z

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

bozhidar 2020-11-19T13:48:43.045Z

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

borkdude 2020-11-19T13:49:37.045300Z

ah, then I should update my prelude :)

👍 1
borkdude 2020-11-19T15:01:08.046400Z

Updated and I don't see it anymore

borkdude 2020-11-19T15:05:53.046900Z

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)))

borkdude 2020-11-19T15:17:59.047400Z

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

bozhidar 2020-11-19T15:18:45.047800Z

global-nlinum-mode

bozhidar 2020-11-19T15:19:20.048Z

From the changelog/docs:

bozhidar 2020-11-19T15:19:22.048200Z

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

bozhidar 2020-11-19T15:19:52.048500Z

Ops, that should be t, not nil. 😄

borkdude 2020-11-19T15:25:10.048700Z

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

borkdude 2020-11-19T15:25:44.048900Z

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

bozhidar 2020-11-19T15:29:54.049700Z

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

bozhidar 2020-11-19T15:30:38.050500Z

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

borkdude 2020-11-19T15:33:48.050700Z

Makes sense!

borkdude 2020-11-19T16:05:03.051Z

That worked.

borkdude 2020-11-19T16:08:23.051700Z

@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

bozhidar 2020-11-19T16:11:06.052800Z

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

bozhidar 2020-11-19T16:11:31.053400Z

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

practicalli-john 2020-11-19T17:09:56.053500Z

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

borkdude 2020-11-19T17:10:24.053700Z

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

borkdude 2020-11-19T17:10:58.054300Z

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

practicalli-john 2020-11-19T17:11:13.054400Z

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 🙂

practicalli-john 2020-11-19T17:12:10.054800Z

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

borkdude 2020-11-19T17:12:25.055200Z

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

borkdude 2020-11-19T17:12:36.055300Z

borkdude 2020-11-19T17:22:18.056300Z

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.

borkdude 2020-11-21T12:59:34.084Z

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!

bozhidar 2020-11-19T21:33:01.057Z

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.

bozhidar 2020-11-19T21:36:20.057200Z

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.

2020-11-19T22:02:20.061600Z

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?

bozhidar 2020-11-20T13:05:31.064200Z

Can't we just adjust the predicate method?

bozhidar 2020-11-20T13:05:54.064400Z

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

bozhidar 2020-11-20T13:05:57.064600Z

Probably that'd be fine.

2020-11-20T14:22:30.072200Z

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

2020-11-20T14:23:26.072800Z

I’ll open a PR soon-ish then

2020-11-21T15:41:54.084500Z

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?