helix/README.md

90 lines
2.7 KiB
Markdown
Raw Normal View History

# Helix
| Crate | Description |
| ----------- | ----------- |
| helix-core | Core editing primitives, functional. |
| helix-syntax | Tree-sitter grammars |
| helix-view | UI abstractions for use in backends, imperative shell. |
| helix-term | Terminal UI |
2020-10-05 10:12:55 +03:00
# Installation
```
git clone --depth 1 --recurse-submodules -j8 https://github.com/helix-editor/helix
cd helix
cargo install --path helix-term
```
This will install the `hx` binary to `$HOME/.cargo/bin`.
# Notes
2020-05-20 12:14:51 +03:00
- server-client architecture via gRPC, UI separate from core
- multi cursor based editing and slicing
- WASM based plugins (builtin LSP & fuzzy file finder)
Structure similar to codemirror:
2020-10-05 10:12:55 +03:00
- text (ropes)
2020-05-20 12:14:51 +03:00
- column utils, stuff like tab aware (row, col) -> char pos translation
- word/grapheme/code point utils and iterators
2020-10-05 10:12:55 +03:00
- state
2020-05-20 12:14:51 +03:00
- transactions
- changes
- annotations (time changed etc)
- state effects
- additional editor state as facets
- snapshots as an async view into current state
- selections { anchor (nonmoving), head (moving) from/to } -> SelectionSet with a primary
- cursor is just a single range selection
- markers
track a position inside text that synchronizes with edits
2020-10-05 10:12:55 +03:00
- { doc, selection, update(), splice, changes(), facets, tabSize, identUnit, lineSeparator, changeFilter/transactionFilter to modify stuff before }
- view (actual UI)
2020-05-20 12:14:51 +03:00
- renders via termwiz
- viewport(Lines) -> what's actually visible
- extend the view via Decorations (inline styling) or Components (UI)
- mark / wieget / line / replace decoration
2020-10-05 10:12:55 +03:00
- commands (transform state)
2020-05-20 12:14:51 +03:00
- movement
- selection extension
- deletion
- indentation
2020-10-05 10:12:55 +03:00
- keymap (maps keys to commands)
- history (undo tree via immutable ropes)
2020-05-20 12:14:51 +03:00
- undoes transactions
- invert changes (generates a revert)
2020-10-05 10:12:55 +03:00
- (collab mode)
- gutter (line numbers, diagnostic marker, etc) -> ties into UI components
- rangeset/span -> mappable over changes (can be a marker primitive?)
- syntax (treesitter)
2020-05-20 12:14:51 +03:00
- indentation strategies
2020-10-05 10:12:55 +03:00
- fold
- selections (select mode/multiselect)
- matchbrackets
- closebrackets
- special-chars (shows dots etc for specials)
- panel (for UI: file pickers, search dialogs, etc)
- tooltip (for UI)
- search (regex? pcre)
- lint (async linters)
- lsp
- highlight (?)
- stream-syntax
- autocomplete
- comment (gc, etc for auto commenting)
- snippets
- terminal mode?
2020-05-20 12:14:51 +03:00
2020-10-05 10:12:55 +03:00
- plugins can contain more commands/ui abstractions to use elsewhere
- languageData as presets for each language (syntax, indent, comment, etc)
2020-05-20 12:14:51 +03:00
2020-10-05 10:12:55 +03:00
Vim stuff:
- motions/operators/text objects
- full visual mode
- macros
- jump lists
- marks
- yank/paste
- conceal for markdown markers, etc