mirror of
https://github.com/doomemacs/doomemacs
synced 2025-08-03 12:27:26 -05:00
Remove redundant +default/lsp-format-region-or-buffer command
This commit is contained in:
@ -36,17 +36,6 @@ If ARG (universal argument), runs `compile' from the current directory."
|
||||
(with-current-buffer buffer
|
||||
(funcall (default-value 'major-mode))))))
|
||||
|
||||
;;;###autoload
|
||||
(defun +default/lsp-format-region-or-buffer ()
|
||||
"Format the buffer (or selection) with LSP."
|
||||
(interactive)
|
||||
(unless (bound-and-true-p lsp-mode)
|
||||
(user-error "Not in an LSP buffer"))
|
||||
(call-interactively
|
||||
(if (doom-region-active-p)
|
||||
#'lsp-format-region
|
||||
#'lsp-format-buffer)))
|
||||
|
||||
;;;###autoload
|
||||
(defun +default/restart-server ()
|
||||
"Restart the Emacs server."
|
||||
|
@ -220,7 +220,9 @@ is selected)."
|
||||
(interactive)
|
||||
(call-interactively
|
||||
(if (bound-and-true-p lsp-mode)
|
||||
#'+default/lsp-format-region-or-buffer
|
||||
(if (doom-region-active-p)
|
||||
#'lsp-format-region
|
||||
#'lsp-format-buffer)
|
||||
(if (use-region-p)
|
||||
#'+format/region
|
||||
#'+format/buffer))))
|
||||
|
Reference in New Issue
Block a user