-
-
Notifications
You must be signed in to change notification settings - Fork 5
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
Config Files of the individual formatters not detected? #35
Comments
The
I assume that is the directory you run
It should not make a difference, but to eliminate as many variables as possible, can you try to just run |
yeah, so I tried running # pwd contains the stylua.toml file
cat ./lua/funcs/test.md | cbfmt --stdin-filepath ./lua/funcs/test.md --best-effort --config ../linter-configs/cbfmt.toml and the output is correctly formatted, stylua used my config file. When I then run My null-ls config for cbfmt, which should result in the same result as the bash command above: null_ls.builtins.formatting.cbfmt.with {
extra_args = { "--config", "/Users/chrisgrieser/.config/linter-configs/cbfmt.toml" },
}, So maybe this is somehow null-ls related? But the thing, the cbfmt file is recognized – otherwise cbfmt would not run. when I explicitly name a config file, it does work though: # does not recognize stylua config
[languages]
lua = ["stylua --search-parent-directories -"]
# recognizes stylua config
[languages]
lua = ["stylua --config-path=/Users/chrisgrieser/.config/linter-configs/stylua.toml -"] |
Yeah sounds like it's an issue with null-ls. Maybe null-ls runs it in the wrong directory? I'd open an issue over there |
okay. weird thing is, that every other formatter works fine in recognizing the respective config files 🤔 But I guess in that case I'll open an issue with null-ls I'd have asked whether you could take a look at the respective file from null-ls defining the configs, but I noticed that you added it, so I assume there is no issue there 😅 |
Thanks for this small nifty tool.
I was wondering how exactly one can use config files for the specific formatters? For example with stylua.
I run
cbfmt
ascbfmt --config "$some_path"
. The specifiedcbfmt.toml
is correctly recognized, since adding / removinglua
does make a difference. However, I cannot figure out how to make cbfmt make stylua use a config file.I have a
stylua.toml
in the same directory as thecbfmt.toml
, and also in the nvim-pwd when executting the formatting command (via null-ls). However, cbfmt-run-stylua does not seem to recognize it since it seems to run on default config.my config example
I mean, I could explicitly run add a
--config
to thecbfmt.toml
, but that would be really cumbersome.The text was updated successfully, but these errors were encountered: