Fork me on GitHub
#spacemacs
<
2023-01-24
>
Drew Verlee17:01:33

When i get an java exception the cursor jumps to the top of the page. How do i make that not happen? why is it happening?

practicalli-johnny18:01:31

Do you mean the cursor jumps to the buffer that shows the exception instead of staying in the source code buffer (where I assume the code was evaluated and caused the exception to occur)? I am sure that is a cider variable, something like jump to exception...

practicalli-johnny18:01:49

If I understand correctly, its probably one of these CIDER eval variables that can be set to disable the behaviour that is not required (not sure which one exactly) https://practical.li/spacemacs/reference/cider/configuration-variables/#cider-evalel

practicalli-johnny18:01:09

There may be some more useful information in these cider docs https://docs.cider.mx/cider/usage/dealing_with_errors.html

Drew Verlee18:01:32

No I mean it jumps to the top of the namespace. I can't imagine why this would be desirable or what's causing it to happen.

practicalli-johnny18:01:56

Oh, then something seems very broken.... You could try adding this to the dotspaceamcs/user-config

(setq cider-auto-select-error-buffer nil)

practicalli-johnny18:01:09

but might help narrow the issue down to CIDER if it stops the jumping... and then a bug can be reported with CIDER or Clojure-mode. If its still jumps then its probably not cider.... but I dont know enough to be definate

👀 2
practicalli-johnny18:01:59

Or disable the Error popup all together and see if its still happens...

(setq cider-show-error-buffer nil)

practicalli-johnny18:01:55

I'd also switch of clj-refactor if its on and stop the clojure lsp server as other possible things to make the cursor jump

Drew Verlee16:02:32

I was wrong before when i said an error caused the cursor to jump to the top of the page. It happens right now when i try to auto-complete. 😢

practicalli-johnny18:02:42

Curious. I sometimes get the cursor jump to the bottom of the buffer when the autocompletion popup appears. It seems to be most prevalent when the cursor is something like last 10-15 lines from the bottom. It's happened on Spacemacs and a couple of time on Emacs Doom. So assume it's either a package or something built into Emacs that is the cause