You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have set log_level = vim.log.levels.DEBUG and pasted the log contents below.
Log file
Without DEBUG log level:
04:03:52[ERROR] Formatter 'prettierd' error:
With DEBUG log level:
04:05:21[DEBUG] Running formatters on /home/powerman/tmp/bug-nvim-conform-prettierd/test.html: { "prettierd" }
04:05:21[INFO] Run prettierd on /home/powerman/tmp/bug-nvim-conform-prettierd/test.html
04:05:21[DEBUG] Run command: { "/home/powerman/node_modules/.bin/prettierd", "/home/powerman/tmp/bug-nvim-conform-prettierd/test.html" }
04:05:21[DEBUG] Run CWD: /home/powerman
04:05:21[INFO] prettierd exited with code 1
04:05:21[DEBUG] prettierd stdout: { 'SyntaxError: Unexpected closing tag "p". It may happen when the tag has already been closed by another tag. For more info see https://www.w3.org/TR/html5/syntax.html#closing-elements-that-have-implied-end-tags (1:15)', "\27[0m\27[31m\27[1m>\27[22m\27[39m\27[90m 1 |\27[39m \27[33m<\27[39m\27[33mp\27[39m\27[33m>\27[39m\27[33m<\27[39m\27[33mpre\27[39m\27[33m>\27[39m\27[33m<\27[39m\27[33m/\27[39m\27[33mpre\27[39m\27[33m>\27[39m\27[33m<\27[39m\27[33m/\27[39m\27[33mp\27[39m\27[33m>\27[39m", " \27[90m |\27[39m \27[31m\27[1m^\27[22m\27[39m\27[31m\27[1m^\27[22m\27[39m\27[31m\27[1m^\27[22m\27[39m\27[31m\27[1m^\27[22m\27[39m", " \27[90m 2 |\27[39m\27[0m", "" }
04:05:21[DEBUG] prettierd stderr: { "" }
04:05:21[ERROR] Formatter 'prettierd' error:
Describe the bug
Without DEBUG log level :ConformInfo does not show actual error message:
As it became clear from log with DEBUG log level the real problem is prettierd output error to STDOUT instead of STDERR plus use colored output.
What is the severity of this bug?
tolerable (can work around it)
Steps To Reproduce
Create file test.html with content provided below.
nvim -u repro.lua test.html
:lua require('conform').format()
:ConformInfo
With DEBUG log level you'll see error message but it'll be unreadable, without DEBUG there will be no error message at all.
Expected Behavior
prettierd error should be included in :ConformInfo output with ERROR log level and without terminal escape-sequences.
Minimal example file
<p><pre></pre></p>
Minimal init.lua
-- DO NOT change the paths and don't remove the colorschemelocalroot=vim.fn.fnamemodify("./.repro", ":p")
-- set stdpaths to use .reprofor_, nameinipairs({ "config", "data", "state", "cache" }) dovim.env[("XDG_%s_HOME"):format(name:upper())] =root.."/" ..nameend-- bootstrap lazylocallazypath=root.."/plugins/lazy.nvim"ifnotvim.loop.fs_stat(lazypath) thenvim.fn.system({
"git",
"clone",
"--filter=blob:none",
"--single-branch",
"https://github.com/folke/lazy.nvim.git",
lazypath,
})
endvim.opt.runtimepath:prepend(lazypath)
-- install pluginslocalplugins= {
"folke/tokyonight.nvim",
{
"stevearc/conform.nvim",
config=function()
require("conform").setup({
log_level=vim.log.levels.DEBUG,
-- add your config hereformatters_by_ft= {
html= { "prettierd" },
},
})
end,
},
-- add any other plugins here
}
require("lazy").setup(plugins, {
root=root.."/plugins",
})
vim.cmd.colorscheme("tokyonight")
-- add anything else here
Additional context
No response
The text was updated successfully, but these errors were encountered:
Neovim version (nvim -v)
v0.10.0
Operating system/version
Gentoo Linux
Add the debug logs
log_level = vim.log.levels.DEBUG
and pasted the log contents below.Log file
Without DEBUG log level:
With DEBUG log level:
Describe the bug
Without DEBUG log level

:ConformInfo
does not show actual error message:As it became clear from log with DEBUG log level the real problem is

prettierd
output error to STDOUT instead of STDERR plus use colored output.What is the severity of this bug?
tolerable (can work around it)
Steps To Reproduce
test.html
with content provided below.nvim -u repro.lua test.html
:lua require('conform').format()
:ConformInfo
Expected Behavior
prettierd
error should be included in:ConformInfo
output with ERROR log level and without terminal escape-sequences.Minimal example file
Minimal init.lua
Additional context
No response
The text was updated successfully, but these errors were encountered: