Closed fixgoats closed 5 months ago
Hmm I can't recreate that in Emacs-Lisp or Common-Lisp modes?
Are you using Evil perhaps? Or are you using any minor modes that manage your whitespace or parens?
I have been dealing with this as well. In trying to recreate a simple init.el
to reproduce, I found indent-tabs-mode
to be the culprit.
Simple reproduction, if you are curious:
(require 'package)
(add-to-list 'package-archives '("melpa" . "https://melpa.org/packages/") t)
(package-refresh-contents)
(package-install 'use-package)
(eval-when-compile (require 'use-package))
(indent-tabs-mode 1)
(use-package parinfer-rust-mode
:ensure t
:hook emacs-lisp-mode)
;; try adding a new var to the let and cursor jumps to the "t" in "let"
(defun foo (bar)
(let ((baz bar))))
In my case, solved with a simple hook:
(add-hook 'emacs-lisp-mode-hook #'(lambda () (indent-tabs-mode -1)))
I've added indent-tabs-mode to one of the modes parinfer-rust-mode will try to disable if it detects it. Hopefully this helps fix the problem. If not we can reopen the issue
I'm a Lisp newb so maybe this is intended behaviour and I should be doing something else, but I was trying to write a let statement as shown in the included screengrab, and when I hit enter the cursor freaked out and jumped into the "let" word.
https://user-images.githubusercontent.com/18019781/217111033-e4cb8cc3-fb05-4cb4-a1af-0bd0dbbb9bad.mp4