feat: make hover_time configurable
This commit is contained in:
parent
032eb30c45
commit
dc69e8a456
2 changed files with 2 additions and 1 deletions
|
@ -17,6 +17,7 @@ whitespace_mode: []const u8 = "none",
|
|||
inline_diagnostics: bool = true,
|
||||
animation_min_lag: usize = 0, //milliseconds
|
||||
animation_max_lag: usize = 50, //milliseconds
|
||||
hover_time_ms: usize = 500, //milliseconds
|
||||
enable_format_on_save: bool = false,
|
||||
restore_last_cursor_position: bool = true,
|
||||
follow_cursor_on_buffer_switch: bool = false, //scroll cursor into view on buffer switch
|
||||
|
|
|
@ -6159,7 +6159,7 @@ pub const EditorWidget = struct {
|
|||
}
|
||||
if (event == .init) {
|
||||
self.hover_mouse_event = false;
|
||||
const delay_us: u64 = std.time.us_per_ms * 500;
|
||||
const delay_us: u64 = std.time.us_per_ms * tui.config().hover_time_ms;
|
||||
self.hover_timer = tp.self_pid().delay_send_cancellable(self.editor.allocator, "editor.hover_timer", delay_us, .{"HOVER"}) catch null;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue