helix-editor/helix
Tooling
Build, lint, generation, and CI tools that are part of working on Helix.
cargo (the obvious one)
The Rust toolchain is pinned at MSRV 1.90 via rust-toolchain.toml. If you use rustup it picks this up automatically; you may need rustup component add rust-analyzer separately because the toolchain file pins the compiler but not RA.
Cargo features used by the workspace:
git(default-on forhelix-term) — enables the gix-based VCS backend inhelix-vcs.unicode-lines— extra Unicode line-break characters inhelix-coreandhelix-view.integration(helix-eventandhelix-term) — used by the integration test profile.
xtask
xtask/ is the project's task runner. Three subcommands today:
| Command | What it does |
|---|---|
cargo xtask docgen |
Regenerates book/src/generated/{typable-cmd,static-cmd,lang-support}.md from the live command/language tables. Run after adding a command or language. |
cargo xtask query-check [lang ...] |
Validates runtime/queries/<lang>/*.scm against the loaded grammars. Defaults to all languages. |
cargo xtask theme-check [theme ...] |
Loads every runtime/themes/*.toml and reports warnings. Defaults to all themes. |
The xtask source is short — see xtask/src/main.rs and xtask/src/docgen.rs.
CI
Workflows live in .github/workflows/:
build.yml— Build matrix (4 OS), tests, lints, docs check. Triggered on PR, push to master, the merge group, and a nightly schedule.release.yml— Builds release artifacts when a tag is pushed.gh-pages.yml— Builds and publishes docs.helix-editor.com (the mdBook).languages.toml— Validateslanguages.tomlchanges.cachix.yml— Caches Nix builds.
rustfmt and clippy
rustfmt.toml is empty — Helix uses default formatting. Both cargo fmt --check and cargo clippy -D warnings are required by CI.
Documentation site
The user-facing docs are an mdBook at book/. Build locally:
mdbook serve book
# open http://localhost:3000The book includes auto-generated pages under book/src/generated/ produced by xtask docgen. Editing those by hand is a mistake — they'll be overwritten on the next docgen run.
Nix
The repo provides Nix support:
flake.nix— the modern entry point (nix develop).shell.nixanddefault.nix— legacy entry points.grammars.nix— Nix expressions for the bundled tree-sitter grammars.
The Nix dev shell pins all build dependencies including the rust-analyzer matching the MSRV, which avoids the rustup component issue mentioned above.
Cargo profiles
| Profile | Inherits | When |
|---|---|---|
dev |
(default) | Local iteration. Fast compile, slow runtime. |
release |
(default) | cargo build --release. Thin LTO. |
opt |
release |
cargo install --profile opt. Fat LTO, codegen-units=1, stripped. Used by packagers and the release builds. |
integration |
test |
cargo integration-test. Optimises the heavy crates so the test suite finishes quickly. |
See Cargo.toml for the full table.
Pre-commit hooks
Helix doesn't ship pre-commit hooks. Many contributors set up local Git hooks to run cargo fmt and cargo clippy automatically — the convention is to keep that personal rather than centralized.
Editorconfig
The repo has no .editorconfig of its own — Helix is the editor, and the project's editorconfig support kicks in when you edit a project that does have one. The implementation lives in helix-core/src/editor_config.rs.
Cargo metadata.deb
The Debian package configuration is embedded in helix-term/Cargo.toml under [package.metadata.deb]. It lists the assets to bundle (binary, runtime files, completions, desktop entry, icon). Build the .deb with:
cargo install cargo-deb
cargo deb -- --lockedThe output lands in target/debian/. See book/src/building-from-source.md for the user-facing instructions.
Logging the editor's tooling
When debugging integrations (LSP, DAP, formatters, the grammar build), enable trace-level logging and watch for the spawn arguments:
hx -vvv --log /tmp/helix.logMost integrations log the exact command line they run, which is the fastest way to see "Helix is calling clippy with these args; let me run it manually".
Built by Factory AutoWiki from public repository content. It is a generated preview for codebase exploration, not source-maintained documentation.