Clean up edit predictions settings (#24692)
This PR does some clean up for the edit predictions settings: - Removed `editor.show_edit_predictions_in_menu` - Renamed `edit_predictions.inline_preview` to `edit_predictions.mode` Release Notes: - N/A --------- Co-authored-by: Agus Zubiaga <agus@zed.dev>
This commit is contained in:
parent
636253d2dc
commit
a2592a3a37
6 changed files with 36 additions and 46 deletions
|
@ -95,8 +95,8 @@ use itertools::Itertools;
|
|||
use language::{
|
||||
language_settings::{self, all_language_settings, language_settings, InlayHintSettings},
|
||||
markdown, point_from_lsp, AutoindentMode, BracketPair, Buffer, Capability, CharKind, CodeLabel,
|
||||
CompletionDocumentation, CursorShape, Diagnostic, EditPreview, HighlightedText, IndentKind,
|
||||
IndentSize, InlineCompletionPreviewMode, Language, OffsetRangeExt, Point, Selection,
|
||||
CompletionDocumentation, CursorShape, Diagnostic, EditPredictionsMode, EditPreview,
|
||||
HighlightedText, IndentKind, IndentSize, Language, OffsetRangeExt, Point, Selection,
|
||||
SelectionGoal, TextObject, TransactionId, TreeSitterOptions,
|
||||
};
|
||||
use language::{point_to_lsp, BufferRow, CharClassifier, Runnable, RunnableRange};
|
||||
|
@ -5047,7 +5047,6 @@ impl Editor {
|
|||
);
|
||||
|
||||
let show_in_menu = by_provider
|
||||
&& EditorSettings::get_global(cx).show_edit_predictions_in_menu
|
||||
&& self
|
||||
.edit_prediction_provider
|
||||
.as_ref()
|
||||
|
@ -5055,9 +5054,8 @@ impl Editor {
|
|||
provider.provider.show_completions_in_menu()
|
||||
});
|
||||
|
||||
let preview_requires_modifier = all_language_settings(file, cx)
|
||||
.inline_completions_preview_mode()
|
||||
== InlineCompletionPreviewMode::WhenHoldingModifier;
|
||||
let preview_requires_modifier =
|
||||
all_language_settings(file, cx).edit_predictions_mode() == EditPredictionsMode::Auto;
|
||||
|
||||
EditPredictionSettings::Enabled {
|
||||
show_in_menu,
|
||||
|
|
|
@ -35,7 +35,6 @@ pub struct EditorSettings {
|
|||
pub auto_signature_help: bool,
|
||||
pub show_signature_help_after_edits: bool,
|
||||
pub jupyter: Jupyter,
|
||||
pub show_edit_predictions_in_menu: bool,
|
||||
}
|
||||
|
||||
#[derive(Copy, Clone, Debug, Serialize, Deserialize, PartialEq, Eq, JsonSchema)]
|
||||
|
@ -368,12 +367,6 @@ pub struct EditorSettingsContent {
|
|||
/// Default: false
|
||||
pub show_signature_help_after_edits: Option<bool>,
|
||||
|
||||
/// Whether to show the edit predictions next to the completions provided by a language server.
|
||||
/// Only has an effect if edit prediction provider supports it.
|
||||
///
|
||||
/// Default: true
|
||||
pub show_edit_predictions_in_menu: Option<bool>,
|
||||
|
||||
/// Jupyter REPL settings.
|
||||
pub jupyter: Option<JupyterContent>,
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue