on master help sign in
deps update
755632fBlaž Hrastnik
Cargo.lock+23−13
@@ -94,17 +94,17 @@ dependencies = [
94
94
95[[package]]
95[[package]]
96name = "async-process"
96name = "async-process"
97−version = "1.0.1"
97+version = "1.0.2"
98source = "registry+https://github.com/rust-lang/crates.io-index"
98source = "registry+https://github.com/rust-lang/crates.io-index"
99−checksum = "4c8cea09c1fb10a317d1b5af8024eeba256d6554763e85ecd90ff8df31c7bbda"
99+checksum = "ef37b86e2fa961bae5a4d212708ea0154f904ce31d1a4a7f47e1bbc33a0c040b"
100dependencies = [
100dependencies = [
101 "async-io",
101 "async-io",
102 "blocking",
102 "blocking",
103− "cfg-if 0.1.10",
103+ "cfg-if 1.0.0",
104 "event-listener",
104 "event-listener",
105 "futures-lite",
105 "futures-lite",
106 "once_cell",
106 "once_cell",
107− "signal-hook",
107+ "signal-hook 0.3.4",
108 "winapi",
108 "winapi",
109]
109]
110
110
@@ -154,9 +154,9 @@ dependencies = [
154
154
155[[package]]
155[[package]]
156name = "bstr"
156name = "bstr"
157−version = "0.2.14"
157+version = "0.2.15"
158source = "registry+https://github.com/rust-lang/crates.io-index"
158source = "registry+https://github.com/rust-lang/crates.io-index"
159−checksum = "473fc6b38233f9af7baa94fb5852dca389e3d95b8e21c8e3719301462c5d9faf"
159+checksum = "a40b47ad93e1a5404e6c18dec46b628214fee441c70f4ab5d6942142cc268a3d"
160dependencies = [
160dependencies = [
161 "memchr",
161 "memchr",
162]
162]
@@ -296,7 +296,7 @@ dependencies = [
296 "libc",
296 "libc",
297 "mio",
297 "mio",
298 "parking_lot",
298 "parking_lot",
299− "signal-hook",
299+ "signal-hook 0.1.17",
300 "winapi",
300 "winapi",
301]
301]
302
302
@@ -638,9 +638,9 @@ dependencies = [
638
638
639[[package]]
639[[package]]
640name = "idna"
640name = "idna"
641−version = "0.2.0"
641+version = "0.2.1"
642source = "registry+https://github.com/rust-lang/crates.io-index"
642source = "registry+https://github.com/rust-lang/crates.io-index"
643−checksum = "02e2673c30ee86b5b96a9cb52ad15718aa1f966f5ab9ad54a8b95d5ca33120a9"
643+checksum = "de910d521f7cc3135c4de8db1cb910e0b5ed1dc6f57c381cd07e8e661ce10094"
644dependencies = [
644dependencies = [
645 "matches",
645 "matches",
646 "unicode-bidi",
646 "unicode-bidi",
@@ -1096,9 +1096,9 @@ dependencies = [
1096
1096
1097[[package]]
1097[[package]]
1098name = "serde_json"
1098name = "serde_json"
1099−version = "1.0.61"
1099+version = "1.0.62"
1100source = "registry+https://github.com/rust-lang/crates.io-index"
1100source = "registry+https://github.com/rust-lang/crates.io-index"
1101−checksum = "4fceb2595057b6891a4ee808f70054bd2d12f0e97f1cbb78689b59f676df325a"
1101+checksum = "ea1c6153794552ea7cf7cf63b1231a25de00ec90db326ba6264440fa08e31486"
1102dependencies = [
1102dependencies = [
1103 "itoa",
1103 "itoa",
1104 "ryu",
1104 "ryu",
@@ -1136,6 +1136,16 @@ dependencies = [
1136 "signal-hook-registry",
1136 "signal-hook-registry",
1137]
1137]
1138
1138
1139+[[package]]
1140+name = "signal-hook"
1141+version = "0.3.4"
1142+source = "registry+https://github.com/rust-lang/crates.io-index"
1143+checksum = "780f5e3fe0c66f67197236097d89de1e86216f1f6fdeaf47c442f854ab46c240"
1144+dependencies = [
1145+ "libc",
1146+ "signal-hook-registry",
1147+]
1148+
1139[[package]]
1149[[package]]
1140name = "signal-hook-registry"
1150name = "signal-hook-registry"
1141version = "1.3.0"
1151version = "1.3.0"
@@ -1257,9 +1267,9 @@ dependencies = [
1257
1267
1258[[package]]
1268[[package]]
1259name = "thread_local"
1269name = "thread_local"
1260−version = "1.1.2"
1270+version = "1.1.3"
1261source = "registry+https://github.com/rust-lang/crates.io-index"
1271source = "registry+https://github.com/rust-lang/crates.io-index"
1262−checksum = "d8208a331e1cb318dd5bd76951d2b8fc48ca38a69f5f4e4af1b6a9f8c6236915"
1272+checksum = "8018d24e04c95ac8790716a5987d0fec4f8b27249ffa0f7d33f1369bdfb88cbd"
1263dependencies = [
1273dependencies = [
1264 "once_cell",
1274 "once_cell",
1265]
1275]
README.md−70
@@ -17,73 +17,3 @@ cargo install --path helix-term
17
17
18This will install the `hx` binary to `$HOME/.cargo/bin`.
18This will install the `hx` binary to `$HOME/.cargo/bin`.
19
19
20−# Notes
21−
22−- server-client architecture via gRPC, UI separate from core
23−- multi cursor based editing and slicing
24−- WASM based plugins (builtin LSP & fuzzy file finder)
25−
26−Structure similar to codemirror:
27−
28−- text (ropes)
29−- column utils, stuff like tab aware (row, col) -> char pos translation
30−- word/grapheme/code point utils and iterators
31−- state
32−- transactions
33− - changes
34− - annotations (time changed etc)
35− - state effects
36− - additional editor state as facets
37−- snapshots as an async view into current state
38−- selections { anchor (nonmoving), head (moving) from/to } -> SelectionSet with a primary
39− - cursor is just a single range selection
40−- markers
41− track a position inside text that synchronizes with edits
42−- { doc, selection, update(), splice, changes(), facets, tabSize, identUnit, lineSeparator, changeFilter/transactionFilter to modify stuff before }
43−- view (actual UI)
44−- renders via termwiz
45−- viewport(Lines) -> what's actually visible
46−- extend the view via Decorations (inline styling) or Components (UI)
47− - mark / wieget / line / replace decoration
48−- commands (transform state)
49−- movement
50−- selection extension
51−- deletion
52−- indentation
53−- keymap (maps keys to commands)
54−- history (undo tree via immutable ropes)
55−- undoes transactions
56−- invert changes (generates a revert)
57−- (collab mode)
58−- gutter (line numbers, diagnostic marker, etc) -> ties into UI components
59−- rangeset/span -> mappable over changes (can be a marker primitive?)
60−- syntax (treesitter)
61−- indentation strategies
62−- fold
63−- selections (select mode/multiselect)
64−- matchbrackets
65−- closebrackets
66−- special-chars (shows dots etc for specials)
67−- panel (for UI: file pickers, search dialogs, etc)
68−- tooltip (for UI)
69−- search (regex? pcre)
70−- lint (async linters)
71−- lsp
72−- highlight (?)
73−- stream-syntax
74−- autocomplete
75−- comment (gc, etc for auto commenting)
76−- snippets
77−- terminal mode?
78−
79−- plugins can contain more commands/ui abstractions to use elsewhere
80−- languageData as presets for each language (syntax, indent, comment, etc)
81−
82−Vim stuff:
83−- motions/operators/text objects
84−- full visual mode
85−- macros
86−- jump lists
87−- marks
88−- yank/paste
89−- conceal for markdown markers, etc
TODO.md+32−12
@@ -1,18 +1,38 @@
1−helper methods: iterate over selection spans in the document.
2−
3−- Implement marks (superset of Selection/Range)
4- Implement style configs, tab settings
1- Implement style configs, tab settings
5−- Visual tab width
6- Refactor tree-sitter-highlight to work like the atom one, recomputing partial tree updates.
2- Refactor tree-sitter-highlight to work like the atom one, recomputing partial tree updates.
7−- Only render highlights on screen
8−- proper selection rendering
9−- Undo tree
10−- selection mode
11−- key sequence shortcuts (gg etc)
12- syntax errors highlight query
3- syntax errors highlight query
13
4
14−- UI work: command line
15−- UI work: tab popup on command line
16- UI work: completion popup
5- UI work: completion popup
17−- UI work: floating pane
18
6
7+
8+------
9+
10+1
11+- [ ] selection mode
12+- [x] % for whole doc selection
13+- [ ] vertical splits
14+- [ ] input counts (30j)
15+- [ ] retain horiz when moving vertically
16+- [ ] update lsp on redo/undo
17+- [ ] Implement marks (superset of Selection/Range)
18+- [ ] ctrl-v/ctrl-x on file picker
19+- [ ] linewise selection work
20+- [ ] goto definition
21+- [ ] nixos packaging
22+- [ ] CI binary builds
23+
24+2
25+- extend selection (treesitter select parent node) (replaces viw, vi(, va( etc )
26+- bracket pairs
27+- comment block (gcc)
28+- completion signature popups/docs
29+- multiple views into the same file
30+
31+3
32+- diagnostics popups
33+- diff mode with highlighting?
34+- snippet support (tab to jump between marks)
35+- gamelisp/wasm scripting
36+
37+X
38+- rendering via skulpin/skia or raw wgpu
doc/architecture.mdnew file+66
@@ -0,0 +1,66 @@
1+
2+# Notes
3+
4+- server-client architecture via gRPC, UI separate from core
5+- multi cursor based editing and slicing
6+- WASM based plugins (builtin LSP & fuzzy file finder)
7+
8+Structure similar to codemirror:
9+
10+- text (ropes)
11+- transactions
12+ - changes
13+ - invert changes (generates a revert)
14+ - annotations (time changed etc)
15+ - state effects
16+ - additional editor state as facets
17+- snapshots as an async view into current state
18+- selections { anchor (nonmoving), head (moving) from/to } -> SelectionSet with a primary
19+ - cursor is just a single range selection
20+- markers
21+ track a position inside text that synchronizes with edits
22+- { doc, selection, update(), splice, changes(), facets, tabSize, identUnit, lineSeparator, changeFilter/transactionFilter to modify stuff before }
23+- view (actual UI)
24+- viewport(Lines) -> what's actually visible
25+- extend the view via Decorations (inline styling) or Components (UI)
26+ - mark / wieget / line / replace decoration
27+- commands (transform state)
28+- movement
29+- selection extension
30+- deletion
31+- indentation
32+- keymap (maps keys to commands)
33+- history (undo tree via immutable ropes)
34+ - undoes transactions via reverts
35+- (collab mode)
36+- gutter (line numbers, diagnostic marker, etc) -> ties into UI components
37+- rangeset/span -> mappable over changes (can be a marker primitive?)
38+- syntax (treesitter)
39+- fold
40+- selections (select mode/multiselect)
41+- matchbrackets
42+- closebrackets
43+- special-chars (shows dots etc for specials)
44+- panel (for UI: file pickers, search dialogs, etc)
45+- tooltip (for UI)
46+- search (regex)
47+- lint (async linters)
48+- lsp
49+- highlight
50+- stream-syntax
51+- autocomplete
52+- comment (gc, etc for auto commenting)
53+- snippets
54+- terminal mode?
55+
56+- plugins can contain more commands/ui abstractions to use elsewhere
57+- languageData as presets for each language (syntax, indent, comment, etc)
58+
59+Vim stuff:
60+- motions/operators/text objects
61+- full visual mode
62+- macros
63+- jump lists
64+- marks
65+- yank/paste
66+- conceal for markdown markers, etc
flake.lock+3−4
@@ -72,17 +72,16 @@
72 "nixpkgs": "nixpkgs_2"
72 "nixpkgs": "nixpkgs_2"
73 },
73 },
74 "locked": {
74 "locked": {
75− "lastModified": 1611026386,
75+ "lastModified": 1612751126,
76− "narHash": "sha256-ZCYGAGUW9RMG5+Z1cdqrw1mstQqpuD66AB1U6ALpcDw=",
76+ "narHash": "sha256-S2DaaC799QcXIKkYZi1hI3SpMnr/d7oOCDI2bhYdXO0=",
77 "owner": "oxalica",
77 "owner": "oxalica",
78 "repo": "rust-overlay",
78 "repo": "rust-overlay",
79− "rev": "a9b13ba83eaf2d07ae955a45b15fd96aa6994b70",
79+ "rev": "03b9eee1062791187809d8c3f6a82e291761fc8c",
80 "type": "github"
80 "type": "github"
81 },
81 },
82 "original": {
82 "original": {
83 "owner": "oxalica",
83 "owner": "oxalica",
84 "repo": "rust-overlay",
84 "repo": "rust-overlay",
85− "rev": "a9b13ba83eaf2d07ae955a45b15fd96aa6994b70",
86 "type": "github"
85 "type": "github"
87 }
86 }
88 }
87 }
flake.nix+1−1
@@ -4,7 +4,7 @@
4 inputs = {
4 inputs = {
5 nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
5 nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
6 flake-utils.url = "github:numtide/flake-utils";
6 flake-utils.url = "github:numtide/flake-utils";
7− rust-overlay.url = "github:oxalica/rust-overlay/a9b13ba83eaf2d07ae955a45b15fd96aa6994b70";
7+ rust-overlay.url = "github:oxalica/rust-overlay";
8 };
8 };
9
9
10 outputs = inputs@{ self, nixpkgs, rust-overlay, flake-utils, ... }:
10 outputs = inputs@{ self, nixpkgs, rust-overlay, flake-utils, ... }: