A simple CPU rendered GUI IDE experience.
| -rw-r--r-- | Cargo.toml | 3 | ||||
| -rw-r--r-- | inlay | 5365 | ||||
| -rw-r--r-- | src/hov.rs | 5 | ||||
| -rw-r--r-- | src/lsp.rs | 30 | ||||
| -rw-r--r-- | src/main.rs | 172 | ||||
| -rw-r--r-- | src/text.rs | 291 |
6 files changed, 721 insertions, 5145 deletions
@@ -66,6 +66,9 @@ tree-house.debug-assertions = false [profile.release.package.tree-house] debug-assertions = false +[profile.release.package] +fimg.debug-assertions = true + [profile.release] debug = 2 overflow-checks = true @@ -1,643 +1,156 @@ [ { "position": { - "line": 172, - "character": 42 - }, - "label": [ - { - "value": "T:", - "location": { - "uri": "file:///home/os/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/winit-0.30.12/src/event_loop.rs", - "range": { - "start": { - "line": 42, - "character": 21 - }, - "end": { - "line": 42, - "character": 31 - } - } - } - } - ], - "kind": 2, - "paddingLeft": false, - "paddingRight": true - }, - { - "position": { - "line": 173, - "character": 12 - }, - "label": ": f32", - "kind": 1, - "paddingLeft": false, - "paddingRight": false, - "data": { - "file_id": 0, - "hash": "2378190123251648688", - "resolve_range": { - "start": { - "line": 173, - "character": 8 - }, - "end": { - "line": 173, - "character": 12 - } - }, - "version": 114 - } - }, - { - "position": { - "line": 174, - "character": 10 - }, - "label": ": f32", - "kind": 1, - "paddingLeft": false, - "paddingRight": false, - "data": { - "file_id": 0, - "hash": "2789821434669287835", - "resolve_range": { - "start": { - "line": 174, - "character": 8 - }, - "end": { - "line": 174, - "character": 10 - } - }, - "version": 114 - } - }, - { - "position": { - "line": 175, - "character": 16 - }, - "label": [ - { - "value": ": " - }, - { - "value": "TextArea", - "location": { - "uri": "file:///home/os/gracilaria/src/text.rs", - "range": { - "start": { - "line": 213, - "character": 11 - }, - "end": { - "line": 213, - "character": 19 - } - } - } - } - ], - "kind": 1, - "paddingLeft": false, - "paddingRight": false, - "data": { - "file_id": 0, - "hash": "8204039714255747695", - "resolve_range": { - "start": { - "line": 175, - "character": 8 - }, - "end": { - "line": 175, - "character": 16 - } - }, - "version": 114 - } - }, - { - "position": { - "line": 176, - "character": 18 - }, - "label": [ - { - "value": ": " - }, - { - "value": "Option", - "location": { - "uri": "file:///home/os/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/option.rs", - "range": { - "start": { - "line": 598, - "character": 9 - }, - "end": { - "line": 598, - "character": 15 - } - } - } - }, - { - "value": "<" - }, - { - "value": "PathBuf", - "location": { - "uri": "file:///home/os/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/std/src/path.rs", - "range": { - "start": { - "line": 1176, - "character": 11 - }, - "end": { - "line": 1176, - "character": 18 - } - } - } - }, - { - "value": ">" - } - ], - "kind": 1, - "paddingLeft": false, - "paddingRight": false, - "data": { - "file_id": 0, - "hash": "12891956662849899835", - "resolve_range": { - "start": { - "line": 176, - "character": 8 - }, - "end": { - "line": 176, - "character": 18 - } - }, - "version": 114 - } - }, - { - "position": { - "line": 178, - "character": 20 + "line": 89, + "character": 1 }, "label": [ { - "value": ": " - }, - { - "value": "String", + "value": "fn main", "location": { - "uri": "file:///home/os/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/alloc/src/string.rs", + "uri": "file:///home/os/gracilaria/src/main.rs", "range": { "start": { - "line": 359, - "character": 11 + "line": 84, + "character": 3 }, "end": { - "line": 359, - "character": 17 + "line": 84, + "character": 7 } } } } ], - "kind": 1, - "paddingLeft": false, - "paddingRight": false, - "data": { - "file_id": 0, - "hash": "18230282071714496777", - "resolve_range": { - "start": { - "line": 178, - "character": 19 - }, - "end": { - "line": 178, - "character": 20 - } - }, - "version": 114 - } + "paddingLeft": true, + "paddingRight": false }, { "position": { - "line": 179, - "character": 20 + "line": 85, + "character": 31 }, "label": [ { - "value": ": " - }, - { - "value": "PathBuf", + "value": "key:", "location": { - "uri": "file:///home/os/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/std/src/path.rs", + "uri": "file:///home/os/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/std/src/env.rs", "range": { "start": { - "line": 1176, - "character": 11 + "line": 357, + "character": 56 }, "end": { - "line": 1176, - "character": 18 + "line": 357, + "character": 59 } } } } ], - "kind": 1, + "kind": 2, "paddingLeft": false, - "paddingRight": false, - "data": { - "file_id": 0, - "hash": "13106381239930920874", - "resolve_range": { - "start": { - "line": 179, - "character": 19 - }, - "end": { - "line": 179, - "character": 20 - } - }, - "version": 114 - } + "paddingRight": true }, { "position": { - "line": 180, - "character": 17 + "line": 85, + "character": 63 }, "label": [ { - "value": ": " - }, - { - "value": "Fonts", + "value": "value:", "location": { - "uri": "file:///home/os/.cargo/git/checkouts/dsb-871cc53a8b3bdc59/e5d2802/src/lib.rs", + "uri": "file:///home/os/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/std/src/env.rs", "range": { "start": { - "line": 34, - "character": 11 + "line": 357, + "character": 64 }, "end": { - "line": 34, - "character": 16 + "line": 357, + "character": 69 } } } - }, - { - "value": "<'_, '_, '_, '_>" } ], - "kind": 1, - "paddingLeft": false, - "paddingRight": false, - "data": { - "file_id": 0, - "hash": "253418090431099831", - "resolve_range": { - "start": { - "line": 180, - "character": 8 - }, - "end": { - "line": 180, - "character": 17 - } - }, - "version": 114 - } - }, - { - "position": { - "line": 187, - "character": 27 - }, - "label": ": (usize, usize)", - "kind": 1, + "kind": 2, "paddingLeft": false, - "paddingRight": false, - "data": { - "file_id": 0, - "hash": "17267984017541365673", - "resolve_range": { - "start": { - "line": 187, - "character": 8 - }, - "end": { - "line": 187, - "character": 27 - } - }, - "version": 114 - } + "paddingRight": true }, { "position": { - "line": 189, - "character": 17 + "line": 88, + "character": 10 }, "label": [ { - "value": ": " - }, - { - "value": "State", + "value": "event_loop:", "location": { "uri": "file:///home/os/gracilaria/src/main.rs", "range": { "start": { - "line": 1315, - "character": 11 - }, - "end": { - "line": 1315, - "character": 16 - } - } - } - } - ], - "kind": 1, - "paddingLeft": false, - "paddingRight": false, - "data": { - "file_id": 0, - "hash": "5902986205410117701", - "resolve_range": { - "start": { - "line": 189, - "character": 8 - }, - "end": { - "line": 189, - "character": 17 - } - }, - "version": 114 - } - }, - { - "position": { - "line": 190, - "character": 15 - }, - "label": [ - { - "value": ": " - }, - { - "value": "Bar", - "location": { - "uri": "file:///home/os/gracilaria/src/bar.rs", - "range": { - "start": { - "line": 9, - "character": 11 + "line": 173, + "character": 20 }, "end": { - "line": 9, - "character": 14 + "line": 173, + "character": 30 } } } } ], - "kind": 1, + "kind": 2, "paddingLeft": false, - "paddingRight": false, - "data": { - "file_id": 0, - "hash": "7080707227789278883", - "resolve_range": { - "start": { - "line": 190, - "character": 8 - }, - "end": { - "line": 190, - "character": 15 - } - }, - "version": 114 - } + "paddingRight": true }, { "position": { - "line": 191, - "character": 13 + "line": 93, + "character": 21 }, "label": [ { - "value": ": " - }, - { - "value": "Image", + "value": "T:", "location": { - "uri": "file:///home/os/.cargo/git/checkouts/fimg-49d2da054ddde17f/4ef3759/src/lib.rs", + "uri": "file:///home/os/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/alloc/src/vec/mod.rs", "range": { "start": { - "line": 218, - "character": 11 + "line": 435, + "character": 15 }, "end": { - "line": 218, + "line": 435, "character": 16 } } } - }, - { - "value": "<" - }, - { - "value": "Box", - "location": { - "uri": "file:///home/os/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/alloc/src/boxed.rs", - "range": { - "start": { - "line": 234, - "character": 11 - }, - "end": { - "line": 234, - "character": 14 - } - } - } - }, - { - "value": "<[u8]>, 3>" } ], - "kind": 1, + "kind": 2, "paddingLeft": false, - "paddingRight": false, - "data": { - "file_id": 0, - "hash": "2803249156187286050", - "resolve_range": { - "start": { - "line": 191, - "character": 8 - }, - "end": { - "line": 191, - "character": 13 - } - }, - "version": 114 - } + "paddingRight": true }, { "position": { - "line": 192, - "character": 17 + "line": 94, + "character": 26 }, "label": [ { - "value": ": " - }, - { - "value": "Vec", + "value": "T:", "location": { "uri": "file:///home/os/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/alloc/src/vec/mod.rs", "range": { "start": { - "line": 433, - "character": 11 - }, - "end": { - "line": 433, - "character": 14 - } - } - } - }, - { - "value": "<" - }, - { - "value": "Cell", - "location": { - "uri": "file:///home/os/.cargo/git/checkouts/dsb-871cc53a8b3bdc59/e5d2802/src/cell.rs", - "range": { - "start": { - "line": 43, - "character": 11 - }, - "end": { - "line": 43, + "line": 435, "character": 15 - } - } - } - }, - { - "value": ">" - } - ], - "kind": 1, - "paddingLeft": false, - "paddingRight": false, - "data": { - "file_id": 0, - "hash": "14599518115910796217", - "resolve_range": { - "start": { - "line": 192, - "character": 8 - }, - "end": { - "line": 192, - "character": 17 - } - }, - "version": 114 - } - }, - { - "position": { - "line": 193, - "character": 34 - }, - "label": [ - { - "value": ": " - }, - { - "value": "String", - "location": { - "uri": "file:///home/os/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/alloc/src/string.rs", - "range": { - "start": { - "line": 359, - "character": 11 }, "end": { - "line": 359, - "character": 17 - } - } - } - } - ], - "kind": 1, - "paddingLeft": false, - "paddingRight": false, - "data": { - "file_id": 0, - "hash": "15929652721014459350", - "resolve_range": { - "start": { - "line": 193, - "character": 33 - }, - "end": { - "line": 193, - "character": 34 - } - }, - "version": 114 - } - }, - { - "position": { - "line": 197, - "character": 34 - }, - "label": [ - { - "value": "T:", - "location": { - "uri": "file:///home/os/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/option.rs", - "range": { - "start": { - "line": 598, + "line": 435, "character": 16 - }, - "end": { - "line": 598, - "character": 17 } } } @@ -649,760 +162,101 @@ }, { "position": { - "line": 204, - "character": 5 + "line": 164, + "character": 1 }, - "label": [ - { - "value": "fn rooter", - "location": { - "uri": "file:///home/os/gracilaria/src/main.rs", - "range": { - "start": { - "line": 197, - "character": 7 - }, - "end": { - "line": 197, - "character": 13 - } - } - } - } - ], + "label": "impl Hist", "paddingLeft": true, "paddingRight": false }, { "position": { - "line": 198, - "character": 13 - }, - "label": [ - { - "value": ": " - }, - { - "value": "DirEntry", - "location": { - "uri": "file:///home/os/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/std/src/fs.rs", - "range": { - "start": { - "line": 198, - "character": 11 - }, - "end": { - "line": 198, - "character": 19 - } - } - } - } - ], - "kind": 1, - "paddingLeft": false, - "paddingRight": false - }, - { - "position": { - "line": 205, - "character": 17 - }, - "label": [ - { - "value": ": " - }, - { - "value": "Option", - "location": { - "uri": "file:///home/os/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/option.rs", - "range": { - "start": { - "line": 598, - "character": 9 - }, - "end": { - "line": 598, - "character": 15 - } - } - } - }, - { - "value": "<" - }, - { - "value": "PathBuf", - "location": { - "uri": "file:///home/os/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/std/src/path.rs", - "range": { - "start": { - "line": 1176, - "character": 11 - }, - "end": { - "line": 1176, - "character": 18 - } - } - } - }, - { - "value": ">" - } - ], - "kind": 1, - "paddingLeft": false, - "paddingRight": false, - "data": { - "file_id": 0, - "hash": "14570592744825879285", - "resolve_range": { - "start": { - "line": 205, - "character": 8 - }, - "end": { - "line": 205, - "character": 17 - } - }, - "version": 114 - } - }, - { - "position": { - "line": 205, - "character": 26 + "line": 126, + "character": 5 }, "label": [ { - "value": "Option", + "value": "fn push", "location": { - "uri": "file:///home/os/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/option.rs", + "uri": "file:///home/os/gracilaria/src/main.rs", "range": { "start": { - "line": 598, - "character": 9 + "line": 100, + "character": 7 }, "end": { - "line": 598, - "character": 15 - } - } - } - }, - { - "value": "<" - }, - { - "value": "PathBuf", - "location": { - "uri": "file:///home/os/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/std/src/path.rs", - "range": { - "start": { - "line": 1176, + "line": 100, "character": 11 - }, - "end": { - "line": 1176, - "character": 18 } } } - }, - { - "value": ">" } ], - "kind": 1, "paddingLeft": true, "paddingRight": false }, { "position": { - "line": 207, - "character": 20 - }, - "label": [ - { - "value": ": &" - }, - { - "value": "PathBuf", - "location": { - "uri": "file:///home/os/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/std/src/path.rs", - "range": { - "start": { - "line": 1176, - "character": 11 - }, - "end": { - "line": 1176, - "character": 18 - } - } - } - } - ], - "kind": 1, - "paddingLeft": false, - "paddingRight": false, - "data": { - "file_id": 0, - "hash": "5868300217498467310", - "resolve_range": { - "start": { - "line": 207, - "character": 19 - }, - "end": { - "line": 207, - "character": 20 - } - }, - "version": 114 - } - }, - { - "position": { - "line": 208, - "character": 20 + "line": 101, + "character": 13 }, "label": [ { "value": ": " }, { - "value": "PathBuf", + "value": "DiffMatchPatch", "location": { - "uri": "file:///home/os/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/std/src/path.rs", + "uri": "file:///home/os/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/diff-match-patch-rs-0.5.1/src/dmp.rs", "range": { "start": { - "line": 1176, + "line": 89, "character": 11 }, "end": { - "line": 1176, - "character": 18 + "line": 89, + "character": 25 } } } } ], "kind": 1, - "paddingLeft": false, - "paddingRight": false, - "data": { - "file_id": 0, - "hash": "6984389984807288195", - "resolve_range": { - "start": { - "line": 208, - "character": 19 - }, - "end": { - "line": 208, - "character": 20 - } - }, - "version": 114 - } - }, - { - "position": { - "line": 209, - "character": 9 - }, - "label": [ - { - "value": ": " - }, + "textEdits": [ { - "value": "Option", - "location": { - "uri": "file:///home/os/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/option.rs", - "range": { - "start": { - "line": 598, - "character": 9 - }, - "end": { - "line": 598, - "character": 15 - } + "range": { + "start": { + "line": 101, + "character": 13 + }, + "end": { + "line": 101, + "character": 13 } - } - }, - { - "value": "<(&" - }, - { - "value": "Client", - "location": { - "uri": "file:///home/os/gracilaria/src/lsp.rs", - "range": { - "start": { - "line": 28, - "character": 11 - }, - "end": { - "line": 28, - "character": 17 - } - } - } - }, - { - "value": ", " - }, - { - "value": "JoinHandle", - "location": { - "uri": "file:///home/os/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/std/src/thread/mod.rs", - "range": { - "start": { - "line": 1885, - "character": 11 - }, - "end": { - "line": 1885, - "character": 21 - } - } - } - }, - { - "value": "<…>, …)>" - } - ], - "kind": 1, - "paddingLeft": false, - "paddingRight": false, - "data": { - "file_id": 0, - "hash": "7149273305536334994", - "resolve_range": { - "start": { - "line": 209, - "character": 8 }, - "end": { - "line": 209, - "character": 9 - } - }, - "version": 114 - } - }, - { - "position": { - "line": 210, - "character": 19 - }, - "label": [ - { - "value": ": &" - }, - { - "value": "PathBuf", - "location": { - "uri": "file:///home/os/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/std/src/path.rs", - "range": { - "start": { - "line": 1176, - "character": 11 - }, - "end": { - "line": 1176, - "character": 18 - } - } - } - } - ], - "kind": 1, - "paddingLeft": false, - "paddingRight": false - }, - { - "position": { - "line": 210, - "character": 27 - }, - "label": [ - { - "value": ": " - }, - { - "value": "PathBuf", - "location": { - "uri": "file:///home/os/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/std/src/path.rs", - "range": { - "start": { - "line": 1176, - "character": 11 - }, - "end": { - "line": 1176, - "character": 18 - } - } - } + "newText": ": diff_match_patch_rs::DiffMatchPatch" } ], - "kind": 1, "paddingLeft": false, "paddingRight": false }, { "position": { - "line": 217, + "line": 107, "character": 18 }, "label": [ { - "value": ": " - }, - { - "value": "Connection", - "location": { - "uri": "file:///home/os/.cargo/git/checkouts/rust-analyzer-94e62460e169ee43/4472ac7/lib/lsp-server/src/lib.rs", - "range": { - "start": { - "line": 30, - "character": 11 - }, - "end": { - "line": 30, - "character": 21 - } - } - } - } - ], - "kind": 1, - "paddingLeft": false, - "paddingRight": false - }, - { - "position": { - "line": 217, - "character": 21 - }, - "label": [ - { - "value": ": " - }, - { - "value": "Connection", - "location": { - "uri": "file:///home/os/.cargo/git/checkouts/rust-analyzer-94e62460e169ee43/4472ac7/lib/lsp-server/src/lib.rs", - "range": { - "start": { - "line": 30, - "character": 11 - }, - "end": { - "line": 30, - "character": 21 - } - } - } - } - ], - "kind": 1, - "paddingLeft": false, - "paddingRight": false - }, - { - "position": { - "line": 223, - "character": 18 - }, - "label": [ - { - "value": ": " - }, - { - "value": "Client", - "location": { - "uri": "file:///home/os/gracilaria/src/lsp.rs", - "range": { - "start": { - "line": 28, - "character": 11 - }, - "end": { - "line": 28, - "character": 17 - } - } - } - } - ], - "kind": 1, - "paddingLeft": false, - "paddingRight": false - }, - { - "position": { - "line": 223, - "character": 22 - }, - "label": [ - { - "value": ": " - }, - { - "value": "JoinHandle", - "location": { - "uri": "file:///home/os/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/std/src/thread/mod.rs", - "range": { - "start": { - "line": 1885, - "character": 11 - }, - "end": { - "line": 1885, - "character": 21 - } - } - } - }, - { - "value": "<()>" - } - ], - "kind": 1, - "paddingLeft": false, - "paddingRight": false - }, - { - "position": { - "line": 223, - "character": 31 - }, - "label": [ - { - "value": ": " - }, - { - "value": "Sender", - "location": { - "uri": "file:///home/os/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/tokio-1.48.0/src/sync/oneshot.rs", - "range": { - "start": { - "line": 221, - "character": 11 - }, - "end": { - "line": 221, - "character": 17 - } - } - } - }, - { - "value": "<" - }, - { - "value": "Arc", - "location": { - "uri": "file:///home/os/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/alloc/src/sync.rs", - "range": { - "start": { - "line": 263, - "character": 11 - }, - "end": { - "line": 263, - "character": 14 - } - } - } - }, - { - "value": "<" - }, - { - "value": "Window", - "location": { - "uri": "file:///home/os/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/winit-0.30.12/src/window.rs", - "range": { - "start": { - "line": 34, - "character": 11 - }, - "end": { - "line": 34, - "character": 17 - } - } - } - }, - { - "value": ">>" - } - ], - "kind": 1, - "paddingLeft": false, - "paddingRight": false - }, - { - "position": { - "line": 231, - "character": 35 - }, - "label": [ - { - "value": "&" - }, - { - "value": "PathBuf", - "location": { - "uri": "file:///home/os/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/std/src/path.rs", - "range": { - "start": { - "line": 1176, - "character": 11 - }, - "end": { - "line": 1176, - "character": 18 - } - } - } - } - ], - "kind": 1, - "paddingLeft": true, - "paddingRight": false - }, - { - "position": { - "line": 243, - "character": 12 - }, - "label": [ - { - "value": ": " - }, - { - "value": "Option", - "location": { - "uri": "file:///home/os/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/option.rs", - "range": { - "start": { - "line": 598, - "character": 9 - }, - "end": { - "line": 598, - "character": 15 - } - } - } - }, - { - "value": "<&" - }, - { - "value": "Client", - "location": { - "uri": "file:///home/os/gracilaria/src/lsp.rs", - "range": { - "start": { - "line": 28, - "character": 11 - }, - "end": { - "line": 28, - "character": 17 - } - } - } - }, - { - "value": ">" - } - ], - "kind": 1, - "paddingLeft": false, - "paddingRight": false - }, - { - "position": { - "line": 243, - "character": 16 - }, - "label": [ - { - "value": ": " - }, - { - "value": "Option", - "location": { - "uri": "file:///home/os/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/option.rs", - "range": { - "start": { - "line": 598, - "character": 9 - }, - "end": { - "line": 598, - "character": 15 - } - } - } - }, - { - "value": "<" - }, - { - "value": "JoinHandle", - "location": { - "uri": "file:///home/os/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/std/src/thread/mod.rs", - "range": { - "start": { - "line": 1885, - "character": 11 - }, - "end": { - "line": 1885, - "character": 21 - } - } - } - }, - { - "value": "<()>>" - } - ], - "kind": 1, - "paddingLeft": false, - "paddingRight": false - }, - { - "position": { - "line": 243, - "character": 23 - }, - "label": [ - { - "value": ": " - }, - { - "value": "Option", + "value": "Result", "location": { - "uri": "file:///home/os/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/option.rs", + "uri": "file:///home/os/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/result.rs", "range": { "start": { - "line": 598, + "line": 556, "character": 9 }, "end": { - "line": 598, + "line": 556, "character": 15 } } @@ -1412,35 +266,16 @@ "value": "<" }, { - "value": "Sender", - "location": { - "uri": "file:///home/os/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/tokio-1.48.0/src/sync/oneshot.rs", - "range": { - "start": { - "line": 221, - "character": 11 - }, - "end": { - "line": 221, - "character": 17 - } - } - } - }, - { - "value": "<" - }, - { - "value": "Arc", + "value": "Vec", "location": { - "uri": "file:///home/os/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/alloc/src/sync.rs", + "uri": "file:///home/os/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/alloc/src/vec/mod.rs", "range": { "start": { - "line": 263, + "line": 435, "character": 11 }, "end": { - "line": 263, + "line": 435, "character": 14 } } @@ -1450,289 +285,69 @@ "value": "<" }, { - "value": "Window", - "location": { - "uri": "file:///home/os/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/winit-0.30.12/src/window.rs", - "range": { - "start": { - "line": 34, - "character": 11 - }, - "end": { - "line": 34, - "character": 17 - } - } - } - }, - { - "value": ">>>" - } - ], - "kind": 1, - "paddingLeft": false, - "paddingRight": false - }, - { - "position": { - "line": 244, - "character": 15 - }, - "label": [ - { - "value": ": &" - }, - { - "value": "Client", + "value": "Patch", "location": { - "uri": "file:///home/os/gracilaria/src/lsp.rs", + "uri": "file:///home/os/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/diff-match-patch-rs-0.5.1/src/dmp.rs", "range": { "start": { - "line": 28, + "line": 2320, "character": 11 }, "end": { - "line": 28, - "character": 17 - } - } - } - } - ], - "kind": 1, - "paddingLeft": false, - "paddingRight": false - }, - { - "position": { - "line": 244, - "character": 18 - }, - "label": [ - { - "value": ": " - }, - { - "value": "JoinHandle", - "location": { - "uri": "file:///home/os/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/std/src/thread/mod.rs", - "range": { - "start": { - "line": 1885, - "character": 11 - }, - "end": { - "line": 1885, - "character": 21 - } - } - } - }, - { - "value": "<()>" - } - ], - "kind": 1, - "paddingLeft": false, - "paddingRight": false - }, - { - "position": { - "line": 244, - "character": 21 - }, - "label": [ - { - "value": ": " - }, - { - "value": "Sender", - "location": { - "uri": "file:///home/os/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/tokio-1.48.0/src/sync/oneshot.rs", - "range": { - "start": { - "line": 221, - "character": 11 - }, - "end": { - "line": 221, - "character": 17 + "line": 2320, + "character": 16 } } } }, { - "value": "<" + "value": "<u8>>, " }, { - "value": "Arc", + "value": "Error", "location": { - "uri": "file:///home/os/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/alloc/src/sync.rs", + "uri": "file:///home/os/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/diff-match-patch-rs-0.5.1/src/errors.rs", "range": { "start": { - "line": 263, - "character": 11 + "line": 1, + "character": 9 }, "end": { - "line": 263, + "line": 1, "character": 14 } } } }, { - "value": "<" - }, - { - "value": "Window", - "location": { - "uri": "file:///home/os/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/winit-0.30.12/src/window.rs", - "range": { - "start": { - "line": 34, - "character": 11 - }, - "end": { - "line": 34, - "character": 17 - } - } - } - }, - { - "value": ">>" + "value": ">" } ], "kind": 1, - "paddingLeft": false, + "paddingLeft": true, "paddingRight": false }, { "position": { - "line": 252, - "character": 20 + "line": 104, + "character": 29 }, "label": [ { - "value": ": " - }, - { - "value": "Rq", + "value": "input:", "location": { - "uri": "file:///home/os/gracilaria/src/lsp.rs", + "uri": "file:///home/os/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/diff-match-patch-rs-0.5.1/src/dmp.rs", "range": { "start": { - "line": 844, - "character": 11 + "line": 3177, + "character": 8 }, "end": { - "line": 844, + "line": 3177, "character": 13 } } } - }, - { - "value": "<" - }, - { - "value": "Hovr", - "location": { - "uri": "file:///home/os/gracilaria/src/hov.rs", - "range": { - "start": { - "line": 305, - "character": 11 - }, - "end": { - "line": 305, - "character": 15 - } - } - } - }, - { - "value": ", " - }, - { - "value": "Option", - "location": { - "uri": "file:///home/os/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/option.rs", - "range": { - "start": { - "line": 598, - "character": 9 - }, - "end": { - "line": 598, - "character": 15 - } - } - } - }, - { - "value": "<" - }, - { - "value": "Hovr", - "location": { - "uri": "file:///home/os/gracilaria/src/hov.rs", - "range": { - "start": { - "line": 305, - "character": 11 - }, - "end": { - "line": 305, - "character": 15 - } - } - } - }, - { - "value": ">, usize, …>" - } - ], - "kind": 1, - "paddingLeft": false, - "paddingRight": false, - "data": { - "file_id": 0, - "hash": "17808790406277811891", - "resolve_range": { - "start": { - "line": 252, - "character": 8 - }, - "end": { - "line": 252, - "character": 20 - } - }, - "version": 114 - } - }, - { - "position": { - "line": 253, - "character": 13 - }, - "label": [ - { - "value": "T:", - "location": { - "uri": "file:///home/os/gracilaria/src/lsp.rs", - "range": { - "start": { - "line": 844, - "character": 14 - }, - "end": { - "line": 844, - "character": 15 - } - } - } } ], "kind": 2, @@ -1741,296 +356,22 @@ }, { "position": { - "line": 253, - "character": 19 - }, - "label": [ - { - "value": "R:", - "location": { - "uri": "file:///home/os/gracilaria/src/lsp.rs", - "range": { - "start": { - "line": 844, - "character": 17 - }, - "end": { - "line": 844, - "character": 18 - } - } - } - } - ], - "kind": 2, - "paddingLeft": false, - "paddingRight": true - }, - { - "position": { - "line": 253, - "character": 33 - }, - "label": [ - { - "value": "D:", - "location": { - "uri": "file:///home/os/gracilaria/src/lsp.rs", - "range": { - "start": { - "line": 844, - "character": 20 - }, - "end": { - "line": 844, - "character": 26 - } - } - } - } - ], - "kind": 2, - "paddingLeft": false, - "paddingRight": true - }, - { - "position": { - "line": 253, - "character": 40 - }, - "label": [ - { - "value": "E:", - "location": { - "uri": "file:///home/os/gracilaria/src/lsp.rs", - "range": { - "start": { - "line": 844, - "character": 28 - }, - "end": { - "line": 844, - "character": 44 - } - } - } - } - ], - "kind": 2, - "paddingLeft": false, - "paddingRight": true - }, - { - "position": { - "line": 253, - "character": 26 - }, - "label": [ - { - "value": "T:", - "location": { - "uri": "file:///home/os/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/option.rs", - "range": { - "start": { - "line": 598, - "character": 16 - }, - "end": { - "line": 598, - "character": 17 - } - } - } - } - ], - "kind": 2, - "paddingLeft": false, - "paddingRight": true - }, - { - "position": { - "line": 254, + "line": 105, "character": 20 }, "label": [ { - "value": ": " - }, - { - "value": "CompletionState", + "value": "old:", "location": { - "uri": "file:///home/os/gracilaria/src/main.rs", + "uri": "file:///home/os/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/diff-match-patch-rs-0.5.1/src/patch_input.rs", "range": { "start": { - "line": 1438, - "character": 15 - }, - "end": { - "line": 1438, - "character": 30 - } - } - } - } - ], - "kind": 1, - "paddingLeft": false, - "paddingRight": false, - "data": { - "file_id": 0, - "hash": "1465202237954953212", - "resolve_range": { - "start": { - "line": 254, - "character": 8 - }, - "end": { - "line": 254, - "character": 20 - } - }, - "version": 114 - } - }, - { - "position": { - "line": 255, - "character": 20 - }, - "label": [ - { - "value": ": " - }, - { - "value": "Rq", - "location": { - "uri": "file:///home/os/gracilaria/src/lsp.rs", - "range": { - "start": { - "line": 844, - "character": 11 - }, - "end": { - "line": 844, - "character": 13 - } - } - } - }, - { - "value": "<(" - }, - { - "value": "SignatureHelp", - "location": { - "uri": "file:///home/os/.cargo/git/checkouts/helix-93fb9717c38fa114/fffeb3c/helix-lsp-types/src/signature_help.rs", - "range": { - "start": { - "line": 142, - "character": 11 - }, - "end": { - "line": 142, - "character": 24 - } - } - } - }, - { - "value": ", usize, …), …>" - } - ], - "kind": 1, - "paddingLeft": false, - "paddingRight": false, - "data": { - "file_id": 0, - "hash": "17109826368545006083", - "resolve_range": { - "start": { - "line": 255, - "character": 8 - }, - "end": { - "line": 255, - "character": 20 - } - }, - "version": 114 - } - }, - { - "position": { - "line": 256, - "character": 14 - }, - "label": [ - { - "value": "T:", - "location": { - "uri": "file:///home/os/gracilaria/src/lsp.rs", - "range": { - "start": { - "line": 848, - "character": 13 - }, - "end": { - "line": 848, - "character": 14 - } - } - } - } - ], - "kind": 2, - "paddingLeft": false, - "paddingRight": true - }, - { - "position": { - "line": 256, - "character": 53 - }, - "label": [ - { - "value": "R:", - "location": { - "uri": "file:///home/os/gracilaria/src/lsp.rs", - "range": { - "start": { - "line": 848, - "character": 16 + "line": 9, + "character": 25 }, "end": { - "line": 848, - "character": 26 - } - } - } - } - ], - "kind": 2, - "paddingLeft": false, - "paddingRight": true - }, - { - "position": { - "line": 256, - "character": 75 - }, - "label": [ - { - "value": "D:", - "location": { - "uri": "file:///home/os/gracilaria/src/lsp.rs", - "range": { - "start": { - "line": 848, + "line": 9, "character": 28 - }, - "end": { - "line": 848, - "character": 34 } } } @@ -2042,22 +383,22 @@ }, { "position": { - "line": 256, - "character": 44 + "line": 106, + "character": 20 }, "label": [ { - "value": "T:", + "value": "new:", "location": { - "uri": "file:///home/os/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/option.rs", + "uri": "file:///home/os/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/diff-match-patch-rs-0.5.1/src/patch_input.rs", "range": { "start": { - "line": 598, - "character": 16 + "line": 9, + "character": 39 }, "end": { - "line": 598, - "character": 17 + "line": 9, + "character": 42 } } } @@ -2069,25 +410,22 @@ }, { "position": { - "line": 257, - "character": 27 + "line": 112, + "character": 18 }, "label": [ { - "value": ": " - }, - { - "value": "Rq", + "value": "Result", "location": { - "uri": "file:///home/os/gracilaria/src/lsp.rs", + "uri": "file:///home/os/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/result.rs", "range": { "start": { - "line": 844, - "character": 11 + "line": 556, + "character": 9 }, "end": { - "line": 844, - "character": 13 + "line": 556, + "character": 15 } } } @@ -2096,213 +434,85 @@ "value": "<" }, { - "value": "Box", + "value": "Vec", "location": { - "uri": "file:///home/os/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/alloc/src/boxed.rs", + "uri": "file:///home/os/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/alloc/src/vec/mod.rs", "range": { "start": { - "line": 234, + "line": 435, "character": 11 }, "end": { - "line": 234, + "line": 435, "character": 14 } } } }, { - "value": "<[" - }, - { - "value": "SemanticToken", - "location": { - "uri": "file:///home/os/.cargo/git/checkouts/helix-93fb9717c38fa114/fffeb3c/helix-lsp-types/src/semantic_tokens.rs", - "range": { - "start": { - "line": 146, - "character": 11 - }, - "end": { - "line": 146, - "character": 24 - } - } - } - }, - { - "value": "]>, …>" - } - ], - "kind": 1, - "paddingLeft": false, - "paddingRight": false, - "data": { - "file_id": 0, - "hash": "4166254487634182400", - "resolve_range": { - "start": { - "line": 257, - "character": 8 - }, - "end": { - "line": 257, - "character": 27 - } - }, - "version": 114 - } - }, - { - "position": { - "line": 258, - "character": 16 - }, - "label": [ - { - "value": ": " - }, - { - "value": "Rq", - "location": { - "uri": "file:///home/os/gracilaria/src/lsp.rs", - "range": { - "start": { - "line": 844, - "character": 11 - }, - "end": { - "line": 844, - "character": 13 - } - } - } - }, - { "value": "<" }, { - "value": "String", + "value": "Patch", "location": { - "uri": "file:///home/os/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/alloc/src/string.rs", + "uri": "file:///home/os/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/diff-match-patch-rs-0.5.1/src/dmp.rs", "range": { "start": { - "line": 359, + "line": 2320, "character": 11 }, "end": { - "line": 359, - "character": 17 + "line": 2320, + "character": 16 } } } }, { - "value": ", " + "value": "<u8>>, " }, { - "value": "Option", + "value": "Error", "location": { - "uri": "file:///home/os/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/option.rs", + "uri": "file:///home/os/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/diff-match-patch-rs-0.5.1/src/errors.rs", "range": { "start": { - "line": 598, + "line": 1, "character": 9 }, "end": { - "line": 598, - "character": 15 - } - } - } - }, - { - "value": "<" - }, - { - "value": "String", - "location": { - "uri": "file:///home/os/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/alloc/src/string.rs", - "range": { - "start": { - "line": 359, - "character": 11 - }, - "end": { - "line": 359, - "character": 17 + "line": 1, + "character": 14 } } } }, { - "value": ">, …, …>" + "value": ">" } ], "kind": 1, - "paddingLeft": false, - "paddingRight": false, - "data": { - "file_id": 0, - "hash": "3913809942888977650", - "resolve_range": { - "start": { - "line": 258, - "character": 8 - }, - "end": { - "line": 258, - "character": 16 - } - }, - "version": 114 - } - }, - { - "position": { - "line": 259, - "character": 13 - }, - "label": [ - { - "value": "T:", - "location": { - "uri": "file:///home/os/gracilaria/src/lsp.rs", - "range": { - "start": { - "line": 844, - "character": 14 - }, - "end": { - "line": 844, - "character": 15 - } - } - } - } - ], - "kind": 2, - "paddingLeft": false, - "paddingRight": true + "paddingLeft": true, + "paddingRight": false }, { "position": { - "line": 259, - "character": 21 + "line": 109, + "character": 29 }, "label": [ { - "value": "R:", + "value": "input:", "location": { - "uri": "file:///home/os/gracilaria/src/lsp.rs", + "uri": "file:///home/os/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/diff-match-patch-rs-0.5.1/src/dmp.rs", "range": { "start": { - "line": 844, - "character": 17 + "line": 3177, + "character": 8 }, "end": { - "line": 844, - "character": 18 + "line": 3177, + "character": 13 } } } @@ -2314,22 +524,22 @@ }, { "position": { - "line": 259, - "character": 37 + "line": 110, + "character": 20 }, "label": [ { - "value": "D:", + "value": "old:", "location": { - "uri": "file:///home/os/gracilaria/src/lsp.rs", + "uri": "file:///home/os/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/diff-match-patch-rs-0.5.1/src/patch_input.rs", "range": { "start": { - "line": 844, - "character": 20 + "line": 9, + "character": 25 }, "end": { - "line": 844, - "character": 26 + "line": 9, + "character": 28 } } } @@ -2341,22 +551,22 @@ }, { "position": { - "line": 259, - "character": 41 + "line": 111, + "character": 20 }, "label": [ { - "value": "E:", + "value": "new:", "location": { - "uri": "file:///home/os/gracilaria/src/lsp.rs", + "uri": "file:///home/os/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/diff-match-patch-rs-0.5.1/src/patch_input.rs", "range": { "start": { - "line": 844, - "character": 28 + "line": 9, + "character": 39 }, "end": { - "line": 844, - "character": 44 + "line": 9, + "character": 42 } } } @@ -2368,8 +578,8 @@ }, { "position": { - "line": 259, - "character": 28 + "line": 127, + "character": 34 }, "label": [ { @@ -2378,11 +588,11 @@ "uri": "file:///home/os/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/option.rs", "range": { "start": { - "line": 598, + "line": 599, "character": 16 }, "end": { - "line": 598, + "line": 599, "character": 17 } } @@ -2395,113 +605,85 @@ }, { "position": { - "line": 272, - "character": 16 + "line": 128, + "character": 35 }, "label": [ { - "value": ": " + "value": "move(" }, { - "value": "Hist", + "value": "&mut (*self).redo_history", "location": { "uri": "file:///home/os/gracilaria/src/main.rs", "range": { "start": { - "line": 92, - "character": 7 + "line": 127, + "character": 18 }, "end": { - "line": 92, - "character": 11 + "line": 127, + "character": 22 } } } + }, + { + "value": ")" } ], - "kind": 1, "paddingLeft": false, - "paddingRight": false, - "data": { - "file_id": 0, - "hash": "375241452594036681", - "resolve_range": { - "start": { - "line": 272, - "character": 8 - }, - "end": { - "line": 272, - "character": 16 - } - }, - "version": 114 - } + "paddingRight": true }, { "position": { - "line": 287, - "character": 18 + "line": 128, + "character": 37 }, "label": [ { "value": ": &" }, { - "value": "Client", + "value": "Diff", "location": { - "uri": "file:///home/os/gracilaria/src/lsp.rs", + "uri": "file:///home/os/gracilaria/src/text.rs", "range": { "start": { - "line": 28, + "line": 185, "character": 11 }, "end": { - "line": 28, - "character": 17 + "line": 185, + "character": 15 } } } } ], "kind": 1, - "paddingLeft": false, - "paddingRight": false - }, - { - "position": { - "line": 287, - "character": 26 - }, - "label": [ + "textEdits": [ { - "value": ": &" - }, - { - "value": "Path", - "location": { - "uri": "file:///home/os/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/std/src/path.rs", - "range": { - "start": { - "line": 2302, - "character": 11 - }, - "end": { - "line": 2302, - "character": 15 - } + "range": { + "start": { + "line": 128, + "character": 37 + }, + "end": { + "line": 128, + "character": 37 } - } + }, + "newText": ": &Diff" } ], - "kind": 1, "paddingLeft": false, "paddingRight": false }, { "position": { - "line": 290, - "character": 26 + "line": 130, + "character": 34 }, "label": [ { @@ -2510,11 +692,11 @@ "uri": "file:///home/os/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/option.rs", "range": { "start": { - "line": 598, + "line": 599, "character": 16 }, "end": { - "line": 598, + "line": 599, "character": 17 } } @@ -2527,3282 +709,455 @@ }, { "position": { - "line": 308, - "character": 11 - }, - "label": [ - { - "value": ": " - }, - { - "value": "WinitApp", - "location": { - "uri": "file:///home/os/gracilaria/src/winit_app.rs", - "range": { - "start": { - "line": 39, - "character": 18 - }, - "end": { - "line": 39, - "character": 26 - } - } - } - }, - { - "value": "<(" - }, - { - "value": "Arc", - "location": { - "uri": "file:///home/os/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/alloc/src/sync.rs", - "range": { - "start": { - "line": 263, - "character": 11 - }, - "end": { - "line": 263, - "character": 14 - } - } - } - }, - { - "value": "<" - }, - { - "value": "Window", - "location": { - "uri": "file:///home/os/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/winit-0.30.12/src/window.rs", - "range": { - "start": { - "line": 34, - "character": 11 - }, - "end": { - "line": 34, - "character": 17 - } - } - } - }, - { - "value": ">, " - }, - { - "value": "Context", - "location": { - "uri": "file:///home/os/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/softbuffer-0.4.6/src/lib.rs", - "range": { - "start": { - "line": 32, - "character": 11 - }, - "end": { - "line": 32, - "character": 18 - } - } - } - }, - { - "value": "<…>), …, …, …, …>" - } - ], - "kind": 1, - "paddingLeft": false, - "paddingRight": false - }, - { - "position": { - "line": 309, - "character": 18 - }, - "label": [ - { - "value": ": &" - }, - { - "value": "ActiveEventLoop", - "location": { - "uri": "file:///home/os/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/winit-0.30.12/src/event_loop.rs", - "range": { - "start": { - "line": 51, - "character": 11 - }, - "end": { - "line": 51, - "character": 26 - } - } - } - } - ], - "kind": 1, - "paddingLeft": false, - "paddingRight": false, - "data": { - "file_id": 0, - "hash": "6031379334000232086", - "resolve_range": { - "start": { - "line": 309, - "character": 14 - }, - "end": { - "line": 309, - "character": 18 - } - }, - "version": 114 - } - }, - { - "position": { - "line": 310, - "character": 22 - }, - "label": [ - { - "value": ": " - }, - { - "value": "Arc", - "location": { - "uri": "file:///home/os/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/alloc/src/sync.rs", - "range": { - "start": { - "line": 263, - "character": 11 - }, - "end": { - "line": 263, - "character": 14 - } - } - } - }, - { - "value": "<" - }, - { - "value": "Window", - "location": { - "uri": "file:///home/os/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/winit-0.30.12/src/window.rs", - "range": { - "start": { - "line": 34, - "character": 11 - }, - "end": { - "line": 34, - "character": 17 - } - } - } - }, - { - "value": ">" - } - ], - "kind": 1, - "paddingLeft": false, - "paddingRight": false, - "data": { - "file_id": 0, - "hash": "15604331129027173500", - "resolve_range": { - "start": { - "line": 310, - "character": 16 - }, - "end": { - "line": 310, - "character": 22 - } - }, - "version": 114 - } - }, - { - "position": { - "line": 310, - "character": 56 - }, - "label": [ - { - "value": ": " - }, - { - "value": "WindowAttributes", - "location": { - "uri": "file:///home/os/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/winit-0.30.12/src/window.rs", - "range": { - "start": { - "line": 103, - "character": 11 - }, - "end": { - "line": 103, - "character": 27 - } - } - } - } - ], - "kind": 1, - "paddingLeft": false, - "paddingRight": false, - "data": { - "file_id": 0, - "hash": "645969963223919016", - "resolve_range": { - "start": { - "line": 310, - "character": 55 - }, - "end": { - "line": 310, - "character": 56 - } - }, - "version": 114 - } - }, - { - "position": { - "line": 317, - "character": 25 - }, - "label": [ - { - "value": ": " - }, - { - "value": "Sender", - "location": { - "uri": "file:///home/os/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/tokio-1.48.0/src/sync/oneshot.rs", - "range": { - "start": { - "line": 221, - "character": 11 - }, - "end": { - "line": 221, - "character": 17 - } - } - } - }, - { - "value": "<" - }, - { - "value": "Arc", - "location": { - "uri": "file:///home/os/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/alloc/src/sync.rs", - "range": { - "start": { - "line": 263, - "character": 11 - }, - "end": { - "line": 263, - "character": 14 - } - } - } - }, - { - "value": "<" - }, - { - "value": "Window", - "location": { - "uri": "file:///home/os/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/winit-0.30.12/src/window.rs", - "range": { - "start": { - "line": 34, - "character": 11 - }, - "end": { - "line": 34, - "character": 17 - } - } - } - }, - { - "value": ">>" - } - ], - "kind": 1, - "paddingLeft": false, - "paddingRight": false - }, - { - "position": { - "line": 323, - "character": 23 + "line": 131, + "character": 40 }, "label": [ { - "value": ": " + "value": "move(" }, { - "value": "Context", + "value": "&mut (*self).history", "location": { - "uri": "file:///home/os/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/softbuffer-0.4.6/src/lib.rs", + "uri": "file:///home/os/gracilaria/src/main.rs", "range": { "start": { - "line": 32, - "character": 11 - }, - "end": { - "line": 32, + "line": 130, "character": 18 - } - } - } - }, - { - "value": "<" - }, - { - "value": "Arc", - "location": { - "uri": "file:///home/os/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/alloc/src/sync.rs", - "range": { - "start": { - "line": 263, - "character": 11 - }, - "end": { - "line": 263, - "character": 14 - } - } - } - }, - { - "value": "<" - }, - { - "value": "Window", - "location": { - "uri": "file:///home/os/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/winit-0.30.12/src/window.rs", - "range": { - "start": { - "line": 34, - "character": 11 }, "end": { - "line": 34, - "character": 17 + "line": 130, + "character": 22 } } } }, { - "value": ">>" + "value": ")" } ], - "kind": 1, "paddingLeft": false, - "paddingRight": false, - "data": { - "file_id": 0, - "hash": "9746336051057975452", - "resolve_range": { - "start": { - "line": 323, - "character": 16 - }, - "end": { - "line": 323, - "character": 23 - } - }, - "version": 114 - } + "paddingRight": true }, { "position": { - "line": 328, - "character": 14 + "line": 131, + "character": 42 }, "label": [ { "value": ": &" }, { - "value": "ActiveEventLoop", - "location": { - "uri": "file:///home/os/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/winit-0.30.12/src/event_loop.rs", - "range": { - "start": { - "line": 51, - "character": 11 - }, - "end": { - "line": 51, - "character": 26 - } - } - } - } - ], - "kind": 1, - "paddingLeft": false, - "paddingRight": false, - "data": { - "file_id": 0, - "hash": "12971153746480130799", - "resolve_range": { - "start": { - "line": 328, - "character": 9 - }, - "end": { - "line": 328, - "character": 14 - } - }, - "version": 114 - } - }, - { - "position": { - "line": 328, - "character": 23 - }, - "label": [ - { - "value": ": &mut " - }, - { - "value": "Arc", - "location": { - "uri": "file:///home/os/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/alloc/src/sync.rs", - "range": { - "start": { - "line": 263, - "character": 11 - }, - "end": { - "line": 263, - "character": 14 - } - } - } - }, - { - "value": "<" - }, - { - "value": "Window", - "location": { - "uri": "file:///home/os/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/winit-0.30.12/src/window.rs", - "range": { - "start": { - "line": 34, - "character": 11 - }, - "end": { - "line": 34, - "character": 17 - } - } - } - }, - { - "value": ">" - } - ], - "kind": 1, - "paddingLeft": false, - "paddingRight": false - }, - { - "position": { - "line": 328, - "character": 32 - }, - "label": [ - { - "value": ": &mut " - }, - { - "value": "Context", - "location": { - "uri": "file:///home/os/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/softbuffer-0.4.6/src/lib.rs", - "range": { - "start": { - "line": 32, - "character": 11 - }, - "end": { - "line": 32, - "character": 18 - } - } - } - }, - { - "value": "<" - }, - { - "value": "Arc", - "location": { - "uri": "file:///home/os/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/alloc/src/sync.rs", - "range": { - "start": { - "line": 263, - "character": 11 - }, - "end": { - "line": 263, - "character": 14 - } - } - } - }, - { - "value": "<" - }, - { - "value": "Window", - "location": { - "uri": "file:///home/os/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/winit-0.30.12/src/window.rs", - "range": { - "start": { - "line": 34, - "character": 11 - }, - "end": { - "line": 34, - "character": 17 - } - } - } - }, - { - "value": ">>" - } - ], - "kind": 1, - "paddingLeft": false, - "paddingRight": false - }, - { - "position": { - "line": 333, - "character": 21 - }, - "label": [ - { - "value": ": &mut " - }, - { - "value": "Arc", - "location": { - "uri": "file:///home/os/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/alloc/src/sync.rs", - "range": { - "start": { - "line": 263, - "character": 11 - }, - "end": { - "line": 263, - "character": 14 - } - } - } - }, - { - "value": "<" - }, - { - "value": "Window", - "location": { - "uri": "file:///home/os/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/winit-0.30.12/src/window.rs", - "range": { - "start": { - "line": 34, - "character": 11 - }, - "end": { - "line": 34, - "character": 17 - } - } - } - }, - { - "value": ">" - } - ], - "kind": 1, - "paddingLeft": false, - "paddingRight": false - }, - { - "position": { - "line": 333, - "character": 31 - }, - "label": [ - { - "value": ": &mut " - }, - { - "value": "Context", - "location": { - "uri": "file:///home/os/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/softbuffer-0.4.6/src/lib.rs", - "range": { - "start": { - "line": 32, - "character": 11 - }, - "end": { - "line": 32, - "character": 18 - } - } - } - }, - { - "value": "<" - }, - { - "value": "Arc", - "location": { - "uri": "file:///home/os/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/alloc/src/sync.rs", - "range": { - "start": { - "line": 263, - "character": 11 - }, - "end": { - "line": 263, - "character": 14 - } - } - } - }, - { - "value": "<" - }, - { - "value": "Window", + "value": "Diff", "location": { - "uri": "file:///home/os/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/winit-0.30.12/src/window.rs", + "uri": "file:///home/os/gracilaria/src/text.rs", "range": { "start": { - "line": 34, + "line": 185, "character": 11 }, "end": { - "line": 34, - "character": 17 - } - } - } - }, - { - "value": ">>" - } - ], - "kind": 1, - "paddingLeft": false, - "paddingRight": false - }, - { - "position": { - "line": 333, - "character": 41 - }, - "label": [ - { - "value": ": " - }, - { - "value": "Option", - "location": { - "uri": "file:///home/os/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/option.rs", - "range": { - "start": { - "line": 598, - "character": 9 - }, - "end": { - "line": 598, + "line": 185, "character": 15 } } } - }, - { - "value": "<&mut " - }, - { - "value": "Surface", - "location": { - "uri": "file:///home/os/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/softbuffer-0.4.6/src/lib.rs", - "range": { - "start": { - "line": 74, - "character": 11 - }, - "end": { - "line": 74, - "character": 18 - } - } - } - }, - { - "value": "<" - }, - { - "value": "Arc", - "location": { - "uri": "file:///home/os/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/alloc/src/sync.rs", - "range": { - "start": { - "line": 263, - "character": 11 - }, - "end": { - "line": 263, - "character": 14 - } - } - } - }, - { - "value": "<" - }, - { - "value": "Window", - "location": { - "uri": "file:///home/os/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/winit-0.30.12/src/window.rs", - "range": { - "start": { - "line": 34, - "character": 11 - }, - "end": { - "line": 34, - "character": 17 - } - } - } - }, - { - "value": ">, …>>" } ], "kind": 1, - "paddingLeft": false, - "paddingRight": false, - "data": { - "file_id": 0, - "hash": "4048954655260694955", - "resolve_range": { - "start": { - "line": 333, - "character": 34 - }, - "end": { - "line": 333, - "character": 41 - } - }, - "version": 114 - } - }, - { - "position": { - "line": 333, - "character": 48 - }, - "label": [ - { - "value": ": " - }, + "textEdits": [ { - "value": "Event", - "location": { - "uri": "file:///home/os/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/winit-0.30.12/src/event.rs", - "range": { - "start": { - "line": 60, - "character": 9 - }, - "end": { - "line": 60, - "character": 14 - } + "range": { + "start": { + "line": 131, + "character": 42 + }, + "end": { + "line": 131, + "character": 42 } - } - }, - { - "value": "<()>" - } - ], - "kind": 1, - "paddingLeft": false, - "paddingRight": false, - "data": { - "file_id": 0, - "hash": "8284377374651278122", - "resolve_range": { - "start": { - "line": 333, - "character": 43 }, - "end": { - "line": 333, - "character": 48 - } - }, - "version": 114 - } - }, - { - "position": { - "line": 333, - "character": 54 - }, - "label": [ - { - "value": ": &" - }, - { - "value": "ActiveEventLoop", - "location": { - "uri": "file:///home/os/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/winit-0.30.12/src/event_loop.rs", - "range": { - "start": { - "line": 51, - "character": 11 - }, - "end": { - "line": 51, - "character": 26 - } - } - } - } - ], - "kind": 1, - "paddingLeft": false, - "paddingRight": false, - "data": { - "file_id": 0, - "hash": "385403187896352526", - "resolve_range": { - "start": { - "line": 333, - "character": 50 - }, - "end": { - "line": 333, - "character": 54 - } - }, - "version": 114 - } - }, - { - "position": { - "line": 343, - "character": 19 - }, - "label": ": f32", - "kind": 1, - "paddingLeft": false, - "paddingRight": false - }, - { - "position": { - "line": 343, - "character": 23 - }, - "label": ": f32", - "kind": 1, - "paddingLeft": false, - "paddingRight": false - }, - { - "position": { - "line": 344, - "character": 18 - }, - "label": ": usize", - "kind": 1, - "paddingLeft": false, - "paddingRight": false - }, - { - "position": { - "line": 344, - "character": 21 - }, - "label": ": usize", - "kind": 1, - "paddingLeft": false, - "paddingRight": false - }, - { - "position": { - "line": 358, - "character": 26 - }, - "label": [ - { - "value": ": &" - }, - { - "value": "Client", - "location": { - "uri": "file:///home/os/gracilaria/src/lsp.rs", - "range": { - "start": { - "line": 28, - "character": 11 - }, - "end": { - "line": 28, - "character": 17 - } - } - } - } - ], - "kind": 1, - "paddingLeft": false, - "paddingRight": false - }, - { - "position": { - "line": 358, - "character": 29 - }, - "label": [ - { - "value": ": &" - }, - { - "value": "Path", - "location": { - "uri": "file:///home/os/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/std/src/path.rs", - "range": { - "start": { - "line": 2302, - "character": 11 - }, - "end": { - "line": 2302, - "character": 15 - } - } - } - } - ], - "kind": 1, - "paddingLeft": false, - "paddingRight": false - }, - { - "position": { - "line": 359, - "character": 22 - }, - "label": [ - { - "value": ": " - }, - { - "value": "Request", - "location": { - "uri": "file:///home/os/.cargo/git/checkouts/rust-analyzer-94e62460e169ee43/4472ac7/lib/lsp-server/src/msg.rs", - "range": { - "start": { - "line": 102, - "character": 11 - }, - "end": { - "line": 102, - "character": 18 - } - } - } - } - ], - "kind": 1, - "paddingLeft": false, - "paddingRight": false - }, - { - "position": { - "line": 362, - "character": 33 - }, - "label": [ - { - "value": ": impl " - }, - { - "value": "Future", - "location": { - "uri": "file:///home/os/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/future/future.rs", - "range": { - "start": { - "line": 36, - "character": 10 - }, - "end": { - "line": 36, - "character": 16 - } - } - } - }, - { - "value": "<" - }, - { - "value": "Output", - "location": { - "uri": "file:///home/os/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/future/future.rs", - "range": { - "start": { - "line": 40, - "character": 9 - }, - "end": { - "line": 40, - "character": 15 - } - } - } - }, - { - "value": " = " - }, - { - "value": "Result", - "location": { - "uri": "file:///home/os/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/result.rs", - "range": { - "start": { - "line": 556, - "character": 9 - }, - "end": { - "line": 556, - "character": 15 - } - } - } - }, - { - "value": "<…, …>>" - } - ], - "kind": 1, - "paddingLeft": false, - "paddingRight": false - }, - { - "position": { - "line": 365, - "character": 26 - }, - "label": [ - { - "value": ": " - }, - { - "value": "Request", - "location": { - "uri": "file:///home/os/.cargo/git/checkouts/rust-analyzer-94e62460e169ee43/4472ac7/lib/lsp-server/src/msg.rs", - "range": { - "start": { - "line": 102, - "character": 11 - }, - "end": { - "line": 102, - "character": 18 - } - } - } + "newText": ": &Diff" } ], - "kind": 1, "paddingLeft": false, "paddingRight": false }, { "position": { - "line": 369, - "character": 28 - }, - "label": [ - { - "value": ": " - }, - { - "value": "Result", - "location": { - "uri": "file:///home/os/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/result.rs", - "range": { - "start": { - "line": 556, - "character": 9 - }, - "end": { - "line": 556, - "character": 15 - } - } - } - }, - { - "value": "<" - }, - { - "value": "Option", - "location": { - "uri": "file:///home/os/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/option.rs", - "range": { - "start": { - "line": 598, - "character": 9 - }, - "end": { - "line": 598, - "character": 15 - } - } - } - }, - { - "value": "<" - }, - { - "value": "String", - "location": { - "uri": "file:///home/os/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/alloc/src/string.rs", - "range": { - "start": { - "line": 359, - "character": 11 - }, - "end": { - "line": 359, - "character": 17 - } - } - } - }, - { - "value": ">, " - }, - { - "value": "Error", - "location": { - "uri": "file:///home/os/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/anyhow-1.0.100/src/lib.rs", - "range": { - "start": { - "line": 393, - "character": 11 - }, - "end": { - "line": 393, - "character": 16 - } - } - } - }, - { - "value": ">" - } - ], - "kind": 1, - "paddingLeft": false, - "paddingRight": false, - "data": { - "file_id": 0, - "hash": "12763259919117714608", - "resolve_range": { - "start": { - "line": 369, - "character": 27 - }, - "end": { - "line": 369, - "character": 28 - } - }, - "version": 114 - } - }, - { - "position": { - "line": 370, - "character": 51 + "line": 139, + "character": 5 }, "label": [ { - "value": ": &mut " - }, - { - "value": "Rq", + "value": "fn undo", "location": { - "uri": "file:///home/os/gracilaria/src/lsp.rs", - "range": { - "start": { - "line": 844, - "character": 11 - }, - "end": { - "line": 844, - "character": 13 - } - } - } - }, - { - "value": "<" - }, - { - "value": "Complete", - "location": { - "uri": "file:///home/os/gracilaria/src/com.rs", + "uri": "file:///home/os/gracilaria/src/main.rs", "range": { "start": { - "line": 14, + "line": 133, "character": 11 }, "end": { - "line": 14, - "character": 19 - } - } - } - }, - { - "value": ", " - }, - { - "value": "Option", - "location": { - "uri": "file:///home/os/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/option.rs", - "range": { - "start": { - "line": 598, - "character": 9 - }, - "end": { - "line": 598, + "line": 133, "character": 15 } } } - }, - { - "value": "<" - }, - { - "value": "CompletionResponse", - "location": { - "uri": "file:///home/os/.cargo/git/checkouts/helix-93fb9717c38fa114/fffeb3c/helix-lsp-types/src/completion.rs", - "range": { - "start": { - "line": 344, - "character": 9 - }, - "end": { - "line": 344, - "character": 27 - } - } - } - }, - { - "value": ">, …>" } ], - "kind": 1, - "paddingLeft": false, + "paddingLeft": true, "paddingRight": false }, { "position": { - "line": 371, - "character": 30 + "line": 135, + "character": 25 }, "label": [ { - "value": ": " + "value": "move(" }, { - "value": "Result", + "value": "&mut *t", "location": { - "uri": "file:///home/os/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/result.rs", - "range": { - "start": { - "line": 556, - "character": 9 - }, - "end": { - "line": 556, - "character": 15 - } - } - } - }, - { - "value": "<" - }, - { - "value": "Option", - "location": { - "uri": "file:///home/os/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/option.rs", - "range": { - "start": { - "line": 598, - "character": 9 - }, - "end": { - "line": 598, - "character": 15 - } - } - } - }, - { - "value": "<" - }, - { - "value": "CompletionResponse", - "location": { - "uri": "file:///home/os/.cargo/git/checkouts/helix-93fb9717c38fa114/fffeb3c/helix-lsp-types/src/completion.rs", + "uri": "file:///home/os/gracilaria/src/main.rs", "range": { "start": { - "line": 344, - "character": 9 - }, - "end": { - "line": 344, + "line": 133, "character": 27 - } - } - } - }, - { - "value": ">, …>" - } - ], - "kind": 1, - "paddingLeft": false, - "paddingRight": false, - "data": { - "file_id": 0, - "hash": "17295209807845546528", - "resolve_range": { - "start": { - "line": 371, - "character": 29 - }, - "end": { - "line": 371, - "character": 30 - } - }, - "version": 114 - } - }, - { - "position": { - "line": 371, - "character": 34 - }, - "label": ": usize", - "kind": 1, - "paddingLeft": false, - "paddingRight": false - }, - { - "position": { - "line": 372, - "character": 47 - }, - "label": [ - { - "value": ": " - }, - { - "value": "CompletionResponse", - "location": { - "uri": "file:///home/os/.cargo/git/checkouts/helix-93fb9717c38fa114/fffeb3c/helix-lsp-types/src/completion.rs", - "range": { - "start": { - "line": 344, - "character": 9 }, "end": { - "line": 344, - "character": 27 - } - } - } - } - ], - "kind": 1, - "paddingLeft": false, - "paddingRight": false, - "data": { - "file_id": 0, - "hash": "15872752186798058464", - "resolve_range": { - "start": { - "line": 372, - "character": 46 - }, - "end": { - "line": 372, - "character": 47 - } - }, - "version": 114 - } - }, - { - "position": { - "line": 375, - "character": 39 - }, - "label": [ - { - "value": ": " - }, - { - "value": "Result", - "location": { - "uri": "file:///home/os/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/result.rs", - "range": { - "start": { - "line": 556, - "character": 9 - }, - "end": { - "line": 556, - "character": 15 - } - } - } - }, - { - "value": "<" - }, - { - "value": "Box", - "location": { - "uri": "file:///home/os/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/alloc/src/boxed.rs", - "range": { - "start": { - "line": 234, - "character": 11 - }, - "end": { - "line": 234, - "character": 14 + "line": 133, + "character": 28 } } } }, { - "value": "<[" + "value": ", " }, { - "value": "SemanticToken", + "value": "&mut (*self).last", "location": { - "uri": "file:///home/os/.cargo/git/checkouts/helix-93fb9717c38fa114/fffeb3c/helix-lsp-types/src/semantic_tokens.rs", + "uri": "file:///home/os/gracilaria/src/main.rs", "range": { "start": { - "line": 146, - "character": 11 + "line": 133, + "character": 21 }, "end": { - "line": 146, - "character": 24 + "line": 133, + "character": 25 } } } }, { - "value": "]>, …>" + "value": ")" } ], - "kind": 1, "paddingLeft": false, - "paddingRight": false, - "data": { - "file_id": 0, - "hash": "13221065354968477482", - "resolve_range": { - "start": { - "line": 375, - "character": 38 - }, - "end": { - "line": 375, - "character": 39 - } - }, - "version": 114 - } + "paddingRight": true }, { "position": { - "line": 376, - "character": 32 + "line": 135, + "character": 27 }, "label": [ { "value": ": " }, { - "value": "Result", - "location": { - "uri": "file:///home/os/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/result.rs", - "range": { - "start": { - "line": 556, - "character": 9 - }, - "end": { - "line": 556, - "character": 15 - } - } - } - }, - { - "value": "<" - }, - { - "value": "Option", - "location": { - "uri": "file:///home/os/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/option.rs", - "range": { - "start": { - "line": 598, - "character": 9 - }, - "end": { - "line": 598, - "character": 15 - } - } - } - }, - { - "value": "<" - }, - { - "value": "SignatureHelp", + "value": "Diff", "location": { - "uri": "file:///home/os/.cargo/git/checkouts/helix-93fb9717c38fa114/fffeb3c/helix-lsp-types/src/signature_help.rs", + "uri": "file:///home/os/gracilaria/src/text.rs", "range": { "start": { - "line": 142, + "line": 185, "character": 11 }, "end": { - "line": 142, - "character": 24 - } - } - } - }, - { - "value": ">, …>" - } - ], - "kind": 1, - "paddingLeft": false, - "paddingRight": false, - "data": { - "file_id": 0, - "hash": "12348608600095910952", - "resolve_range": { - "start": { - "line": 376, - "character": 31 - }, - "end": { - "line": 376, - "character": 32 - } - }, - "version": 114 - } - }, - { - "position": { - "line": 376, - "character": 40 - }, - "label": [ - { - "value": ": " - }, - { - "value": "Option", - "location": { - "uri": "file:///home/os/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/option.rs", - "range": { - "start": { - "line": 598, - "character": 9 - }, - "end": { - "line": 598, + "line": 185, "character": 15 } } } - }, - { - "value": "<(" - }, - { - "value": "SignatureHelp", - "location": { - "uri": "file:///home/os/.cargo/git/checkouts/helix-93fb9717c38fa114/fffeb3c/helix-lsp-types/src/signature_help.rs", - "range": { - "start": { - "line": 142, - "character": 11 - }, - "end": { - "line": 142, - "character": 24 - } - } - } - }, - { - "value": ", usize, …)>" } ], "kind": 1, - "paddingLeft": false, - "paddingRight": false - }, - { - "position": { - "line": 376, - "character": 66 - }, - "label": [ + "textEdits": [ { - "value": ": " - }, - { - "value": "SignatureHelp", - "location": { - "uri": "file:///home/os/.cargo/git/checkouts/helix-93fb9717c38fa114/fffeb3c/helix-lsp-types/src/signature_help.rs", - "range": { - "start": { - "line": 142, - "character": 11 - }, - "end": { - "line": 142, - "character": 24 - } + "range": { + "start": { + "line": 135, + "character": 27 + }, + "end": { + "line": 135, + "character": 27 } - } - } - ], - "kind": 1, - "paddingLeft": false, - "paddingRight": false, - "data": { - "file_id": 0, - "hash": "8309493448695784503", - "resolve_range": { - "start": { - "line": 376, - "character": 65 }, - "end": { - "line": 376, - "character": 66 - } - }, - "version": 114 - } - }, - { - "position": { - "line": 377, - "character": 36 - }, - "label": [ - { - "value": ": " - }, - { - "value": "SignatureHelp", - "location": { - "uri": "file:///home/os/.cargo/git/checkouts/helix-93fb9717c38fa114/fffeb3c/helix-lsp-types/src/signature_help.rs", - "range": { - "start": { - "line": 142, - "character": 11 - }, - "end": { - "line": 142, - "character": 24 - } - } - } - } - ], - "kind": 1, - "paddingLeft": false, - "paddingRight": false - }, - { - "position": { - "line": 377, - "character": 40 - }, - "label": ": usize", - "kind": 1, - "paddingLeft": false, - "paddingRight": false - }, - { - "position": { - "line": 377, - "character": 45 - }, - "label": [ - { - "value": ": " - }, - { - "value": "Option", - "location": { - "uri": "file:///home/os/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/option.rs", - "range": { - "start": { - "line": 598, - "character": 9 - }, - "end": { - "line": 598, - "character": 15 - } - } - } - }, - { - "value": "<usize>" + "newText": ": Diff" } ], - "kind": 1, "paddingLeft": false, "paddingRight": false }, { "position": { - "line": 383, - "character": 28 + "line": 136, + "character": 23 }, "label": [ { - "value": ": " - }, - { - "value": "Result", - "location": { - "uri": "file:///home/os/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/result.rs", - "range": { - "start": { - "line": 556, - "character": 9 - }, - "end": { - "line": 556, - "character": 15 - } - } - } - }, - { - "value": "<" - }, - { - "value": "Option", + "value": "redo:", "location": { - "uri": "file:///home/os/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/option.rs", - "range": { - "start": { - "line": 598, - "character": 9 - }, - "end": { - "line": 598, - "character": 15 - } - } - } - }, - { - "value": "<" - }, - { - "value": "Hovr", - "location": { - "uri": "file:///home/os/gracilaria/src/hov.rs", - "range": { - "start": { - "line": 305, - "character": 11 - }, - "end": { - "line": 305, - "character": 15 - } - } - } - }, - { - "value": ">, " - }, - { - "value": "Error", - "location": { - "uri": "file:///home/os/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/anyhow-1.0.100/src/lib.rs", + "uri": "file:///home/os/gracilaria/src/text.rs", "range": { "start": { - "line": 393, - "character": 11 + "line": 198, + "character": 41 }, "end": { - "line": 393, - "character": 16 + "line": 198, + "character": 45 } } } - }, - { - "value": ">" } ], - "kind": 1, + "kind": 2, "paddingLeft": false, - "paddingRight": false, - "data": { - "file_id": 0, - "hash": "2884004005642618203", - "resolve_range": { - "start": { - "line": 383, - "character": 27 - }, - "end": { - "line": 383, - "character": 28 - } - }, - "version": 114 - } + "paddingRight": true }, { "position": { - "line": 383, - "character": 35 + "line": 145, + "character": 5 }, "label": [ { - "value": ": " - }, - { - "value": "Option", - "location": { - "uri": "file:///home/os/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/option.rs", - "range": { - "start": { - "line": 598, - "character": 9 - }, - "end": { - "line": 598, - "character": 15 - } - } - } - }, - { - "value": "<" - }, - { - "value": "Hovr", + "value": "fn redo", "location": { - "uri": "file:///home/os/gracilaria/src/hov.rs", + "uri": "file:///home/os/gracilaria/src/main.rs", "range": { "start": { - "line": 305, + "line": 140, "character": 11 }, "end": { - "line": 305, + "line": 140, "character": 15 } } } - }, - { - "value": ">" - } - ], - "kind": 1, - "paddingLeft": false, - "paddingRight": false - }, - { - "position": { - "line": 387, - "character": 29 - }, - "label": [ - { - "value": ": " - }, - { - "value": "WindowId", - "location": { - "uri": "file:///home/os/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/winit-0.30.12/src/window.rs", - "range": { - "start": { - "line": 68, - "character": 11 - }, - "end": { - "line": 68, - "character": 19 - } - } - } } ], - "kind": 1, - "paddingLeft": false, - "paddingRight": false - }, - { - "position": { - "line": 388, - "character": 52 - }, - "label": [ - { - "value": ": " - }, - { - "value": "PhysicalSize", - "location": { - "uri": "file:///home/os/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/dpi-0.1.2/src/lib.rs", - "range": { - "start": { - "line": 615, - "character": 11 - }, - "end": { - "line": 615, - "character": 23 - } - } - } - }, - { - "value": "<u32>" - } - ], - "kind": 1, - "paddingLeft": false, - "paddingRight": false - }, - { - "position": { - "line": 390, - "character": 36 - }, - "label": [ - { - "value": ": &mut " - }, - { - "value": "Surface", - "location": { - "uri": "file:///home/os/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/softbuffer-0.4.6/src/lib.rs", - "range": { - "start": { - "line": 74, - "character": 11 - }, - "end": { - "line": 74, - "character": 18 - } - } - } - }, - { - "value": "<" - }, - { - "value": "Arc", - "location": { - "uri": "file:///home/os/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/alloc/src/sync.rs", - "range": { - "start": { - "line": 263, - "character": 11 - }, - "end": { - "line": 263, - "character": 14 - } - } - } - }, - { - "value": "<" - }, - { - "value": "Window", - "location": { - "uri": "file:///home/os/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/winit-0.30.12/src/window.rs", - "range": { - "start": { - "line": 34, - "character": 11 - }, - "end": { - "line": 34, - "character": 17 - } - } - } - }, - { - "value": ">, " - }, - { - "value": "Arc", - "location": { - "uri": "file:///home/os/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/alloc/src/sync.rs", - "range": { - "start": { - "line": 263, - "character": 11 - }, - "end": { - "line": 263, - "character": 14 - } - } - } - }, - { - "value": "<…>>" - } - ], - "kind": 1, - "paddingLeft": false, - "paddingRight": false - }, - { - "position": { - "line": 398, - "character": 38 - }, - "label": [ - { - "value": ": " - }, - { - "value": "NonZero", - "location": { - "uri": "file:///home/os/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/num/nonzero.rs", - "range": { - "start": { - "line": 126, - "character": 11 - }, - "end": { - "line": 126, - "character": 18 - } - } - } - }, - { - "value": "<u32>" - } - ], - "kind": 1, - "paddingLeft": false, - "paddingRight": false - }, - { - "position": { - "line": 398, - "character": 52 - }, - "label": [ - { - "value": ": " - }, - { - "value": "NonZero", - "location": { - "uri": "file:///home/os/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/num/nonzero.rs", - "range": { - "start": { - "line": 126, - "character": 11 - }, - "end": { - "line": 126, - "character": 18 - } - } - } - }, - { - "value": "<u32>" - } - ], - "kind": 1, - "paddingLeft": false, - "paddingRight": false - }, - { - "position": { - "line": 418, - "character": 29 - }, - "label": [ - { - "value": ": " - }, - { - "value": "WindowId", - "location": { - "uri": "file:///home/os/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/winit-0.30.12/src/window.rs", - "range": { - "start": { - "line": 68, - "character": 11 - }, - "end": { - "line": 68, - "character": 19 - } - } - } - } - ], - "kind": 1, - "paddingLeft": false, + "paddingLeft": true, "paddingRight": false }, { "position": { - "line": 421, - "character": 36 + "line": 141, + "character": 25 }, "label": [ { - "value": ": &mut " - }, - { - "value": "Surface", - "location": { - "uri": "file:///home/os/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/softbuffer-0.4.6/src/lib.rs", - "range": { - "start": { - "line": 74, - "character": 11 - }, - "end": { - "line": 74, - "character": 18 - } - } - } - }, - { - "value": "<" + "value": "move(" }, { - "value": "Arc", + "value": "&mut *t", "location": { - "uri": "file:///home/os/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/alloc/src/sync.rs", - "range": { - "start": { - "line": 263, - "character": 11 - }, - "end": { - "line": 263, - "character": 14 - } - } - } - }, - { - "value": "<" - }, - { - "value": "Window", - "location": { - "uri": "file:///home/os/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/winit-0.30.12/src/window.rs", - "range": { - "start": { - "line": 34, - "character": 11 - }, - "end": { - "line": 34, - "character": 17 - } - } - } - }, - { - "value": ">, " - }, - { - "value": "Arc", - "location": { - "uri": "file:///home/os/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/alloc/src/sync.rs", + "uri": "file:///home/os/gracilaria/src/main.rs", "range": { "start": { - "line": 263, - "character": 11 + "line": 140, + "character": 27 }, "end": { - "line": 263, - "character": 14 + "line": 140, + "character": 28 } } } }, { - "value": "<…>>" - } - ], - "kind": 1, - "paddingLeft": false, - "paddingRight": false - }, - { - "position": { - "line": 428, - "character": 28 - }, - "label": [ - { - "value": ": " + "value": ", " }, { - "value": "PhysicalSize", + "value": "&mut (*self).last", "location": { - "uri": "file:///home/os/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/dpi-0.1.2/src/lib.rs", + "uri": "file:///home/os/gracilaria/src/main.rs", "range": { "start": { - "line": 615, - "character": 11 + "line": 140, + "character": 21 }, "end": { - "line": 615, - "character": 23 + "line": 140, + "character": 25 } } } }, { - "value": "<u32>" - } - ], - "kind": 1, - "paddingLeft": false, - "paddingRight": false, - "data": { - "file_id": 0, - "hash": "554845905536600452", - "resolve_range": { - "start": { - "line": 428, - "character": 24 - }, - "end": { - "line": 428, - "character": 28 - } - }, - "version": 114 - } - }, - { - "position": { - "line": 431, - "character": 31 - }, - "label": [ - { - "value": ": " - }, - { - "value": "Instant", - "location": { - "uri": "file:///home/os/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/std/src/time.rs", - "range": { - "start": { - "line": 157, - "character": 11 - }, - "end": { - "line": 157, - "character": 18 - } - } - } + "value": ")" } ], - "kind": 1, "paddingLeft": false, - "paddingRight": false, - "data": { - "file_id": 0, - "hash": "1249655471166542177", - "resolve_range": { - "start": { - "line": 431, - "character": 28 - }, - "end": { - "line": 431, - "character": 31 - } - }, - "version": 114 - } + "paddingRight": true }, { "position": { - "line": 439, - "character": 29 + "line": 141, + "character": 27 }, "label": [ { "value": ": " }, { - "value": "Option", - "location": { - "uri": "file:///home/os/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/option.rs", - "range": { - "start": { - "line": 598, - "character": 9 - }, - "end": { - "line": 598, - "character": 15 - } - } - } - }, - { - "value": "<" - }, - { - "value": "Range", - "location": { - "uri": "file:///home/os/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/ops/range.rs", - "range": { - "start": { - "line": 81, - "character": 11 - }, - "end": { - "line": 81, - "character": 16 - } - } - } - }, - { - "value": "<usize>>" - } - ], - "kind": 1, - "paddingLeft": false, - "paddingRight": false, - "data": { - "file_id": 0, - "hash": "2373729206185663797", - "resolve_range": { - "start": { - "line": 439, - "character": 28 - }, - "end": { - "line": 439, - "character": 29 - } - }, - "version": 114 - } - }, - { - "position": { - "line": 440, - "character": 46 - }, - "label": [ - { - "value": ": &" - }, - { - "value": "Range", - "location": { - "uri": "file:///home/os/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/ops/range.rs", - "range": { - "start": { - "line": 81, - "character": 11 - }, - "end": { - "line": 81, - "character": 16 - } - } - } - }, - { - "value": "<usize>" - } - ], - "kind": 1, - "paddingLeft": false, - "paddingRight": false - }, - { - "position": { - "line": 450, - "character": 32 - }, - "label": ": usize", - "kind": 1, - "paddingLeft": false, - "paddingRight": false, - "data": { - "file_id": 0, - "hash": "11612996505645132466", - "resolve_range": { - "start": { - "line": 450, - "character": 28 - }, - "end": { - "line": 450, - "character": 32 - } - }, - "version": 114 - } - }, - { - "position": { - "line": 457, - "character": 32 - }, - "label": ": usize", - "kind": 1, - "paddingLeft": false, - "paddingRight": false - }, - { - "position": { - "line": 457, - "character": 36 - }, - "label": ": usize", - "kind": 1, - "paddingLeft": false, - "paddingRight": false - }, - { - "position": { - "line": 457, - "character": 43 - }, - "label": [ - { - "value": ": &mut " - }, - { - "value": "TextArea", + "value": "Diff", "location": { "uri": "file:///home/os/gracilaria/src/text.rs", "range": { "start": { - "line": 213, + "line": 185, "character": 11 }, "end": { - "line": 213, - "character": 19 + "line": 185, + "character": 15 } } } } ], "kind": 1, - "paddingLeft": false, - "paddingRight": false, - "data": { - "file_id": 0, - "hash": "2865463369686423350", - "resolve_range": { - "start": { - "line": 457, - "character": 39 - }, - "end": { - "line": 457, - "character": 43 - } - }, - "version": 114 - } - }, - { - "position": { - "line": 457, - "character": 51 - }, - "label": [ + "textEdits": [ { - "value": ": " - }, - { - "value": "Output", - "location": { - "uri": "file:///home/os/gracilaria/src/text.rs", - "range": { - "start": { - "line": 1311, - "character": 11 - }, - "end": { - "line": 1311, - "character": 17 - } + "range": { + "start": { + "line": 141, + "character": 27 + }, + "end": { + "line": 141, + "character": 27 } - } - }, - { - "value": "<'_>" - } - ], - "kind": 1, - "paddingLeft": false, - "paddingRight": false, - "data": { - "file_id": 0, - "hash": "4780143008517611683", - "resolve_range": { - "start": { - "line": 457, - "character": 46 }, - "end": { - "line": 457, - "character": 51 - } - }, - "version": 114 - } - }, - { - "position": { - "line": 458, - "character": 48 - }, - "label": [ - { - "value": ": &" - }, - { - "value": "Client", - "location": { - "uri": "file:///home/os/gracilaria/src/lsp.rs", - "range": { - "start": { - "line": 28, - "character": 11 - }, - "end": { - "line": 28, - "character": 17 - } - } - } - } - ], - "kind": 1, - "paddingLeft": false, - "paddingRight": false - }, - { - "position": { - "line": 458, - "character": 51 - }, - "label": [ - { - "value": ": &" - }, - { - "value": "Path", - "location": { - "uri": "file:///home/os/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/std/src/path.rs", - "range": { - "start": { - "line": 2302, - "character": 11 - }, - "end": { - "line": 2302, - "character": 15 - } - } - } + "newText": ": Diff" } ], - "kind": 1, "paddingLeft": false, "paddingRight": false }, { "position": { - "line": 458, - "character": 73 + "line": 142, + "character": 23 }, "label": [ { - "value": ": " - }, - { - "value": "Url", + "value": "redo:", "location": { - "uri": "file:///home/os/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/url-2.5.7/src/lib.rs", + "uri": "file:///home/os/gracilaria/src/text.rs", "range": { "start": { - "line": 227, - "character": 11 + "line": 198, + "character": 41 }, "end": { - "line": 227, - "character": 14 + "line": 198, + "character": 45 } } } } ], - "kind": 1, + "kind": 2, "paddingLeft": false, - "paddingRight": false + "paddingRight": true }, { "position": { - "line": 458, - "character": 124 + "line": 150, + "character": 5 }, "label": [ { - "value": ": &" - }, - { - "value": "Vec", + "value": "fn push_if_changed", "location": { - "uri": "file:///home/os/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/alloc/src/vec/mod.rs", - "range": { - "start": { - "line": 433, - "character": 11 - }, - "end": { - "line": 433, - "character": 14 - } - } - } - }, - { - "value": "<" - }, - { - "value": "Diagnostic", - "location": { - "uri": "file:///home/os/.cargo/git/checkouts/helix-93fb9717c38fa114/fffeb3c/helix-lsp-types/src/lib.rs", + "uri": "file:///home/os/gracilaria/src/main.rs", "range": { "start": { - "line": 369, + "line": 146, "character": 11 }, "end": { - "line": 369, - "character": 21 + "line": 146, + "character": 26 } } } - }, - { - "value": ">" } ], - "kind": 1, - "paddingLeft": false, + "paddingLeft": true, "paddingRight": false }, { "position": { - "line": 463, - "character": 52 - }, - "label": [ - { - "value": ": " - }, - { - "value": "Vec", - "location": { - "uri": "file:///home/os/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/alloc/src/vec/mod.rs", - "range": { - "start": { - "line": 433, - "character": 11 - }, - "end": { - "line": 433, - "character": 14 - } - } - } - }, - { - "value": "<u32>" - } - ], - "kind": 1, - "paddingLeft": false, - "paddingRight": false, - "data": { - "file_id": 0, - "hash": "779868099067206180", - "resolve_range": { - "start": { - "line": 463, - "character": 40 - }, - "end": { - "line": 463, - "character": 52 - } - }, - "version": 114 - } - }, - { - "position": { - "line": 464, - "character": 62 - }, - "label": [ - { - "value": ": &" - }, - { - "value": "Diagnostic", - "location": { - "uri": "file:///home/os/.cargo/git/checkouts/helix-93fb9717c38fa114/fffeb3c/helix-lsp-types/src/lib.rs", - "range": { - "start": { - "line": 369, - "character": 11 - }, - "end": { - "line": 369, - "character": 21 - } - } - } - } - ], - "kind": 1, - "paddingLeft": false, - "paddingRight": false, - "data": { - "file_id": 0, - "hash": "2157070224440877568", - "resolve_range": { - "start": { - "line": 464, - "character": 58 - }, - "end": { - "line": 464, - "character": 62 - } - }, - "version": 114 - } - }, - { - "position": { - "line": 465, - "character": 47 - }, - "label": [ - { - "value": ": " - }, - { - "value": "DiagnosticSeverity", - "location": { - "uri": "file:///home/os/.cargo/git/checkouts/helix-93fb9717c38fa114/fffeb3c/helix-lsp-types/src/lib.rs", - "range": { - "start": { - "line": 460, - "character": 11 - }, - "end": { - "line": 460, - "character": 29 - } - } - } - } - ], - "kind": 1, - "paddingLeft": false, - "paddingRight": false, - "data": { - "file_id": 0, - "hash": "11360557387436378292", - "resolve_range": { - "start": { - "line": 465, - "character": 44 - }, - "end": { - "line": 465, - "character": 47 - } - }, - "version": 114 - } - }, - { - "position": { - "line": 466, - "character": 48 + "line": 155, + "character": 5 }, "label": [ { - "value": ": " - }, - { - "value": "EType", + "value": "fn test_push", "location": { "uri": "file:///home/os/gracilaria/src/main.rs", "range": { "start": { - "line": 460, - "character": 41 - }, - "end": { - "line": 460, - "character": 46 - } - } - } - } - ], - "kind": 1, - "paddingLeft": false, - "paddingRight": false, - "data": { - "file_id": 0, - "hash": "5949810695372277047", - "resolve_range": { - "start": { - "line": 466, - "character": 44 - }, - "end": { - "line": 466, - "character": 48 - } - }, - "version": 114 - } - }, - { - "position": { - "line": 472, - "character": 139 - }, - "label": [ - { - "value": ": &&" - }, - { - "value": "DiagnosticRelatedInformation", - "location": { - "uri": "file:///home/os/.cargo/git/checkouts/helix-93fb9717c38fa114/fffeb3c/helix-lsp-types/src/lib.rs", - "range": { - "start": { - "line": 478, - "character": 11 - }, - "end": { - "line": 478, - "character": 39 - } - } - } - } - ], - "kind": 1, - "paddingLeft": false, - "paddingRight": false, - "data": { - "file_id": 0, - "hash": "8324177226982108991", - "resolve_range": { - "start": { - "line": 472, - "character": 137 - }, - "end": { - "line": 472, - "character": 139 - } - }, - "version": 114 - } - }, - { - "position": { - "line": 472, - "character": 176 - }, - "label": [ - { - "value": ": &" - }, - { - "value": "DiagnosticRelatedInformation", - "location": { - "uri": "file:///home/os/.cargo/git/checkouts/helix-93fb9717c38fa114/fffeb3c/helix-lsp-types/src/lib.rs", - "range": { - "start": { - "line": 478, - "character": 11 - }, - "end": { - "line": 478, - "character": 39 - } - } - } - } - ], - "kind": 1, - "paddingLeft": false, - "paddingRight": false, - "data": { - "file_id": 0, - "hash": "7315375997936835009", - "resolve_range": { - "start": { - "line": 472, - "character": 175 - }, - "end": { - "line": 472, - "character": 176 - } - }, - "version": 114 - } - }, - { - "position": { - "line": 475, - "character": 55 - }, - "label": [ - { - "value": ": " - }, - { - "value": "Range", - "location": { - "uri": "file:///home/os/.cargo/git/checkouts/helix-93fb9717c38fa114/fffeb3c/helix-lsp-types/src/lib.rs", - "range": { - "start": { - "line": 273, + "line": 151, "character": 11 }, "end": { - "line": 273, - "character": 16 + "line": 151, + "character": 20 } } } } ], - "kind": 1, - "paddingLeft": false, - "paddingRight": false - }, - { - "position": { - "line": 475, - "character": 58 - }, - "label": ": &str", - "kind": 1, - "paddingLeft": false, + "paddingLeft": true, "paddingRight": false }, { "position": { - "line": 475, - "character": 63 + "line": 163, + "character": 5 }, "label": [ { - "value": ": " - }, - { - "value": "EType", + "value": "fn record", "location": { "uri": "file:///home/os/gracilaria/src/main.rs", "range": { "start": { - "line": 460, - "character": 41 - }, - "end": { - "line": 460, - "character": 46 - } - } - } - } - ], - "kind": 1, - "paddingLeft": false, - "paddingRight": false - }, - { - "position": { - "line": 476, - "character": 49 - }, - "label": ": u32", - "kind": 1, - "paddingLeft": false, - "paddingRight": false, - "data": { - "file_id": 0, - "hash": "10217986206021811790", - "resolve_range": { - "start": { - "line": 476, - "character": 48 - }, - "end": { - "line": 476, - "character": 49 - } - }, - "version": 114 - } - }, - { - "position": { - "line": 481, - "character": 49 - }, - "label": [ - { - "value": ": |&mut " - }, - { - "value": "Cell", - "location": { - "uri": "file:///home/os/.cargo/git/checkouts/dsb-871cc53a8b3bdc59/e5d2802/src/cell.rs", - "range": { - "start": { - "line": 43, + "line": 156, "character": 11 }, "end": { - "line": 43, - "character": 15 + "line": 156, + "character": 17 } } } - }, - { - "value": "| -> ()" } ], - "kind": 1, - "paddingLeft": false, - "paddingRight": false - }, - { - "position": { - "line": 495, - "character": 49 - }, - "label": ": usize", - "kind": 1, - "paddingLeft": false, - "paddingRight": false, - "data": { - "file_id": 0, - "hash": "3629305234643442951", - "resolve_range": { - "start": { - "line": 495, - "character": 48 - }, - "end": { - "line": 495, - "character": 49 - } - }, - "version": 114 - } - }, - { - "position": { - "line": 496, - "character": 55 - }, - "label": ": usize", - "kind": 1, - "paddingLeft": false, + "paddingLeft": true, "paddingRight": false - }, - { - "position": { - "line": 496, - "character": 87 - }, - "label": [ - { - "value": ": " - }, - { - "value": "RopeSlice", - "location": { - "uri": "file:///home/os/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/ropey-1.6.1/src/slice.rs", - "range": { - "start": { - "line": 24, - "character": 11 - }, - "end": { - "line": 24, - "character": 20 - } - } - } - }, - { - "value": "<'_>" - } - ], - "kind": 1, - "paddingLeft": false, - "paddingRight": false, - "data": { - "file_id": 0, - "hash": "16646102023681377141", - "resolve_range": { - "start": { - "line": 496, - "character": 86 - }, - "end": { - "line": 496, - "character": 87 - } - }, - "version": 114 - } - }, - { - "position": { - "line": 499, - "character": 45 - }, - "label": ": &str", - "kind": 1, - "paddingLeft": false, - "paddingRight": false, - "data": { - "file_id": 0, - "hash": "6837260651689634118", - "resolve_range": { - "start": { - "line": 499, - "character": 44 - }, - "end": { - "line": 499, - "character": 45 - } - }, - "version": 114 - } } ]
\ No newline at end of file @@ -303,7 +303,10 @@ fn t() { println!("{:?}", now.elapsed()); x.as_ref().save("x"); } +#[derive(Debug)] pub struct Hovr { - pub(crate) span: Option<Range<usize>>, + pub(crate) span: Option<[(VisualX, usize); 2]>, pub(crate) item: crate::text::CellBuffer, } + +type VisualX = usize; @@ -328,14 +328,33 @@ impl Client { } } - pub fn inlay(&'static self, f: &Path, t:&TextArea) -> impl Future<Output = Result<Vec<InlayHint>, RequestError>> + use<> { + pub fn inlay( + &'static self, + f: &Path, + t: &TextArea, + ) -> impl Future<Output = Result<Vec<InlayHint>, RequestError>> + use<> + { self.request::<lsp_request!("textDocument/inlayHint")>(&InlayHintParams { work_done_progress_params: default(), text_document: f.tid(), range: t.to_l_range(lower::saturating::math!{ - t.rope.line_to_char(t.vo-t.r)..t.rope.line_to_char(t.vo + t.r + t.r) + t.rope.try_line_to_char(t.vo-t.r).unwrap_or(0)..t.rope.try_line_to_char(t.vo + t.r + t.r).unwrap_or(t.rope.len_chars()) }) }).unwrap().0.map(|x| x.map(Option::unwrap_or_default)) + // async { + // if let Ok(z) = z.await { + // let mut into = vec![]; + // for lem in z.into_iter(){ + // // if let Some(_) = lem.data { + // into.push(self.request::<lsp_request!("inlayHint/resolve")>(&lem).unwrap().0.await.unwrap()); + // // } + // } + // // std::fs::write("inlay", serde_json::to_string_pretty(&into).unwrap()).unwrap(); + // Ok(into) + // } else { + // panic!() + // } + // } } pub fn rq_semantic_tokens( @@ -414,7 +433,7 @@ pub fn run( }), text_document: Some(TextDocumentClientCapabilities { inlay_hint: Some(InlayHintClientCapabilities { dynamic_registration: None, resolve_support: Some(InlayHintResolveClientCapabilities { - properties: vec!["textEdits".into()], }) + properties: vec!["textEdits".into(), "tooltip".into(), "label.tooltip".into(), "label.command".into()], }) }), code_action: Some( CodeActionClientCapabilities { @@ -574,13 +593,12 @@ pub fn run( "closureReturnTypeHints": { "enable": "with_block" }, "closingBraceHints": { "minLines": 5 }, "closureStyle": "rust_analyzer", - "genericParameterHints": { - "type": { "enable": true } }, + "genericParameterHints": { "type": { "enable": true } }, "rangeExclusiveHints": { "enable": true }, "closureCaptureHints": { "enable": true }, "expressionAdjustmentHints": { "hideOutsideUnsafe": true, - "enable": "never", + "enable": "reborrow", "mode": "prefer_prefix" } }, diff --git a/src/main.rs b/src/main.rs index 13f4249..084ec66 100644 --- a/src/main.rs +++ b/src/main.rs @@ -34,6 +34,7 @@ #![allow(incomplete_features, redundant_semicolons)] use std::borrow::Cow; use std::iter::{Take, once}; +use std::mem::transmute; use std::num::NonZeroU32; use std::os::fd::AsFd; use std::path::{Path, PathBuf}; @@ -49,7 +50,6 @@ use dsb::cell::Style; use dsb::{Cell, F, Fonts}; use fimg::pixels::Blend; use fimg::{Image, OverlayAt}; -use itertools::Itertools as _; use lsp::{PathURI, Rq}; use lsp_server::{Connection, Request as LRq}; use lsp_types::request::{HoverRequest, SignatureHelpRequest}; @@ -72,7 +72,7 @@ use winit::window::Icon; use crate::bar::Bar; use crate::hov::Hovr; use crate::lsp::{RedrawAfter, RqS}; -use crate::text::{Diff, TextArea, col, color, is_word, set_a}; +use crate::text::{Diff, Mapping, TextArea, col, is_word}; mod bar; pub mod com; pub mod hov; @@ -168,6 +168,7 @@ static mut CLICKING: bool = false; const BG: [u8; 3] = [31, 36, 48]; const FG: [u8; 3] = [204, 202, 194]; +const BORDER: [u8; 3] = col!("#ffffff"); #[implicit_fn::implicit_fn] pub(crate) fn entry(event_loop: EventLoop<()>) { let ppem = 20.0; @@ -183,11 +184,8 @@ pub(crate) fn entry(event_loop: EventLoop<()>) { F::FontRef(*IFONT, &[(2003265652, 550.0)]), F::instance(*IFONT, *BIFONT), ); - let mut cursor_position = (0, 0); - - let mut state = State::Default; let mut bar = Bar { last_action: String::default() }; let mut i = Image::build(1, 1).fill(BG); @@ -204,7 +202,7 @@ pub(crate) fn entry(event_loop: EventLoop<()>) { } x.parent().and_then(rooter) } - + let workspace = origin .as_ref() .and_then(|x| rooter(&x.parent().unwrap())) @@ -253,14 +251,14 @@ pub(crate) fn entry(event_loop: EventLoop<()>) { }; } let mut hovering = - Rq::<Hovr, Option<Hovr>, usize, anyhow::Error>::default(); + Rq::<Hovr, Option<Hovr>, (usize, usize), anyhow::Error>::default(); let mut complete = CompletionState::None; let mut sig_help = // vo, lines RqS::<(SignatureHelp, usize, Option<usize>), SignatureHelpRequest, ()>::default(); let mut semantic_tokens = default(); let mut diag = Rq::<String, Option<String>, (), anyhow::Error>::default(); - let mut inlay: Rq::<Vec<InlayHint>, Vec<InlayHint>> = default(); + let mut inlay: Rq<Vec<InlayHint>, Vec<InlayHint>> = default(); // let mut complete = None::<(CompletionResponse, (usize, usize))>; // let mut complete_ = None::<( // JoinHandle< @@ -376,7 +374,9 @@ pub(crate) fn entry(event_loop: EventLoop<()>) { log::debug!("discarding request {rq:?}"), } } - inlay.poll(|x, p| x.ok().or(p.1), &l.runtime); + inlay.poll(|x, p| x.ok().or(p.1).inspect(|x| { + text.set_inlay(x); + }), &l.runtime); diag.poll(|x, _|x.ok().flatten(), &l.runtime); if let CompletionState::Complete(rq)= &mut complete { rq.poll(|f, (c,_)| { @@ -391,7 +391,7 @@ pub(crate) fn entry(event_loop: EventLoop<()>) { (x, 0, None) } }), &l.runtime); - hovering.poll(|x, (_, p)|x.ok().flatten().or(p), &l.runtime); + hovering.poll(|x, _| x.ok().flatten(), &l.runtime); } match event { Event::AboutToWait => {} Event::WindowEvent { @@ -512,13 +512,14 @@ pub(crate) fn entry(event_loop: EventLoop<()>) { }); }; if r.start == r.end { - x.get((r.start.character as _, p as _)).map(f); + x.get(text.map_to_visual((r.start.character as _, p as _)).unwrap()).map(f); } else { - x.get_range((r.start.character as _, p as _), (r.end.character as usize, r.end.line as _)) + x.get_range(text.map_to_visual((r.start.character as _, p as _)).unwrap(), + text.map_to_visual((r.end.character as usize, r.end.line as _)).unwrap()) .for_each(f) } let l = r.start.line as usize; - let Some(x_) = text.rope.get_line(l).map(|x|x.len_chars() + 2) else { + let Some(x_) = text.visual_eol(l).map(_+2) else { return; }; let m = m.lines().next().unwrap_or(m); @@ -543,11 +544,11 @@ pub(crate) fn entry(event_loop: EventLoop<()>) { .enumerate() .for_each(|(i, m)| { for x in x.get_range( - text.xy(text.rope.byte_to_char(m.start())), text.xy(text + text.map_to_visual(text.xy(text.rope.byte_to_char(m.start())).unwrap()).unwrap(),text.map_to_visual( text.xy(text .rope .byte_to_char( m.end(), - ))) + )).unwrap()).unwrap()) { x.style.bg = if i == *j { [105, 83, 128] @@ -572,7 +573,6 @@ pub(crate) fn entry(event_loop: EventLoop<()>) { }) => Some(legend), _ => None, }), - inlay.result.as_deref() ); bar.write_to( @@ -616,7 +616,7 @@ pub(crate) fn entry(event_loop: EventLoop<()>) { assert!(w < window.inner_size().width as _ &&h < window.inner_size().height as _); let is_above = position.1.checked_sub(h).is_some(); let top = position.1.checked_sub(h).unwrap_or(((((_y + 1) as f32) * (fh + ls * fac)).round() + toy) as usize); - let (_, y) = dsb::fit(&fonts.regular, ppem, ls, (window.inner_size().width as _ /* - left */,(window.inner_size().height as usize - top) )); + let (_, y) = dsb::fit(&fonts.regular, ppem, ls, (window.inner_size().width as _ /* - left */,((window.inner_size().height as usize).saturating_sub( top)) )); /* suspicious saturation */ r = r.min(y); let left = @@ -639,7 +639,7 @@ pub(crate) fn entry(event_loop: EventLoop<()>) { }; let mut pass = true; if let Some((lsp, p)) = lsp!() && let Some(diag) = lsp.diagnostics.get(&Url::from_file_path(p).unwrap(), &lsp.diagnostics.guard()) { - let dawg = diag.iter().filter(|diag| text.l_range(diag.range).is_ok_and(|x| x.contains(&text.index_at(cursor_position)) && (text.vo..text.vo+r).contains(&(diag.range.start.line as _)))); + let dawg = diag.iter().filter(|diag| text.l_range(diag.range).is_ok_and(|x| x.contains(&text.mapped_index_at(cursor_position)) && (text.vo..text.vo+r).contains(&(diag.range.start.line as _)))); for diag in dawg { match diag.data.as_ref().unwrap_or_default().get("rendered") { Some(x) if let Some(x) = x.as_str() => { @@ -650,27 +650,37 @@ pub(crate) fn entry(event_loop: EventLoop<()>) { let Some(x_lim) = t.cells.rows().map(_.iter().rev().take_while(_.letter.is_none()).count()).map(|x| c -x).max() else { continue }; let n = t.cells.rows().take(y_lim).flat_map(|x| &x[..x_lim]).copied().collect::<Vec<_>>(); - let (_,left, top, w, h) = place_around_cursor( - (diag.range.start.character as usize+text.line_number_offset()+1, diag.range.start.line as usize - text.vo), + let (_,left, top, w, h) = place_around_cursor( + text.map_to_visual((diag.range.start.character as _, diag.range.start.line as usize)) + .map(|(x, y)| (x + text.line_number_offset() + 1, y - text.vo)) + .unwrap_or((diag.range.start.character as _, diag.range.start.line as usize - text.vo)), &mut fonts, i.as_mut(), &n, x_lim, 17.0, -400., 0., 0., 0. ); pass=false; - i.r#box((left .saturating_sub(1) as _, top.saturating_sub(1) as _), w as _,h as _, [0;3]); + i.r#box((left .saturating_sub(1) as _, top.saturating_sub(1) as _), w as _,h as _, BORDER); }, _ => {} } } }; - hovering.result.as_ref().filter(|_|pass).map(|x| x.span.clone().map(|sp| { - let [(_x, _y), (_x2, _)] = text.position(sp); + hovering.result.as_ref().filter(|_|pass).map(|x| x.span.clone().map(|[(_x, _y),(_x2, _)]| { + // let [(_x, _y), (_x2, _)] = text.position(sp); + // dbg!(x..=x2, cursor_position.0) + // if !(_x..=_x2).contains(&&(cursor_position.0 .wrapping_sub( text.line_number_offset()+1))) { + // return + // } + let [_x, _x2] = [_x, _x2].add(text.line_number_offset()+1); - let _y = _y.wrapping_sub(text.vo); - if !(cursor_position.1 == _y && (_x..=_x2).contains(&cursor_position.0)) { + let Some(_y) = _y.checked_sub(text.vo) else { return; - } + }; + + // if !(cursor_position.1 == _y && (_x..=_x2).contains(&cursor_position.0)) { + // return; + // } let r = x.item.l().min(15); let c = x.item.displayable(r); @@ -681,7 +691,7 @@ pub(crate) fn entry(event_loop: EventLoop<()>) { c, x.item.c, 18.0, 10.0, 0., 0., 0. ); - i.r#box((left .saturating_sub(1) as _, top.saturating_sub(1) as _), w as _,h as _, [0;3]); + i.r#box((left .saturating_sub(1) as _, top.saturating_sub(1) as _), w as _,h as _, BORDER); })); let com = match complete { CompletionState::Complete(Rq{ result: Some(ref x,),..}) => { @@ -698,7 +708,7 @@ pub(crate) fn entry(event_loop: EventLoop<()>) { let _x = _x + text.line_number_offset()+1; let Some(_y) = _y.checked_sub(text.vo) else { break 'out }; let (is_above,left, top, w, mut h) = place_around_cursor((_x, _y), &mut fonts, i.as_mut(), &c, 40, ppem, ls, 0., 0., 0.); - i.r#box((left .saturating_sub(1) as _, top.saturating_sub(1) as _), w as _,h as _, [0;3]); + i.r#box((left .saturating_sub(1) as _, top.saturating_sub(1) as _), w as _,h as _, BORDER); let com = com.map(|c| { let (is_above_,left, top, w_, h_) = place_around_cursor( @@ -707,7 +717,7 @@ pub(crate) fn entry(event_loop: EventLoop<()>) { i.as_mut(), &c, 40, ppem, ls, 0., -(h as f32), if is_above { 0.0 } else { h as f32 } ); - i.r#box((left .saturating_sub(1) as _, top.saturating_sub(1) as _), w_ as _,h_ as _, [0;3]); + i.r#box((left .saturating_sub(1) as _, top.saturating_sub(1) as _), w_ as _,h_ as _, BORDER); if is_above { // completion below, we need to push the docs, if any, below only below us, if the sig help is still above. h = h_; } else { @@ -727,7 +737,7 @@ pub(crate) fn entry(event_loop: EventLoop<()>) { let (_,left_, top_, _w_, h_) = place_around_cursor((_x, _y), &mut fonts, i.as_mut(), cells, cols, ppem, ls, 0., -(h as f32), if is_above { com.filter(|x| !x.0).map(|(_is, _l, _t, _w, h)| h).unwrap_or_default() as f32 } else { h as f32 }); - i.r#box((left_.saturating_sub(1) as _, top_.saturating_sub(1) as _), w as _,h_ as _, [0;3]); + i.r#box((left_.saturating_sub(1) as _, top_.saturating_sub(1) as _), w as _,h_ as _, BORDER); }); } } else if let Some(c) = com { @@ -741,7 +751,7 @@ pub(crate) fn entry(event_loop: EventLoop<()>) { i.as_mut(), &c, 40, ppem, ls, 0., 0., 0. ); - i.r#box((left .saturating_sub(1) as _, top.saturating_sub(1) as _), w as _,h as _, [0;3]); + i.r#box((left .saturating_sub(1) as _, top.saturating_sub(1) as _), w as _,h as _, BORDER); } } let met = FONT.metrics(&[]); @@ -767,12 +777,12 @@ pub(crate) fn entry(event_loop: EventLoop<()>) { ); } }; - let (x, y) = text.cursor(); + let (x, y) = text.cursor_visual(); let image = Image::<_, 4>::build(2, (fh).ceil() as u32) .fill([82,82,82, 255]); for stop in text.tabstops.as_ref().into_iter().flat_map(|x|x.list()) { - let (x, y) = text.xy(stop.clone().r().end); + let Some((x, y)) = text.xy(stop.clone().r().end) else { continue }; draw_at(x, y, &image); } if matches!( @@ -819,45 +829,60 @@ pub(crate) fn entry(event_loop: EventLoop<()>) { { Some(Do::ExtendSelectionToMouse) => { *state.sel() = text.extend_selection_to( - text.index_at(cursor_position), + text.mapped_index_at(cursor_position), state.sel().clone(), ); window.request_redraw(); } Some(Do::StartSelection) => { - let x = text.index_at(cursor_position); + let x = text.mapped_index_at(cursor_position); hist.last.cursor = x; text.cursor = x; *state.sel() = x..x; } - Some(Do::Hover) if let Some(hover) = text.raw_index_at(cursor_position) => { - // assert_eq!(hover, text.index_at(cursor_position)); - let (x, y) =text.xy(hover); - let text = text.clone(); - 'out: { - let l = &mut hovering.result; - if let Some(Hovr{ span: Some(span),..}) = &*l { - let [(_x, _y), (_x2, _)] = text.position(span.clone()); - let [_x, _x2] = [_x, _x2].add(text.line_number_offset()+1); - let Some(_y) = _y.checked_sub(text.vo) else { break 'out }; - if cursor_position.1 == _y && (_x.._x2).contains(&cursor_position.0) { - break 'out; - } else { - *l = None; - window.request_redraw(); - } - if let Some((_, c)) = hovering.request && c == hover { - break 'out; - } + Some(Do::Hover) if let Some(hover) = text.visual_index_at(cursor_position) && + let Some((cl, o)) = lsp!() => 'out: { + let l = &mut hovering.result; + if let Some(Hovr{ span: Some([(_x, _y), (_x2, _)]),..}) = &*l { + let Some(_y) = _y.checked_sub(text.vo) else { break 'out }; + if cursor_position.1 == _y && (_x..=_x2).contains(&&(cursor_position.0 - text.line_number_offset()-1)) { + break 'out; + } else { + // println!("span no longer below cursor; cancel hover {_x}..{_x2} {}", cursor_position.0 - text.line_number_offset() - 1); + *l = None; + window.request_redraw(); } - if let Some((cl, o)) = lsp!() { - // if !running.insert(hover) {return} - let (rx, _) = cl.request::<HoverRequest>(&HoverParams { -text_document_position_params: TextDocumentPositionParams { text_document: TextDocumentIdentifier::new(Url::from_file_path(o).unwrap()), position: Position { - line: y as _, character: x as _, -}}, -work_done_progress_params:default() }).unwrap(); -let handle = cl.runtime.spawn(window.redraw_after(async move { + } + let text = text.clone(); + let mut rang = None; + let z = match hover { + Mapping::Char(_, _, i) => { + TextDocumentPositionParams { position: text.to_l_position(i), text_document: o.tid() } + }, + Mapping::Fake(mark, index, _) => { + let Some(ref loc) = mark.l[index].1 else { + break 'out; + }; + let (x, y) = text.xy(mark.start).unwrap(); + let Some(begin) = text.reverse_source_map(y) else { break 'out }; + let start = begin[x - 1] + 1; + let left = mark.l[..index].iter().rev().take_while(_.1.as_ref() == Some(loc)).count(); + let start = start + index - left; + let length = mark.l[index..].iter().take_while(_.1.as_ref() == Some(loc)).count() + left; + rang = Some([(start, y), (start + length, y)]); + TextDocumentPositionParams { text_document: TextDocumentIdentifier { uri: loc.uri.clone() }, position: loc.range.start } + } + }; +if let Some((_, c)) = hovering.request && c == cursor_position { + break 'out; +} + // if !running.insert(hover) {return} +let (rx, _) = cl.request::<HoverRequest>(&HoverParams { + text_document_position_params: z, + work_done_progress_params:default() +}).unwrap(); +// println!("rq hov of {hover:?} (cur {})", hovering.request.is_some()); +let handle: tokio::task::JoinHandle<Result<Option<Hovr>, anyhow::Error>> = cl.runtime.spawn(window.redraw_after(async move { let Some(x) = rx.await? else {return Ok(None::<Hovr>)}; let (w, cells) = spawn_blocking(move || { let x = match &x.contents { @@ -881,13 +906,15 @@ let handle = cl.runtime.spawn(window.redraw_after(async move { let m = hov::l(&x).into_iter().max().map(_+2).unwrap_or(usize::MAX).min(c-10); (m, hov::markdown2(m, &x)) }).await.unwrap(); - let span = x.range.and_then(|x| text.l_range(x).ok()); + let span = rang.or_else(|| x.range.and_then(|range| try { + let x1 = text.reverse_source_map(range.start.line as _)?[range.start.character as usize]; + let x2 = text.reverse_source_map(range.end.line as _)?[range.end.character as usize]; + [(x1, range.start.line as _), (x2, range.start.line as _)] + })); anyhow::Ok(Some( hov::Hovr { span, item: text::CellBuffer { c: w, vo: 0, cells: cells.into() }}.into())) })); -hovering.request = (DropH::new(handle), hover).into(); -} - } - +hovering.request = (DropH::new(handle), cursor_position).into(); +// hovering.result = None; // lsp!().map(|(cl, o)| { // let window = window.clone(); // }); @@ -912,17 +939,18 @@ hovering.request = (DropH::new(handle), hover).into(); _ = complete.consume(CompletionAction::Click).unwrap(); match state.consume(Action::M(button)).unwrap() { Some(Do::MoveCursor) => { - text.cursor = text.index_at(cursor_position); + text.cursor = text.mapped_index_at(cursor_position); text.setc(); } Some(Do::ExtendSelectionToMouse) => { + println!("ext2"); *state.sel() = text.extend_selection_to( - text.index_at(cursor_position), + text.mapped_index_at(cursor_position), state.sel().clone(), ); } Some(Do::StartSelection) => { - let x = text.index_at(cursor_position); + let x = text.mapped_index_at(cursor_position); hist.last.cursor = x; *state.sel() = text.extend_selection_to( x, @@ -1511,6 +1539,6 @@ fn frunctinator( _paramter4: u16, ) -> usize { lower::saturating::math! { parameter1 }; - + 0 -}
\ No newline at end of file +} diff --git a/src/text.rs b/src/text.rs index 22871fb..43cb8d6 100644 --- a/src/text.rs +++ b/src/text.rs @@ -17,7 +17,7 @@ use implicit_fn::implicit_fn; use itertools::Itertools; use log::error; use lsp_types::{ - InlayHint, InlayHintLabel, Position, SemanticToken, + InlayHint, InlayHintLabel, Location, Position, SemanticToken, SemanticTokensLegend, TextEdit, }; use ropey::{Rope, RopeSlice}; @@ -74,7 +74,6 @@ mod semantic { "comment" b"#5c6773" Style::ITALIC, // "decorator" b"#cccac2", - // "enumMember" b"#cccac2", "function" b"#FFD173" Style::ITALIC, "interface" b"#5CCFE6", "keyword" b"#FFAD66" Style::ITALIC | Style::BOLD, @@ -88,6 +87,7 @@ mod semantic { // "struct" b"#cccac2", // "typeParameter" b"#cccac2", "class" b"#73b9ff", + "enumMember" b"#73b9ff", "enum" b"#73b9ff" Style::ITALIC | Style::BOLD, "builtinType" b"#73d0ff" Style::ITALIC, // "type" b"#73d0ff" Style::ITALIC | Style::BOLD, @@ -236,13 +236,33 @@ pub struct TextArea { pub c: usize, pub tabstops: Option<Snippet>, + pub decorations: Decorations, } +pub type Decorations = Vec<Vec<Mark>>; + +#[derive(Clone, Debug, PartialEq)] +pub struct Mark { + pub start: usize, + pub l: Box<[(char, Option<Location>)]>, + ty: u8, +} +const INLAY: u8 = 0; + pub struct CellBuffer { pub c: usize, pub vo: usize, pub cells: Box<[Cell]>, } +impl Debug for CellBuffer { + fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + f.debug_struct("CellBuffer") + .field("c", &self.c) + .field("vo", &self.vo) + .field("cells", &self.cells.len()) + .finish() + } +} impl Deref for CellBuffer { type Target = [Cell]; @@ -274,6 +294,41 @@ impl Debug for TextArea { } impl TextArea { + #[implicit_fn::implicit_fn] + pub fn set_inlay(&mut self, inlay: &[InlayHint]) { + let mut decorations = vec![vec![]; self.l()]; + inlay + .iter() + .map(|i| { + let mut label = match &i.label { + InlayHintLabel::String(x) => + x.chars().map(|x| (x, None)).collect::<Vec<_>>(), + InlayHintLabel::LabelParts(v) => v + .iter() + .flat_map(|x| { + x.value + .chars() + .map(|y| (y, x.location.clone())) + }) + .collect(), + }; + if i.padding_left == Some(true) { + label.insert(0, (' ', None)); + } + if i.padding_right == Some(true) { + label.push((' ', None)); + } + Mark { + start: self.l_position(i.position).unwrap(), + ty: INLAY, + l: label.into(), + } + }) + .chunk_by(|x| self.rope.char_to_line(x.start)) + .into_iter() + .for_each(|(i, x)| decorations[i] = x.collect()); + self.decorations = decorations; + } pub fn position( &self, Range { start, end }: Range<usize>, @@ -282,7 +337,14 @@ impl TextArea { let y2 = self.rope.char_to_line(end); let x1 = start - self.rope.line_to_char(y1); let x2 = end - self.rope.line_to_char(y2); - [(min(x1, self.c), y1), (min(x2, self.c), y2)] + [(x1, y1), (x2, y2)] + } + + pub fn map_to_visual( + &self, + (x, y): (usize, usize), + ) -> Option<(usize, usize)> { + self.reverse_source_map(y)?.get(x).map(|&x| (x, y)) } /// number of lines @@ -290,31 +352,82 @@ impl TextArea { self.rope.len_lines() } - #[implicit_fn] - #[lower::apply(saturating)] - pub fn index_at(&self, (x, y): (usize, usize)) -> usize { - let l_i = self.vo + y; + pub fn source_map( + &'_ self, + l: usize, + ) -> Option<impl Iterator<Item = Mapping<'_>>> { + let rel = self.decorations.get(l).unwrap_or(const { &vec![] }); + let s = self.rope.try_line_to_char(l).ok()?; + let lin = self.rope.get_line(l)?; + Some(gen move { + for (char, i) in lin.chars().zip(s..) { + if let Some(x) = rel.iter().find(|x| x.start == i) { + for (i, (c, _)) in x.l.iter().enumerate() { + yield Mapping::Fake(x, i, *c); + } + } + yield Mapping::Char(char, i - s, i); + } + }) + } + pub fn reverse_source_map(&'_ self, l: usize) -> Option<Vec<usize>> { + let mut to = vec![]; + let mut off = 0; + for elem in self.source_map(l)? { + match elem { + Mapping::Fake(..) => off += 1, + Mapping::Char(_, i, _) => to.push(i + off), + } + } + Some(to) + } + + pub fn visual_eol(&self, li: usize) -> Option<usize> { + Some(self.source_map(li)?.count()) + } + + /// or eof + pub fn eol(&self, li: usize) -> usize { self.rope - .try_line_to_char(l_i) + .try_line_to_char(li) .map(|l| { - l + (self + l + self .rope - .get_line(l_i) - .map(_.len_chars() - 1) - .unwrap_or_default()) - .min((x - (self.line_number_offset() + 1)) + self.ho) + .get_line(li) + .map(|x| x.len_chars() - 1) + .unwrap_or_default() }) .unwrap_or(usize::MAX) .min(self.rope.len_chars()) } + #[implicit_fn::implicit_fn] pub fn raw_index_at(&self, (x, y): (usize, usize)) -> Option<usize> { let x = x.checked_sub(self.line_number_offset() + 1)? + self.ho; Some(self.vo + y) - .filter(|&l| self.rope.line(l).len_chars() > x) + .filter(|&l| { + self.rope.get_line(l).is_some_and(_.len_chars() > x) + }) .and_then(|l| Some(self.rope.try_line_to_char(l).ok()? + x)) } + pub fn visual_index_at( + &'_ self, + (x, y): (usize, usize), + ) -> Option<Mapping<'_>> { + self.source_map(self.vo + y).and_then(|mut i| { + i.nth(x.checked_sub(self.line_number_offset() + 1)? + self.ho) + }) + } + + pub fn mapped_index_at(&'_ self, (x, y): (usize, usize)) -> usize { + match self.visual_index_at((x, y)) { + Some(Mapping::Char(_, _, index)) => index, + Some(Mapping::Fake(mark, ..)) => mark.start, + None => self.eol(self.vo + y), + } + } + pub fn remove(&mut self, r: Range<usize>) -> Result<(), ropey::Error> { self.rope.try_remove(r.clone())?; self.tabstops.as_mut().map(|x| { @@ -366,7 +479,12 @@ impl TextArea { Ok(()) } pub fn cursor(&self) -> (usize, usize) { - self.xy(self.cursor) + self.xy(self.cursor).unwrap() + } + pub fn cursor_visual(&self) -> (usize, usize) { + let (x, y) = self.cursor(); + let z = self.reverse_source_map(y).unwrap(); + (z.get(x).copied().unwrap_or(x), y) } pub fn visible_(&self) -> Range<usize> { self.rope.line_to_char(self.vo) @@ -376,16 +494,16 @@ impl TextArea { (self.vo..self.vo + self.r).contains(&self.rope.char_to_line(x)) } pub fn x(&self, c: usize) -> usize { - self.xy(c).0 + self.xy(c).unwrap().0 } pub fn y(&self, c: usize) -> usize { self.rope.char_to_line(c) } - pub fn xy(&self, c: usize) -> (usize, usize) { - let y = self.rope.char_to_line(c); - let x = c - self.rope.line_to_char(y); - (x, y) + pub fn xy(&self, c: usize) -> Option<(usize, usize)> { + let y = self.rope.try_char_to_line(c).ok()?; + let x = c - self.rope.try_line_to_char(y).ok()?; + Some((x, y)) } fn cl(&self) -> RopeSlice<'_> { @@ -773,7 +891,6 @@ impl TextArea { apply: impl FnOnce((usize, usize), &Self, Output), path: Option<&Path>, tokens: Option<(&[SemanticToken], &SemanticTokensLegend)>, - inlay: Option<&[InlayHint]>, ) { let (c, r) = (self.c, self.r); let mut cells = Output { @@ -796,19 +913,31 @@ impl TextArea { // (self.l().max(r) + r - 1) * c // ]; let lns = self.vo..self.vo + r; - for (l, y) in lns.clone().map(self.rope.get_line(_)).zip(lns) { + for (l, y) in lns.clone().map(self.source_map(_)).zip(lns) { for (e, x) in l - .iter() - .flat_map(|x| x.chars().skip(self.ho)) + .coerce() + .skip(self.ho) + // .flat_map(|x| x.chars().skip(self.ho)) .take(c) .zip(0..) { - if e != '\n' { - cells.get((x + self.ho, y)).unwrap().letter = Some(e); - cells.get((x + self.ho, y)).unwrap().style.color = - crate::FG; - cells.get((x + self.ho, y)).unwrap().style.bg = - crate::BG; + if e.c() != '\n' { + cells.get((x + self.ho, y)).unwrap().letter = + Some(e.c()); + cells.get((x + self.ho, y)).unwrap().style = match e { + Mapping::Char(..) => Style { + color: crate::FG, + bg: crate::BG, + flags: 0, + }, + Mapping::Fake(Mark { ty: INLAY, .. }, _, _) => + Style { + color: const { color_("#536172") }, + bg: crate::BG, + flags: 0, + }, + _ => unreachable!(), + }; } } } @@ -832,6 +961,15 @@ impl TextArea { let mut ch = 0; for t in t { ln += t.delta_line; + let src_map = + self.source_map(ln as _).coerce().collect::<Vec<_>>(); + let mapping = + self.reverse_source_map(ln as _).unwrap_or_default(); + // dbg!( + // &mapping, + // self.source_map(ln as _).coerce().collect::<Vec<_>>(), + // self.rope.line(ln as _) + // ); ch = match t.delta_line { 1.. => t.delta_start, 0 => ch + t.delta_start, @@ -856,6 +994,8 @@ impl TextArea { } else if ln as usize * c + x1 > self.vo * c + r * c { break; } + let Some(&x1) = mapping.get(x1) else { continue }; + let Some(&x2) = mapping.get(x2) else { continue }; let Some(tty) = leg.token_types.get(t.token_type as usize) else { error!( @@ -868,8 +1008,14 @@ impl TextArea { semantic::NAMES.iter().position(|&x| x == tty.as_str()) { cells - .get_range((x1, ln as _), (x2, ln as _)) - .for_each(|x| { + .get_range_enumerated((x1, ln as _), (x2, ln as _)) + .filter(|(_, i)| { + matches!( + src_map.get(i.0), + Some(Mapping::Char(..)) + ) + }) + .for_each(|(x, _)| { x.style.color = semantic::COLORS[f]; x.style.flags |= semantic::STYLES[f]; }); @@ -894,8 +1040,17 @@ impl TextArea { }) .map(|i| { cells - .get_range((x1, ln as _), (x2, ln as _)) - .for_each(|x| { + .get_range_enumerated( + (x1, ln as _), + (x2, ln as _), + ) + .filter(|(_, i)| { + matches!( + src_map.get(i.0), + Some(Mapping::Char(..)) + ) + }) + .for_each(|(x, _)| { x.style.color = MCOLORS[i]; x.style.flags |= MSTYLE[i]; }); @@ -919,6 +1074,8 @@ impl TextArea { } selection.map(|x| { let [a, b] = self.position(x); + let a = self.map_to_visual(a).unwrap(); + let b = self.map_to_visual(b).unwrap(); cells .get_range_enumerated(a, b) .filter(|(c, (x, y))| { @@ -941,33 +1098,34 @@ impl TextArea { // 0x23, 0x34, 0x4B }) }); - for (y, inlay) in inlay - .into_iter() - .flatten() - .chunk_by(|x| x.position.line) - .into_iter() - .filter(|&(y, _)| { - (self.vo..self.vo + r).contains(&(y as usize)) - }) - { - // self.l_position(inlay.position) {} - let mut off = self.rope.line(y as _).len_chars(); - for inlay in inlay { - let label = match &inlay.label { - InlayHintLabel::String(x) => x.clone(), - InlayHintLabel::LabelParts(v) => - v.iter().map(_.value.clone()).collect::<String>(), - }; - cells - .get_range((off, y as _), (!0, y as _)) - .zip(label.chars()) - .for_each(|(x, y)| { - x.letter = Some(y); - x.style.color = color_("#536172") - }); - off += label.chars().count(); - } - } + + // for (y, inlay) in inlay + // .into_iter() + // .flatten() + // .chunk_by(|x| x.position.line) + // .into_iter() + // .filter(|&(y, _)| { + // (self.vo..self.vo + r).contains(&(y as usize)) + // }) + // { + // // self.l_position(inlay.position) {} + // let mut off = self.rope.line(y as _).len_chars(); + // for inlay in inlay { + // let label = match &inlay.label { + // InlayHintLabel::String(x) => x.clone(), + // InlayHintLabel::LabelParts(v) => + // v.iter().map(_.value.clone()).collect::<String>(), + // }; + // cells + // .get_range((off, y as _), (!0, y as _)) + // .zip(label.chars()) + // .for_each(|(x, y)| { + // x.letter = Some(y); + // x.style.color = color_("#536172") + // }); + // off += label.chars().count(); + // } + // } apply((c, r), self, cells); } pub fn line_number_offset(&self) -> usize { @@ -1543,3 +1701,14 @@ impl<I: Iterator<Item = T>, T> CoerceOption<T> for Option<I> { } // #[test] pub(crate) use col; +#[derive(Debug, PartialEq)] +pub enum Mapping<'a> { + Fake(&'a Mark, usize /* label rel */, char), + Char(char, usize /* line rel */, usize /* true position */), +} +impl Mapping<'_> { + fn c(&self) -> char { + let (Mapping::Char(x, ..) | Mapping::Fake(.., x)) = self; + *x + } +} |