on master help sign in
deps update
commit755632f23113ccff66390de1e2c3476a51886b00 authorBlaž Hrastnik <blaz@mxxn.io> dateTue 9 Feb 2021, 15:39 (6 years ago) parent30d1b70
6 files changed+125−100
Cargo.lock+23−13 README.md−70 TODO.md+32−12 doc/architecture.md+66 flake.lock+3−4 flake.nix+1−1
Cargo.lock+23−13
@@ -94,17 +94,17 @@ dependencies = [
9494
9595[[package]]
9696name = "async-process"
97−version = "1.0.1"
97+version = "1.0.2"
9898source = "registry+https://github.com/rust-lang/crates.io-index"
99−checksum = "4c8cea09c1fb10a317d1b5af8024eeba256d6554763e85ecd90ff8df31c7bbda"
99+checksum = "ef37b86e2fa961bae5a4d212708ea0154f904ce31d1a4a7f47e1bbc33a0c040b"
100100dependencies = [
101101 "async-io",
102102 "blocking",
103− "cfg-if 0.1.10",
103+ "cfg-if 1.0.0",
104104 "event-listener",
105105 "futures-lite",
106106 "once_cell",
107− "signal-hook",
107+ "signal-hook 0.3.4",
108108 "winapi",
109109]
110110
@@ -154,9 +154,9 @@ dependencies = [
154154
155155[[package]]
156156name = "bstr"
157−version = "0.2.14"
157+version = "0.2.15"
158158source = "registry+https://github.com/rust-lang/crates.io-index"
159−checksum = "473fc6b38233f9af7baa94fb5852dca389e3d95b8e21c8e3719301462c5d9faf"
159+checksum = "a40b47ad93e1a5404e6c18dec46b628214fee441c70f4ab5d6942142cc268a3d"
160160dependencies = [
161161 "memchr",
162162]
@@ -296,7 +296,7 @@ dependencies = [
296296 "libc",
297297 "mio",
298298 "parking_lot",
299− "signal-hook",
299+ "signal-hook 0.1.17",
300300 "winapi",
301301]
302302
@@ -638,9 +638,9 @@ dependencies = [
638638
639639[[package]]
640640name = "idna"
641−version = "0.2.0"
641+version = "0.2.1"
642642source = "registry+https://github.com/rust-lang/crates.io-index"
643−checksum = "02e2673c30ee86b5b96a9cb52ad15718aa1f966f5ab9ad54a8b95d5ca33120a9"
643+checksum = "de910d521f7cc3135c4de8db1cb910e0b5ed1dc6f57c381cd07e8e661ce10094"
644644dependencies = [
645645 "matches",
646646 "unicode-bidi",
@@ -1096,9 +1096,9 @@ dependencies = [
10961096
10971097[[package]]
10981098name = "serde_json"
1099−version = "1.0.61"
1099+version = "1.0.62"
11001100source = "registry+https://github.com/rust-lang/crates.io-index"
1101−checksum = "4fceb2595057b6891a4ee808f70054bd2d12f0e97f1cbb78689b59f676df325a"
1101+checksum = "ea1c6153794552ea7cf7cf63b1231a25de00ec90db326ba6264440fa08e31486"
11021102dependencies = [
11031103 "itoa",
11041104 "ryu",
@@ -1136,6 +1136,16 @@ dependencies = [
11361136 "signal-hook-registry",
11371137]
11381138
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+
11391149[[package]]
11401150name = "signal-hook-registry"
11411151version = "1.3.0"
@@ -1257,9 +1267,9 @@ dependencies = [
12571267
12581268[[package]]
12591269name = "thread_local"
1260−version = "1.1.2"
1270+version = "1.1.3"
12611271source = "registry+https://github.com/rust-lang/crates.io-index"
1262−checksum = "d8208a331e1cb318dd5bd76951d2b8fc48ca38a69f5f4e4af1b6a9f8c6236915"
1272+checksum = "8018d24e04c95ac8790716a5987d0fec4f8b27249ffa0f7d33f1369bdfb88cbd"
12631273dependencies = [
12641274 "once_cell",
12651275]
README.md−70
@@ -17,73 +17,3 @@ cargo install --path helix-term
1717
1818This will install the `hx` binary to `$HOME/.cargo/bin`.
1919
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)
41- Implement style configs, tab settings
5−- Visual tab width
62- 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)
123- syntax errors highlight query
134
14−- UI work: command line
15−- UI work: tab popup on command line
165- UI work: completion popup
17−- UI work: floating pane
186
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 @@
7272 "nixpkgs": "nixpkgs_2"
7373 },
7474 "locked": {
75− "lastModified": 1611026386,
76− "narHash": "sha256-ZCYGAGUW9RMG5+Z1cdqrw1mstQqpuD66AB1U6ALpcDw=",
75+ "lastModified": 1612751126,
76+ "narHash": "sha256-S2DaaC799QcXIKkYZi1hI3SpMnr/d7oOCDI2bhYdXO0=",
7777 "owner": "oxalica",
7878 "repo": "rust-overlay",
79− "rev": "a9b13ba83eaf2d07ae955a45b15fd96aa6994b70",
79+ "rev": "03b9eee1062791187809d8c3f6a82e291761fc8c",
8080 "type": "github"
8181 },
8282 "original": {
8383 "owner": "oxalica",
8484 "repo": "rust-overlay",
85− "rev": "a9b13ba83eaf2d07ae955a45b15fd96aa6994b70",
8685 "type": "github"
8786 }
8887 }
flake.nix+1−1
@@ -4,7 +4,7 @@
44 inputs = {
55 nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
66 flake-utils.url = "github:numtide/flake-utils";
7− rust-overlay.url = "github:oxalica/rust-overlay/a9b13ba83eaf2d07ae955a45b15fd96aa6994b70";
7+ rust-overlay.url = "github:oxalica/rust-overlay";
88 };
99
1010 outputs = inputs@{ self, nixpkgs, rust-overlay, flake-utils, ... }: