Fork me on GitHub
#cider
<
2023-01-17
>
browe17:01:17

has the repl broken for anyone else? My STR: 1. Start a repl with cider-jack-in in a project 2. when the repl prompt appears type 1 and hit enter

dpsutton17:01:15

in the repl buffer can you type m-x describe-key and then press enter? Want to see what [RET] is bound to in your repl

dpsutton17:01:34

its possible it is sending a newline and not “hey CIDER eval this input” so you’re not seeing a hanging repl but a waiting repl

browe17:01:13

good thought.

browe17:01:25

it seems to be bound to paredit-RET

dpsutton17:01:37

yeah that doesn’t seem helpful

browe17:01:41

what’s the cider function to invoke?

dpsutton17:01:01

cider-repl-return i think

browe17:01:14

yup! you’re right

browe17:01:23

why would that have magically changed…

browe17:01:43

(i don’t rly expect an answer to that lol)

dpsutton17:01:44

try control-j

browe17:01:48

thanks for your help!

dpsutton17:01:10

that’s actually my preferred setup. enter enters newlines so i can easily make multi-line stuff. control-j sends the input

browe17:01:16

ctrl-j is bound to paredit-C-j

browe17:01:32

the weird thing is, it was working fine on friday

browe17:01:50

today was the first time i started working on clj since then

dpsutton17:01:53

does control-j work? paredit-C-j might delegate out

Derek17:01:07

you’ve recently updated paredit

browe17:01:10

same behavior as paredit-RET

browe17:01:50

emacs is great but also horrible lol

browe17:01:01

packages shouldn’t randomly update

Derek17:01:13

lol, I wish packages didn’t declare such common keybindings

browe17:01:14

i greatly appreciate both of your help

browe17:01:06

yeah up until now i haven’t needed to do that.

browe17:01:55

this is my cider config currently:

browe17:01:57

(use-package cider
  :bind (:map cider-mode-map
	      ("C-c M-p" . cider-pprint-eval-last-sexp)
	      :map cider-repl-mode-map
	      ("C-c M-o" . cider-repl-clear-buffer)
	      ("C-c M-l" . cider-repl-switch-to-other))
  :config
  (require 'bind-key)
  (add-hook 'cider-repl-mode-hook #'company-mode)
  (add-hook 'cider-mode-hook #'company-mode)
  ;; (setq org-babel-clojure-backend 'cider)
  )

browe17:01:25

looks like i’ll have to add another entry to cider-repl-mode-map

browe17:01:23

the repl hangs at this point.

browe17:01:43

this just started happening today. has anyone else experienced this?

moe17:01:35

Anyone feel like chiming in on this?

Derek17:01:33

What do you mean? Like ::namespace-alias/?

Derek17:01:40

In addition, I think you’ll find a lot of us have moved from company to corfu

👍 2
moe17:01:24

No, like ns/ e.g. clojure.core/

Derek17:01:34

Using cider and corfu, I see this:

moe17:01:18

are you using LSP?

Derek17:01:32

completion-at-point-functions is a variable defined in 'minibuffer.el'.

Its value is (cider-complete-at-point t)
Local in buffer core.clj; global value is 
(tags-completion-at-point-function)

browe19:01:12

@UPEKQ7589 is corfu generally preferred over company by most emacs users these days, or mainly just by cider users?

Derek19:01:09

I don’t know if I’m really any sort of authoritative source here. I’ve seen corfu usage mirror the use of the vertico/marginalia/consult stack

browe19:01:32

ok. thanks

didibus05:01:46

I use Ivy and company, no issue here

didibus05:01:02

I doubt the lack of completion is from Emacs side, probably Cider not returning the candidates

didibus05:01:00

Though it works fine for me

didibus05:01:08

What's better about corfu?

Derek15:01:26

I think corfu is just better integrated into emacs existing code completion utilities (completion-at-point)

Derek15:01:43

From their README,

Corfu is a small package, which relies on the Emacs completion facilities and concentrates on providing a polished completion UI.

didibus17:01:04

Hum, that's not saying much.

moe17:01:37

But dude, it's polished

Derek18:01:39

That emphasis comes from me. You’re welcome to read more about it https://github.com/minad/corfu

didibus21:01:35

Seems the only difference with company is that Corfu takes over completion-at-point , I'm not sure I agree that's a good thing, Corfu monkey patches Emacs it seems, so that completion-at-point no longer behaves as standard, but is taken over by corfu. Is that really better?

didibus21:01:23

Company automatically includes all results from Emacs standard completion, so its compatible with all standard Emacs completions as well. It probably is a bit of a personal preference matter. Thanks for showing it to me. I use spacemacs, so anyways I probably just need to wait for it to decide to switch

browe17:01:20

cider used to do completion pretty well many years ago

browe17:01:31

i have lost track of when that stopped working for me.

wcalderipe21:01:04

Have someone passed through a similar situation with shadow-cljs? https://clojurians.slack.com/archives/C6N245JGG/p1673990569056019