Closed Terseus closed 3 weeks ago
Just ran into this myself
will try and find some time tomorrow to take a look if not
What version of stylua are you using? I (obviously) use it all the time and haven't encountered any problems
Side note, for the args modification you made passing in the filename explicitly, you'll also want to set stdin = false
. That's the reason you have to :e
to force Neovim to see the changes.
My issue was using an old nightly build of 0.10, i upgraded to nightly 0.11 and it was resolved, apologies.
@stevearc
❯ stylua --version
stylua 0.20.0
Sorry, my bad, I had a .styluaignore
file with a silly rule that made stylua to ignore the specific directory with all of my plugins configs, thus looking like stylua didn't worked when using conform, only when using pre-commit or direct file formatting (for some reason).
Removing the .styluaignore
made conform.nvim work with stylua without any problem.
Closing the issue, as it's invalid.
Neovim version (nvim -v)
NVIM v0.10.0
Operating system/version
Archlinux
Add the debug logs
log_level = vim.log.levels.DEBUG
and pasted the log contents below.Log file
Describe the bug
stylua formatter doesn't respect the config file stylua.toml file, in my case located at:
If I run
:lua require("conform").format()
in Neovim there's no change in my badly formatted lua file. If I runstylua <filename>
from the terminal from the directory/home/terseus/dotfiles
stylua formats the file as expected.What is the severity of this bug?
blocking (cannot use plugin)
Steps To Reproduce
:lua require("conform").format()
stylua <filename>
from the terminal.Expected Behavior
require("conform").format()
stylua formatting should be equivalent to running it from the terminal.Minimal example file
See "Steps To Reproduce".
Minimal init.lua
Additional context
I've found that it works (somehow) if I change stylua
args
:With this config stylua formats the file, although it doesn't get updated in the UI, I have to do
:e
to force Neovim to load the file and see it formatted.