mirror of
https://github.com/doomemacs/doomemacs
synced 2025-08-01 12:17:25 -05:00
Use lsp-format-region-or-buffer if available
Currently the user has to select `SPC c F` for lsp format. But if lsp-mode is enabled, the user will always want to use the LSP formatter. So this changes the default `SPC c f` to use lsp formatter if available. This simplifies the interface a bit so the user doesn't have to worry about selecting the "right" format, just like how other commands get auto bound to LSP functions.
This commit is contained in:
@ -360,7 +360,6 @@
|
||||
:desc "Jump to documentation" "k" #'+lookup/documentation
|
||||
(:when (featurep! :tools lsp)
|
||||
:desc "LSP Execute code action" "a" #'lsp-execute-code-action
|
||||
:desc "LSP Format buffer/region" "F" #'+default/lsp-format-region-or-buffer
|
||||
:desc "LSP Organize imports" "i" #'lsp-organize-imports
|
||||
:desc "LSP Rename" "r" #'lsp-rename
|
||||
(:after lsp-mode
|
||||
|
Reference in New Issue
Block a user