3.2 KiB
Contributing
Contributors are very welcome! No contribution is too small and all contributions are valued.
Some suggestions to get started:
- You can look at the good first issue label on the issue tracker.
- Help with packaging on various distributions needed!
- To use print debugging to the Helix log file, you must:
- Print using
log::info!
,warn!
, orerror!
. (log::info!("helix!")
) - Pass the appropriate verbosity level option for the desired log level. (
hx -v <file>
for info, morev
s for higher verbosity) - Want to display the logs in a separate file instead of using the
:log-open
command in your compiled Helix editor? Start your debug version withcargo run -- --log foo.log
and in a new terminal usetail -f foo.log
- Print using
- Instead of running a release version of Helix, while developing you may want to run in debug mode with
cargo run
which is way faster to compile - Looking for even faster compile times? Give a try to mold
- If your preferred language is missing, integrating a tree-sitter grammar for it and defining syntax highlight queries for it is straight forward and doesn't require much knowledge of the internals.
We provide an architecture.md that should give you a good overview of the internals.
Auto generated documentation
Some parts of the book are autogenerated from the code itself,
like the list of :commands
and supported languages. To generate these
files, run
cargo xtask docgen
inside the project. We use xtask as an ad-hoc task runner.
To preview the book itself, install mdbook. Then, run
mdbook serve book
and visit http://localhost:3000.
Testing
Unit tests/Documentation tests
Run cargo test --workspace
to run unit tests and documentation tests in all packages.
Integration tests
Integration tests for helix-term can be run with cargo integration-test
. Code
contributors are strongly encouraged to write integration tests for their code.
Existing tests can be used as examples. Helpers can be found in
helpers.rs. The log level can be set with the HELIX_LOG_LEVEL
environment variable, e.g. HELIX_LOG_LEVEL=debug cargo integration-test
.
Contributors using MacOS might encounter Too many open files (os error 24)
failures while running integration tests. This can be resolved by increasing
the default value (e.g. to 10240
from 256
) by running ulimit -n 10240
.
Minimum Stable Rust Version (MSRV) Policy
Helix follows the MSRV of Firefox. The current MSRV and future changes to the MSRV are listed in the Firefox documentation.