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

Optionally load init.scm and helix.scm from .helix/ #6

Conversation

MatrixManAtYrService
Copy link

@MatrixManAtYrService MatrixManAtYrService commented Sep 16, 2024

First, thanks for your work on this fork. I'm pretty excited about using it to do unnatural things to helix 😈

This PR makes it easy to switch in/out of a helix plugin dev environment.

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 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.

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

(Sorry for the duplicate re: #4, I made a branch naming mistake)

@MatrixManAtYrService MatrixManAtYrService marked this pull request as ready for review September 16, 2024 03:50
@mattwparas
Copy link
Owner

Sorry for the delay on this - lgtm

@mattwparas mattwparas merged commit 4c82a21 into mattwparas:steel-event-system Oct 5, 2024
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