[REQUEST] Only use format-all-the-code
if the language server doesn't support formatting
#1652
Labels
is:feature
Adds or requests new features, or extends existing ones
module:editor/format
Pertains to Doom's :editor format module
module:tools/lsp
Pertains to Doom's :tools lsp module
status:resolved
Issue was addressed internally
Describe the feature
The basic idea has been introduced to
format-all-the-code
in lassik/emacs-format-all-the-code#47. The assumption is that a language server probably has a better idea how to format the code than any default set informat-all-the-code
. The proposal, quoted from there, goes like this:lsp-mode
is not enabled for the current buffer, fallback to the current behaviour.textDocument/formatting
capability of the current language server (or maybe servers, since that's apparently a supported workflow). If it's not available, fallback to current behaviour.textDocument/formatting
(probably vialsp-format-buffer
) instead of the predefined tool.It's not clear whether it's a better idea to make
format-all-the-things
LSP-aware or extenddoom-emacs
' auto-formatting wrapper. Either way I'd be happy to have the feature.System information
The text was updated successfully, but these errors were encountered: