Helix Mirror
You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
Go to file
Galen Abell 581a1ebf5d
Add glob file type support (#8006)
* Replace FileType::Suffix with FileType::Glob

Suffix is rather limited and cannot be used to match files which have
semantic meaning based on location + file type (for example, Github
Action workflow files). This patch adds support for a Glob FileType to
replace Suffix, which encompasses the existing behavior & adds
additional file matching functionality.

Globs are standard Unix-style path globs, which are matched against the
absolute path of the file. If the configured glob for a language is a
relative glob (that is, it isn't an absolute path or already starts with
a glob pattern), a glob pattern will be prepended to allow matching
relative paths from any directory.

The order of file type matching is also updated to first match on globs
and then on extension. This is necessary as most cases where
glob-matching is useful will have already been matched by an extension
if glob matching is done last.

* Convert file-types suffixes to globs

* Use globs for filename matching

Trying to match the file-type raw strings against both filename and
extension leads to files with the same name as the extension having the
incorrect syntax.

* Match dockerfiles with suffixes

It's common practice to add a suffix to dockerfiles based on their
context, e.g. `Dockerfile.dev`, `Dockerfile.prod`, etc.

* Make env filetype matching more generic

Match on `.env` or any `.env.*` files.

* Update docs

* Use GlobSet to match all file type globs at once

* Update todo.txt glob patterns

* Consolidate language Configuration and Loader creation

This is a refactor that improves the error handling for creating
the `helix_core::syntax::Loader` from the default and user language
configuration.

* Fix integration tests

* Add additional starlark file-type glob

---------

Co-authored-by: Michael Davis <mcarsondavis@gmail.com>
5 months ago
.cargo Add hook/event system 5 months ago
.github build(deps): bump actions/cache from 3 to 4 (#9402) 5 months ago
book Add glob file type support (#8006) 5 months ago
contrib Add icon to Windows executable (#9104) 5 months ago
docs use workspace inheritance for common version (#8925) 7 months ago
helix-core Add glob file type support (#8006) 5 months ago
helix-dap Improve error handling for `which::which` failures 5 months ago
helix-event Add hook/event system 5 months ago
helix-loader Improve error handling for `which::which` failures 5 months ago
helix-lsp make path changes LSP spec conform (#8949) 5 months ago
helix-parsec use workspace inheritance for common version (#8925) 7 months ago
helix-stdx Improve error handling for `which::which` failures 5 months ago
helix-term Add glob file type support (#8006) 5 months ago
helix-tui Handle failure when enabling bracketed paste (#9353) 5 months ago
helix-vcs Use gix pipeline filter instead of manual crlf implementation (#9503) 5 months ago
helix-view Use range positions to determine insert_newline motion (#9448) 5 months ago
runtime feat(languages): pkl (#9515) 5 months ago
xtask use workspace inheritance for common version (#8925) 7 months ago
.envrc direnv: Watch the rust-toolchain file (#8921) 7 months ago
.gitattributes Add .gitattributes (#3318) 2 years ago
.gitignore Remove vale from .gitignore 2 years ago
CHANGELOG.md Add changelog notes for 23.10 (#8086) 8 months ago
Cargo.lock Add glob file type support (#8006) 5 months ago
Cargo.toml Create helix-stdx crate for stdlib extensions 5 months ago
LICENSE Add the LICENSE file. 3 years ago
README.md Update README.md to add link to Kakoune and Neovim (#9119) 6 months ago
base16_theme.toml Set ui.text.inactive for official themes 2 years ago
default.nix build(nix): update flake deps, add default.nix file 2 years ago
flake.lock nix: update flake inputs (#8943) 7 months ago
flake.nix Fix version of Nix package (#9013) 7 months ago
grammars.nix Make nix flake respect unused grammars (#9326) 6 months ago
languages.toml Add glob file type support (#8006) 5 months ago
logo.svg Reduce logo sizes even more (#9211) 6 months ago
logo_dark.svg Reduce logo sizes even more (#9211) 6 months ago
logo_light.svg Reduce logo sizes even more (#9211) 6 months ago
rust-toolchain.toml bump MSRV to 1.70.0 (#8877) 7 months ago
rustfmt.toml Add rustfmt.toml to force formatting to use rustfmt defaults 3 years ago
screenshot.png update screenshot (#1879) 2 years ago
shell.nix build(nix): update flake deps, add default.nix file 2 years ago
theme.toml feat(debug): highlight current line (#5957) 1 year ago

README.md

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 @jakenvac for designing the logo!