0

I am using blacken to automatically format my python files

(use-package blacken
 :demand t
 :after python
 :init
  (add-hook 'python-mode-hook 'blacken-mode)
)

(use-package python
 :mode ("\\.py\\'" . python-mode)
 :interpreter ("python" . python-mode)
 :config
 (progn (setq python-shell-interpreter "python")
        (setq python-indent-offset 4)
        (setq python-shell-completion-native-disabled-interpreters '("python"))))

(use-package virtualenvwrapper
  :config
  (venv-initialize-interactive-shells)
  (venv-initialize-eshell))

(venv-workon "torch")
(setq lsp-python-executable-cmd "python")

But everytime I save a Python file, the buffer is scrolled, so that the cursor is recentered. This irritates me massively. Is there a way to disable it please?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.