From dedc3e05aed6023bc87571b14fe6c20fd3b073b8 Mon Sep 17 00:00:00 2001 From: Rob Tsuk Date: Sat, 30 Jul 2022 08:20:00 -0700 Subject: [PATCH 1/2] Add command to toggle inline hints --- lapce-data/src/command.rs | 4 ++++ lapce-data/src/data.rs | 9 +++++++++ 2 files changed, 13 insertions(+) diff --git a/lapce-data/src/command.rs b/lapce-data/src/command.rs index be2cc061..51bc60ad 100644 --- a/lapce-data/src/command.rs +++ b/lapce-data/src/command.rs @@ -396,6 +396,10 @@ pub enum LapceWorkbenchCommand { #[strum(serialize = "previous_editor_tab")] #[strum(message = "Previous editor tab")] PreviousEditorTab, + + #[strum(serialize = "toggle_inline_hints")] + #[strum(message = "Toggle Inline Hints")] + ToggleInlineHints, } #[derive(Debug, Clone)] diff --git a/lapce-data/src/data.rs b/lapce-data/src/data.rs index 53bbbdd8..eba2c107 100644 --- a/lapce-data/src/data.rs +++ b/lapce-data/src/data.rs @@ -1449,6 +1449,15 @@ pub fn run_workbench_command( )); } } + LapceWorkbenchCommand::ToggleInlineHints => { + let config = Arc::make_mut(&mut self.config); + config.editor.enable_inlay_hints = !config.editor.enable_inlay_hints; + Config::update_file( + "editor", + "enable-inlay-hints", + toml::Value::Boolean(config.editor.enable_inlay_hints), + ); + } } } From 15cda86ce0d88ed403fe060a141dc01ab5d8a36e Mon Sep 17 00:00:00 2001 From: Rob Tsuk Date: Sat, 30 Jul 2022 08:37:15 -0700 Subject: [PATCH 2/2] Inlay, not inline --- lapce-data/src/command.rs | 6 +++--- lapce-data/src/data.rs | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/lapce-data/src/command.rs b/lapce-data/src/command.rs index 51bc60ad..b8d9a5a9 100644 --- a/lapce-data/src/command.rs +++ b/lapce-data/src/command.rs @@ -397,9 +397,9 @@ pub enum LapceWorkbenchCommand { #[strum(message = "Previous editor tab")] PreviousEditorTab, - #[strum(serialize = "toggle_inline_hints")] - #[strum(message = "Toggle Inline Hints")] - ToggleInlineHints, + #[strum(serialize = "toggle_inlay_hints")] + #[strum(message = "Toggle Inlay Hints")] + ToggleInlayHints, } #[derive(Debug, Clone)] diff --git a/lapce-data/src/data.rs b/lapce-data/src/data.rs index eba2c107..a1849c5e 100644 --- a/lapce-data/src/data.rs +++ b/lapce-data/src/data.rs @@ -1449,7 +1449,7 @@ pub fn run_workbench_command( )); } } - LapceWorkbenchCommand::ToggleInlineHints => { + LapceWorkbenchCommand::ToggleInlayHints => { let config = Arc::make_mut(&mut self.config); config.editor.enable_inlay_hints = !config.editor.enable_inlay_hints; Config::update_file(