Open abhinavnatarajan opened 1 month ago
If your formatter fails, it usually indicates there is either something wrong with your formatter or the file you are formatting. In either case, it seems like you would typically want to fix the root problem. Do you have a common case where your formatter fails and you do not intend to fix it?
This seems to happen a lot with bigger filex or with slower machines @stevearc I am having this issue quite a lot... When I do open a lot of projects conform is the first to start throwing, while without it things work fine
Did you check existing requests?
Describe the feature
Fallback to LSP formatting if
lsp_fallback
is set to true and formatting fails.Provide background
The current behaviour of
conform.format({lsp_fallback = true})
is to fallback to LSP formatting only if there are no formatters available for the buffer. If a formatter is available, LSP fallback will not be used even if formatting fails.What is the significance of this feature?
nice to have
Additional details
This is simple enough to implement using the callback feature of
conform.format()
, but I find the current behaviour unintuitive/surprising. It would be nice to have LSP fallback upon failure as default behaviour (assuminglsp_fallback = true
).