Skip to content

Expanding envs in language config #13524

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

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

Conversation

kj-crypto
Copy link

This is simple expansion of the shell variables in languages.toml config. This allows to write such expression

[[language]]
name = "go"
formatter = { command = "${HOME}/go/bin/goimports" }

The envs to expand are limited by AllowedEnv enum and currently only allowed on linux OS.
Tested with hx --health go and during working on golang source code

@nik-rev
Copy link
Contributor

nik-rev commented May 14, 2025

Helix already has a system for expansions, e.g. :echo %{cursor_line}

It will be easier and more consistent to re-use that rather than Regex

@kj-crypto
Copy link
Author

Thanks for pointing it out. I will integrate it with helix::stdx

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