A simple CPU rendered GUI IDE experience.
Diffstat (limited to 'src/main.rs')
-rw-r--r--src/main.rs6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/main.rs b/src/main.rs
index 93d43f6..7b5d1d2 100644
--- a/src/main.rs
+++ b/src/main.rs
@@ -1256,6 +1256,11 @@ hovering.request = (DropH::new(handle), cursor_position).into();
_ => {}
}
match o {
+ Some(Do::MatchingBrace) => {
+ if let Some((l, f)) = lsp!() {
+ l.matching_brace(f, &mut text);
+ }
+ }
Some(Do::Symbols) => {
if let Some(lsp) = lsp {
state = State::Symbols(Rq::new(lsp.runtime.spawn(window.redraw_after(lsp.symbols("".into())))));
@@ -1739,6 +1744,7 @@ Default => {
K(Key::Character(x) if x == "c" && ctrl()) => _,
K(Key::Character(x) if x == "l" && ctrl()) => _ [Symbols],
K(Key::Character(x) if x == "." && ctrl()) => _ [CodeAction],
+ K(Key::Character(x) if x == "0" && ctrl()) => _ [MatchingBrace],
K(Key::Named(ArrowUp | ArrowLeft | ArrowDown | ArrowRight | Home | End) if shift()) => Selection(Range<usize> => 0..0) [StartSelection],
M(MouseButton::Left if shift()) => Selection(Range<usize> => 0..0) [StartSelection],
M(MouseButton::Left if ctrl()) => _ [GoToDefinition],