mattwparas / helix

A post-modern modal text editor.
https://helix-editor.com
Mozilla Public License 2.0
34 stars 0 forks source link

Optionally load init.scm and helix.scm from `./.helix` #4

Closed MatrixManAtYrService closed 2 months ago

MatrixManAtYrService commented 2 months ago

Firstly, thank you for your work on this fork. I'm pretty excited about the prospect of using it to do unnatural things to helix 😈

Suppose I'm writing a helix plugin and making a terrible mess in helix.scm and init.scm, and then I get paged for a work thing. I want to be able to quickly transition out of my mess, handle the page with my normal helix configs, and then transition back into the mess and continue development. I'm playing with the idea of doing this by cd-ing in/out of the plugin project directory.

This PR changes helix so that it will load helix.scm and init.scm in a way that resembles how it loads languages.toml--that is, it will pick read files if they both exist in ./.helix. Otherwise, it will consult ~/.config/helix (as it did before). This dependency on the CWD makes it possible to achieve the environment-switching that I'm shooting for.

MatrixManAtYrService commented 2 months ago

I am a rust novice, and not familiar with developing helix. If there's a better way to do this, I'm all ears.