Remove redundant +default/lsp-format-region-or-buffer command
This commit is contained in:
parent
bc0477c3ba
commit
da2247e3d6
2 changed files with 3 additions and 12 deletions
|
@ -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))))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue