feat: add show_diagnostics command and bind it to C-S-m and diagstate.on_click

This commit is contained in:
CJ van den Berg 2024-08-18 17:29:59 +02:00
parent a71a8cfc6e
commit f9c029f617
3 changed files with 19 additions and 1 deletions

View file

@ -129,6 +129,7 @@ fn mapPress(self: *Self, keypress: u32, egc: u32, modifiers: u32) !void {
'F' => self.cmd("enter_find_in_files_mode", .{}),
'L' => self.cmd_async("add_cursor_all_matches"),
'I' => self.cmd_async("toggle_inspector_view"),
'M' => self.cmd("show_diagnostics", .{}),
key.ENTER => self.cmd("smart_insert_line_before", .{}),
key.END => self.cmd("select_buffer_end", .{}),
key.HOME => self.cmd("select_buffer_begin", .{}),
@ -396,6 +397,7 @@ const hints = tui.KeybindHints.initComptime(.{
.{ "select_up", "S-up" },
.{ "select_word_left", "C-S-left" },
.{ "select_word_right", "C-S-right" },
.{ "show_diagnostics", "C-S-m" },
.{ "smart_insert_line_after", "C-enter" },
.{ "smart_insert_line_before", "S-enter, C-S-enter" },
.{ "smart_insert_line", "enter" },