Skip to content

lsp-mode keeps prompting "File to save in" in minibuffer when the buffer content is changed #4418

Answered by IceAsteroid
IceAsteroid asked this question in Q&A
Discussion options

You must be logged in to vote

It turns out that the culprit was a command that I defined. :(

;;; My self-defined functions
;; my/toggle-edition
(defun my/toggle-edition-setup ()
  ;;(add-hook 'find-file-hook 'read-only-mode)
  ;;(add-hook 'read-only-mode-hook
  ;;	    (lambda ()
  ;;	      (unless (buffer-match-p ".*\\*scratch\\*.*" (current-buffer))
  ;;		(save-buffer))))
  (with-eval-after-load 'corfu (add-hook 'read-only-mode-hook 'corfu-quit))
  (with-eval-after-load 'company (add-hook 'read-only-mode-hook 'company-abort))
  (defun my/toggle-edition-command ()
    (interactive)
    (read-only-mode 'toggle))
  (global-set-key (kbd "C-`") 'my/toggle-edition-command)
  )
(my/toggle-edition-setup)

The part which is t…

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by IceAsteroid
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
1 participant