add show_completions_on_input setting to disable popping the completions menu automatically

This commit is contained in:
Keith Simmons 2022-07-12 13:09:01 -07:00 committed by K Simmons
parent 958fd9ad55
commit 7f3018c3f6
6 changed files with 278 additions and 236 deletions

View file

@ -25,6 +25,7 @@ pub struct Settings {
pub buffer_font_size: f32,
pub default_buffer_font_size: f32,
pub hover_popover_enabled: bool,
pub show_completions_on_input: bool,
pub vim_mode: bool,
pub autosave: Autosave,
pub editor_defaults: EditorSettings,
@ -83,6 +84,8 @@ pub struct SettingsFileContent {
#[serde(default)]
pub hover_popover_enabled: Option<bool>,
#[serde(default)]
pub show_completions_on_input: Option<bool>,
#[serde(default)]
pub vim_mode: Option<bool>,
#[serde(default)]
pub autosave: Option<Autosave>,
@ -118,6 +121,7 @@ impl Settings {
buffer_font_size: defaults.buffer_font_size.unwrap(),
default_buffer_font_size: defaults.buffer_font_size.unwrap(),
hover_popover_enabled: defaults.hover_popover_enabled.unwrap(),
show_completions_on_input: defaults.show_completions_on_input.unwrap(),
projects_online_by_default: defaults.projects_online_by_default.unwrap(),
vim_mode: defaults.vim_mode.unwrap(),
autosave: defaults.autosave.unwrap(),
@ -219,6 +223,7 @@ impl Settings {
buffer_font_size: 14.,
default_buffer_font_size: 14.,
hover_popover_enabled: true,
show_completions_on_input: true,
vim_mode: false,
autosave: Autosave::Off,
editor_defaults: EditorSettings {