My mods of a post-modern modal text editor.
Find a file
paul-scott ce1fb9e64c
Generalised to multiple runtime directories with priorities (#5411)
* Generalised to multiple runtime directories with priorities

This is an implementation for #3346.

Previously, one of the following runtime directories were used:

1. `$HELIX_RUNTIME`
2. sibling directory to `$CARGO_MANIFEST_DIR`
3. subdirectory of user config directory
4. subdirectory of path to helix executable

The first directory provided / found to exist in this order was used as a
root for all runtime file searches (grammars, themes, queries).

This change lowers the priority of `$HELIX_RUNTIME` so that the user
config runtime has higher priority. More significantly, all of these
directories are now searched for runtime files, enabling a user to override
default or system-level runtime files. If the same file name appears
in multiple runtime directories, the following priority is now used:

1. sibling directory to `$CARGO_MANIFEST_DIR`
2. subdirectory of user config directory
3. `$HELIX_RUNTIME`
4. subdirectory of path to helix executable

One exception to this rule is that a user can have a `themes`
directory directly in the user config directory that has higher piority
to `themes` directories in runtime directories. That behaviour has been
preserved.

As part of implementing this feature `theme::Loader` was simplified
and the cycle detection logic of the theme inheritance was improved to
cover more cases and to be more explicit.

* Removed AsRef usage to avoid binary growth

* Health displaying ;-separated runtime dirs

* Changed HELIX_RUNTIME build from src instructions

* Updated doc for more detail on runtime directories

* Improved health symlink printing and theme cycle errors

The health display of runtime symlinks now prints both ends of the
link.

Separate errors are given when theme file is not found and when the
only theme file found would form an inheritence cycle.

* Satisfied clippy on passing Path

* Clarified highest priority runtime directory purpose

* Further clarified multiple runtime details in book

Also gave markdown headings to subsections.

Fixed a error with table indentation not building
table that also appears present on master.

---------

Co-authored-by: Paul Scott <paul.scott@anu.edu.au>
Co-authored-by: Blaž Hrastnik <blaz@mxxn.io>
2023-03-09 23:50:43 +09:00
.cargo enable rendering in integration tests (#5819) 2023-02-04 13:20:23 -08:00
.github update MSRV to 1.65 2023-03-05 15:54:02 +09:00
book Generalised to multiple runtime directories with priorities (#5411) 2023-03-09 23:50:43 +09:00
contrib Add Appstream metadata file (#5643) 2023-01-24 17:26:42 -06:00
docs Expand contributing docs (#5967) 2023-02-19 12:52:12 -06:00
helix-core Fix shrink_selection with multiple cursors. (#6093) 2023-03-09 13:08:28 +09:00
helix-dap feat(dap): implement Restart request (#5651) 2023-03-06 18:19:53 +09:00
helix-loader Generalised to multiple runtime directories with priorities (#5411) 2023-03-09 23:50:43 +09:00
helix-lsp LSP: Support textDocument/prepareRename (#6103) 2023-03-08 11:11:43 +09:00
helix-parsec Remove now unused the pattern combinator 2023-03-08 10:48:35 +09:00
helix-term Generalised to multiple runtime directories with priorities (#5411) 2023-03-09 23:50:43 +09:00
helix-tui tui: Log keyboard enhancement query time 2023-03-08 10:49:32 +09:00
helix-vcs Add command for resetting diff hunks (#5736) 2023-03-08 10:49:14 +09:00
helix-view Generalised to multiple runtime directories with priorities (#5411) 2023-03-09 23:50:43 +09:00
runtime feat(theme): Update pop-dark statusline (#6227) 2023-03-09 11:17:45 +09:00
xtask Fix new clippy lints (#5892) 2023-02-09 16:27:08 -06:00
.envrc Work around a nix-direnv issue 2022-02-25 18:01:47 +09:00
.gitattributes Add .gitattributes (#3318) 2022-08-03 08:21:51 -05:00
.gitignore Remove vale from .gitignore 2022-07-26 10:22:28 +09:00
.ignore Add a .ignore file to make ripgrep more useful (#3315) 2022-08-03 09:00:39 -05:00
base16_theme.toml Set ui.text.inactive for official themes 2022-12-17 13:59:05 -06:00
Cargo.lock store multiple snapshots on the document at once 2023-03-09 13:01:02 +09:00
Cargo.toml Add a parser-combinator crate 2023-03-08 10:48:35 +09:00
CHANGELOG.md Add changelog notes for 22.12 (#4822) 2022-12-07 11:54:50 +09:00
default.nix build(nix): update flake deps, add default.nix file 2022-06-21 17:39:30 -05:00
flake.lock build(nix): fix devshell 2023-02-25 07:06:30 +03:00
flake.nix build(nix): fix devshell 2023-02-25 07:06:30 +03:00
grammars.nix nix: replace runCommandNoCC with runCommand (#3992) 2022-09-27 08:01:58 -05:00
languages.toml Softwrapping improvements (#5893) 2023-03-08 11:02:11 +09:00
LICENSE Add the LICENSE file. 2021-05-11 01:44:00 +09:00
logo.svg Add the new logo! 2022-12-02 12:06:17 +09:00
logo_dark.svg Add logo with text included (#4973) 2022-12-03 11:05:15 +09:00
logo_light.svg Add logo with text included (#4973) 2022-12-03 11:05:15 +09:00
README.md Rewrite and refactor all documentation (#5534) 2023-03-06 18:27:17 +09:00
rust-toolchain.toml update MSRV to 1.65 2023-03-05 15:54:02 +09:00
rustfmt.toml Add rustfmt.toml to force formatting to use rustfmt defaults 2021-07-23 18:11:22 +09:00
screenshot.png update screenshot (#1879) 2022-03-30 00:16:57 +09:00
shell.nix build(nix): update flake deps, add default.nix file 2022-06-21 17:39:30 -05:00
theme.toml Add markup.strikethrough theme keys (#5619) 2023-01-21 16:21:26 -06:00
VERSION Add changelog notes for 22.12 (#4822) 2022-12-07 11:54:50 +09:00

Helix

Build status GitHub Release Documentation GitHub contributors Matrix Space

Screenshot

A Kakoune / Neovim inspired editor, written in Rust.

The editing model is very heavily based on Kakoune; during development I found myself agreeing with most of Kakoune's design decisions.

For more information, see the website or documentation.

All shortcuts/keymaps can be found in the documentation on the website.

Troubleshooting

Features

  • Vim-like modal editing
  • Multiple selections
  • Built-in language server support
  • Smart, incremental syntax highlighting and code editing via tree-sitter

It's a terminal-based editor first, but I'd like to explore a custom renderer (similar to Emacs) in wgpu or skulpin.

Note: Only certain languages have indentation definitions at the moment. Check runtime/queries/<lang>/ for indents.scm.

Installation

Installation documentation.

Packaging status

Contributing

Contributing guidelines can be found here.

Getting help

Your question might already be answered on the FAQ.

Discuss the project on the community Matrix Space (make sure to join #helix-editor:matrix.org if you're on a client that doesn't support Matrix Spaces yet).

Credits

Thanks to @JakeHL for designing the logo!