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 would expect conform to respect Prettier's printWidth setting which automatically would wrap the code/text given a max width/length, but it doesn't somehow.
What is the severity of this bug?
tolerable (can work around it)
Steps To Reproduce
mkdir test# create a test dircdtest# cd into itecho"{"printWidth": 50}"> .prettierrc # create a prettier config setting max width to 50echo"{"private": true}"> package.json # startup npm
npm i prettier -D # install prettier under `devDependencies`
nvim index.js # open a javascript file in nvim
Just start typing until the text is longer than 50 characters and run the formatter.
Expected Behavior
On format the printWidth setting should be respected.
Minimal example file
No response
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 here
})
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:
It looks like you have pasted some of the contents of :ConformInfo, but there are no actual logs. The logs are important because they will display what command was actually being run. You should find the prettier command that conform is issuing and try running it directly yourself on the command line. Usually this helps narrow down the cause of the problem.
Neovim version (nvim -v)
v0.10.0
Operating system/version
macOS Sonoma 14.5
Add the debug logs
log_level = vim.log.levels.DEBUG
and pasted the log contents below.Log file
Log file: /Users/rinaldi/.local/state/nvim/conform.log
Formatters for this buffer:
LSP: eslint, vtsls
prettier ready (html, javascript, jsonc, markdown.mdx, typescriptreact, typescript, graphql, handlebars, less, scss, json, yaml, javascriptreact, css, vue, markdown) /Users/rinaldi/work/web-react/node_modules/.bin/prettier
Other formatters:
fish_indent ready (fish) /opt/homebrew/bin/fish_indent
shfmt ready (sh) /Users/rinaldi/.local/share/nvim/mason/bin/shfmt
stylua ready (lua) /Users/rinaldi/.local/share/nvim/mason/bin/stylua
Describe the bug
I would expect conform to respect Prettier's
printWidth
setting which automatically would wrap the code/text given a max width/length, but it doesn't somehow.What is the severity of this bug?
tolerable (can work around it)
Steps To Reproduce
Just start typing until the text is longer than 50 characters and run the formatter.
Expected Behavior
On format the
printWidth
setting should be respected.Minimal example file
No response
Minimal init.lua
Additional context
No response
The text was updated successfully, but these errors were encountered: