anyone know what I might have wrong / missing in my cider / clojure settings that would cause this issue when trying to autocomplete via tab. It all works in file buffers, but the repl has a weird glitch where when I press tab the cursor jumps backwards before the first paren, and there’s a message saying “Text is read-only”. Video attached
Weirdly, it doesn’t even happen immediately. it seems to occur once the app has started up and it’s printed a bunch of logging lines
What functions is bound to Tab in the REPL? C-h k Tab
(cider-repl-tab)
I assume you don't use company-mode for completions?
I’m a bit sketchy on all the different completion options, but I think I use ivy
(straight-use-package 'ivy)
(ivy-mode)
(setq tab-always-indent 'complete)Might be related to it then, I can't really help you with your particular setup.
Maybe try disabling Ivy to see if it reproduces without it
I’ll try that, thanks!
yeah it reproduces without ivy
it’s almost like something in the printing of logs has changed the text properties of the buffer
(logs are from e.g. the jetty server starting)
any ideas?
Can you share your CIDER configuration? Seems to me like some weird interaction with another package, but I can't be sure.
(use-package clojure-mode
:config
(progn
(add-to-list 'auto-mode-alist '("\\.cljd\\'" . clojure-mode))))
(use-package cider)
(use-package flycheck-joker)
(use-package clj-refactor)
(add-hook 'clojure-mode-hook
(lambda ()
(flycheck-mode t)
(show-paren-mode t)
(clj-refactor-mode t)
(paredit-mode)
(setq clojure-indent-style 'always-align
tab-always-indent 'complete
cider-test-fail-fast nil
cider-print-fn 'puget
cider-print-quota (* 1024 512) ; 512kb
cider-pprint-options '(("width" 120)))
(prism-mode)
(set-face-attribute 'cider-debug-prompt-face nil
:foreground "#FF00FF")
(set-face-attribute 'cider-debug-code-overlay-face nil
:background "#FFFF00"
:foreground "#000000")))
(add-hook 'cider-repl-mode-hook
(lambda ()
(prism-mode)
(paredit-mode)))I’ll try taking out prism mode and then paredit mode from cider-repl-mode hook
prism is for block syntax highlighting, not super necessary at the repl. I guess potentially if there’s an issue with that it could leave the buffer in a weird state
still happens with prism removed
also with paredit removed
the only other clue I have is that this first log line (and none of the subsequent ones) from the db pool init is clickable - what makes a clickable log line?
Maybe I can use that to make a minimal repro
^ I’ve been able to work around this issue by running cider-log-show and sending all the logs to the special log buffer instead of allowing them to interleave with the REPL
I have a similar issue when the repl buffer gets big: https://clojurians.slack.com/archives/C0617A8PQ/p1686225829376799 It's not really a problem anymore because I have way less things printed to that buffer but I never found the root of the issue
ah interesting, sounds like the same kinda thing. Is it definitely when the repl buffer gets big, or do certain types of output trigger it, like in my case?