conform.nvim icon indicating copy to clipboard operation
conform.nvim copied to clipboard

Question: How to print error message with conform.nvim

Open M-Xue opened this issue 1 year ago • 2 comments

When I save a file with conform.nvim attaching a formatter on it and there is a syntax error, I get this error message.

image

This error message disappears when I remove the format_on_save.

From my understanding, conform.nvim does capture the particular error but puts it in an error log file that can be seen with :ConformInfo.

image

How do I get this error to print instead of needing to go to the log file through :ConformInfo instead?

M-Xue avatar Mar 02 '24 23:03 M-Xue

Is there a way to maybe write an autocommand to trigger formatting with the format function and capture the error to print instead?

M-Xue avatar Mar 03 '24 01:03 M-Xue

This is not normal behavior; conform should be catching errors and re-displaying them when needed. There shouldn't be any errors that bubble up to the autocmd itself. Can you provide a minimal init.lua file that will reproduce this behavior?

stevearc avatar Mar 18 '24 05:03 stevearc