-
Notifications
You must be signed in to change notification settings - Fork 176
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
How to set cwd on formatter? #588
Comments
The built-in formatter for csharpier uses the command conform.nvim/lua/conform/formatters/csharpier.lua Lines 7 to 9 in 62d5acc
It's actually important that the command = "dotnet",
args = { "csharpier", "--write-stdout" }, |
Right, it’s actually the same tool, the difference is that dotnet-csharpier invokes the version installed by mason(which for some reason is rather old), while ‚dotnet csharpier’ runs the version installed locally for a given project (via ‚dotnet tool’ utility). to invoke the proper version of csharpier I need to invoke ‚dotnet tool’ from within the same directory where my .csproj is located. |
Did you try my suggestion? |
It seems to work fine after applying your suggested config. I did not set any cwd. What is the command's directory by default? |
If the cwd is not specified in the formatter config, it will default to Neovim's cwd ( |
I'm struggling with providing a valid config for csharpier:
By default, conform uses csharpier from mason, but I'd rather want to use the version configured in a project that I'm working on, therefore I want to invoke
dotnet csharpier
from the directory where my project is located (.csproj
).What am I doing wrong?
:ConformInfo
shows:The text was updated successfully, but these errors were encountered: