config/default: bind SPC c {F,i,r} to LSP commands
These are experimental keybinds. I'm looking for a way to integrate LSP's formatter commands (and lsp-organize-imports) into the :editor format module. And a way to unify refactoring commands (perhaps with emr or erefactor), including lsp-rename. - 'SPC c F' -> format region or buffer - 'SPC c i' -> organize imports - 'SPC c r' -> rename symbol at point Addresses #1417
This commit is contained in:
parent
fecca3188a
commit
d246307f87
2 changed files with 12 additions and 1 deletions
|
@ -315,3 +315,12 @@ ARG is set, prompt for a known project to search from."
|
|||
(interactive)
|
||||
(doom-completing-read-org-headings
|
||||
"Jump to org headline: " org-agenda-files 3 t))
|
||||
|
||||
;;;###autoload
|
||||
(defun +default/lsp-format-region-or-buffer ()
|
||||
"Format the buffer (or selection) with LSP."
|
||||
(interactive)
|
||||
(call-interactively
|
||||
(if (use-region-p)
|
||||
#'lsp-format-region
|
||||
#'lsp-format-buffer)))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue