-
-
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
Unify and clarify config loading #5636
Closed
Closed
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Co-authored-by: Michael Davis <mcarsondavis@gmail.com>
This is an implementation for helix-editor#3346. Previously, one of the following runtime directories were used: 1. `$HELIX_RUNTIME` 2. sibling directory to `$CARGO_MANIFEST_DIR` 3. subdirectory of user config directory 4. subdirectory of path to helix executable The first directory provided / found to exist in this order was used as a root for all runtime file searches (grammars, themes, queries). This change lowers the priority of `$HELIX_RUNTIME` so that the user config runtime has higher priority. More significantly, all of these directories are now searched for runtime files, enabling a user to override default or system-level runtime files. If the same file name appears in multiple runtime directories, the following priority is now used: 1. sibling directory to `$CARGO_MANIFEST_DIR` 2. subdirectory of user config directory 3. `$HELIX_RUNTIME` 4. subdirectory of path to helix executable One exception to this rule is that a user can have a `themes` directory directly in the user config directory that has higher piority to `themes` directories in runtime directories. That behaviour has been preserved. As part of implementing this feature `theme::Loader` was simplified and the cycle detection logic of the theme inheritance was improved to cover more cases and to be more explicit.
I'd prefer PRs didn't bundle other PRs. While #5411 will get merged I'd rather review it as a standalone unit since it's much more manageable to land one by one. |
HELIX_LOG_LEVEL env variable can now also be set in a non integration test environment.
gibbz00
force-pushed
the
unify-config
branch
from
February 16, 2023 12:43
7e45727
to
d1135f7
Compare
Stupidly hard to differentiate it with config::Config.
A step in making it more in line to how the other configs are loaded.
gibbz00
force-pushed
the
unify-config
branch
from
February 16, 2023 18:47
fd3a5ea
to
278c0b9
Compare
paves the way for a Default implementation for Theme
gibbz00
force-pushed
the
unify-config
branch
2 times, most recently
from
February 16, 2023 20:10
5e9d0a1
to
cf98312
Compare
Does so by assuming empty string implyies default theme in Theme::new. Paves the way to make Config::default() to be derivable.
gibbz00
force-pushed
the
unify-config
branch
from
February 16, 2023 21:43
cf98312
to
64eaf09
Compare
* Allow override of predifinde infobox descriptions. * Make sure that custom description overrider on infoboxes can be done without additional remappings of the same keytrie.
How should I treat PRs such as: #5839? It heavily conflicts with this one. Merge it now or only when/if the other is merged into master? |
Closed
Closing as stale |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
A-helix-term
Area: Helix term improvements
S-waiting-on-pr
Status: This is waiting on another PR to be merged first
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
The PR aims to reduce the omissions of necessary reliability checks when loading the configs (editor, theme, lang), whilst hopefully also improving code maintainability. All in all,
xtask
,helix_loader
andhelix_term::{main, appliction}
have been cleaned up quite significantly. Steps are documented in the commit messages.Relies on #5635
Identify and merge PRs that clash with this one.
My only gripe from #5411 was that it now places
hx --grammar (fetch|build)
files intoXDG_CONFIG_HOME
(.config/
), under the condition that it exists. Would much rather prefer it to look inXDG_DATA_HOME
(.local/share
) first. Which is something I've added in this PR. This might be a solution to #584, and an alternative to #5603. In fact, #3202 is the improvement suggested by #584's author:Does also not change log file location to an OS state directory, as it may not exist on all platforms.
hx
CLI file args #5945Suggestions:
configuration.md
. Alternatively generateconfigugration.md
from them.Conflicting PRs (28)
#5411 #5435 #5436 #5491 #5523 #5577 #5608 #5621 #5645 #5660 #5748 #5803 #5839 #5860 #5893 #5931 #6056 #6059 #6061 #6065 #6067 #4307 #4443 #4493 #5199 #2869 #3328 #3393
* That are mergeable with master and pass all CI checks as of 2023-02-22