-
-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
expand tilde to home-directory for language formatter command args #5538
Comments
I cannot come up with an easy fix for this, because blindly "replacing any tilde found at the beginning of a string in the args list with $HOME" likely breaks something else/is dangerous. Maybe add an extra field Other way to fix this would be hacking deno to have a default global config file path? Workaround, for deno only and ugly: omit the |
I suppose we could use either |
silly me, I can make it work myself right now like this:
but yes using |
linked? #7624 |
just a heads up for people looking for this tilde-expanding feature, it has not been implemented, the workaround calling your shell shown above is still needed. Which is fine by me, as calling the shell for every command is useless overhead, therefore configuring the shell invocation explicitly is preferable. |
For formatter = { command = "bash", args = ["-c", "clang-format --style=file:$HOME/.config/clang-format" ] } Thank you! |
right now in my
languages.toml
I have this:formatter = { command = 'deno', args = ["fmt", "-", "--ext", "md", "--config", "/home/mike/.config/deno.json" ] }
however in order to be compatible to any environment I'd like to store this in my dotfiles repo:
formatter = { command = 'deno', args = ["fmt", "-", "--ext", "md", "--config", "~/.config/deno.json" ] }
reasoning:
/Users/kmike
, I'd like to share my configs hence tilde-expansion to homedir is neededproblem:
right now using tilde breaks calling the formatter because it tries to open
$(cwd)/~/.config/deno.json
which does not exist.The text was updated successfully, but these errors were encountered: