Open-Source Wikis

/

Helix

/

How to contribute

/

Tooling

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 for helix-term) — enables the gix-based VCS backend in helix-vcs.
  • unicode-lines — extra Unicode line-break characters in helix-core and helix-view.
  • integration (helix-event and helix-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/:

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:3000

The 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:

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

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

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

Tooling – Helix wiki | Factory