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

Allow overwrite of config file, config directory and languages.toml #1182

Closed
Stupremee opened this issue Nov 28, 2021 · 5 comments
Closed

Allow overwrite of config file, config directory and languages.toml #1182

Stupremee opened this issue Nov 28, 2021 · 5 comments
Labels
A-packaging Area: Packaging and bundling C-enhancement Category: Improvements

Comments

@Stupremee
Copy link

Stupremee commented Nov 28, 2021

Describe your feature request

I'm currently packaging Helix into a nice NixOS module similar, but much better IMO, to the Neovim module in Home-Manager.
However, it's currently not possible to overwrite the Config file and other directories (except runtime directory), which doesn't work
well with NixOS as I will write the immutable config into the Nix store and Helix should use that one.

I suggest doing the following:

  • Allow overwriting the path to the config file (via CLI or environment variable, like -u in Neovim)
    This will not change the config directory, so the languages.toml can still be found at ~/.config/helix/languages.toml
  • Allow overwriting the path for the language config (this will just overwrite the path for the languages.toml configuration, nothing else)
  • Allow overwriting the whole config directory which will change language config and config file location to the new path

I would be ready to open a PR because this is a very important feature for me!

@Stupremee Stupremee added the C-enhancement Category: Improvements label Nov 28, 2021
@Stupremee Stupremee changed the title Allow overwrite of config file, config directory and languages directory Allow overwrite of config file, config directory and languages.toml Nov 28, 2021
@archseer
Copy link
Member

home-manager should be able to write to the xdg config directory just fine though.

home-manager.users.<user>.xdg.configFile."helix/helix.config" etc

@Stupremee
Copy link
Author

Stupremee commented Nov 28, 2021

Yes, I know, but I'm not writing a home-manager module.

@archseer
Copy link
Member

archseer commented Dec 2, 2021

Neovim module in Home-Manager

Yeah okay, I was going off of this. Well, we lookup the xdg config directory to find the underlying location so you could set XDG_CONFIG_HOME to your desired location?

@Stupremee
Copy link
Author

Yeah that was badly written 😅
It was meant in API ways so that you can configure Helix using Nix Language.

Oh that would work too I guess. I will try that. Thank you!

@kirawi kirawi added A-helix-term Area: Helix term improvements A-packaging Area: Packaging and bundling and removed A-helix-term Area: Helix term improvements labels Dec 3, 2021
@the-mikedavis
Copy link
Member

Let's close this out in favor of #1216 which is more focused towards the CLI switch for choosing a config file. #2135 should allow the remaining customization.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-packaging Area: Packaging and bundling C-enhancement Category: Improvements
Projects
None yet
Development

No branches or pull requests

4 participants