Skip to content
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

feat(config): look up from .config subdir by default, too #933

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

scop
Copy link
Contributor

@scop scop commented Jan 19, 2025

Closes # (issue)

⚡ Summary

Look up configs from .config subdirs too, to help unclutter project top level dirs, https://github.com/pi0/config-dir (and other similar proposals)

pi0/config-dir support discussion item: pi0/config-dir#6 (comment)

This is a draft for discussion purposes, to be still done at least

  • tests
  • the .config/lefthook and .config/lefthook-local source dirs should work out of the box, too
  • decide how relative paths should work and make sure they do that way, e.g. should they always be from the "top level dir" no matter if the config is in .config, or relative to that dir (I think I'd propose the former)
  • remove with uninstall

☑️ Checklist

  • Check locally
  • Add tests
  • Add documentation

@scop scop marked this pull request as draft January 19, 2025 09:35
@mrexox
Copy link
Member

mrexox commented Jan 20, 2025

Hey! This sounds good! Could you also add the paths to uninstall?

I don't think moving scripts to .config/ is a good idea, since scripts are not configs actually, they must belong to repo root.

Regarding the paths I think it's better consider lefthook as being run from git project root always, for simplicity. So moving a file from repo root to .config/ doesn't make you change the config adding ../ to the root option, etc.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants