-
Notifications
You must be signed in to change notification settings - Fork 84
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
Add other optional paths to the default configuration #396
Comments
Thanks, this looks interesting.
Do you have anything specific in mind as to how this would work? |
How does Perl know about the directory latexindent.pl/LatexIndent/GetYamlSettings.pm Line 123 in 8234ea6
|
Considering other projects, I imagined something like an environment variable, named
As far as I know environment variable are accessible under the After looking into this, I could properly come up with a pull request. |
Great, many thanks, a pull request would be great.
Just in case it's relevant : it's really important that latexindent does
not require any further Perl modules, so please keep solutions based on
currently loaded modules.
…On Tue, 20 Dec 2022, 16:54 Nehctarg, ***@***.***> wrote:
Do you have anything specific in mind as to how this would work?
Considering other projects, I imagined something like an environment
variable, named LATEXINDENT_CONFIG or so, which contains the path to the
indentconfig.yaml file. This value would than be favored above the
defaults. This makes it painless to change the config location to some
arbitrary place, whilst also making implementation painless because one
would just have to look at the LATEXINDENT_CONFIG environment variable.
How does Perl know about the directory $XDG_CONFIG_DIR/?
As far as I know environment variable are accessible under the %ENV
register, so to get the value stored in XDG_CONFIG_HOME one would use
$ENV{XDG_CONFIG_HOME}.
After looking into this, I could properly come up with a pull request.
—
Reply to this email directly, view it on GitHub
<#396 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAQ7CYDKAQWHCZXXIMZAJB3WOHQCZANCNFSM6AAAAAATEUFUZE>
.
You are receiving this because you commented.Message ID:
***@***.***>
|
Implemented as of #397 (Please leave this open until released). Thanks again! |
This is part of Many thanks for your contribution! :) |
Linux
Reference to the XDG-specification: https://specifications.freedesktop.org/basedir-spec/basedir-spec-latest.html
$XDG_CONFIG_DIR/latexindent
to the optional locations where the configuration files (i.e.indentconfig.yaml
and.indentconfig.yaml
) can be stored (e.g. use$XDG_CONFIG_DIR/latexindent/indentconfig.yaml
instead of$HOME/indentconfig.yaml
)Windows
Disclaimer: I don't use this platform so my information might be off, but as far as I know you should change the
$XDG_CONFIG_HOME
with%LOCALAPPDATA%
.The text was updated successfully, but these errors were encountered: