mirror of
https://github.com/Microsoft/vscode
synced 2024-10-05 19:02:54 +00:00
parent
b0c91dda31
commit
bedcbff1cb
|
@ -210,7 +210,7 @@ registerSendSequenceKeybinding('\x1b[24~d', { // F12,d -> shift+end (SelectLine)
|
|||
mac: { primary: KeyMod.Shift | KeyMod.CtrlCmd | KeyCode.RightArrow }
|
||||
});
|
||||
registerSendSequenceKeybinding('\x1b[24~e', { // F12,e -> ctrl+space (Native suggest)
|
||||
when: ContextKeyExpr.and(TerminalContextKeys.focus, ContextKeyExpr.equals(TerminalContextKeyStrings.ShellType, WindowsShellType.PowerShell), TerminalContextKeys.terminalShellIntegrationEnabled, CONTEXT_ACCESSIBILITY_MODE_ENABLED.negate(), ContextKeyExpr.or(ContextKeyExpr.equals(`config.${TerminalSuggestSettingId.Enabled}`, true), ContextKeyExpr.equals(`config.${TerminalSuggestSettingId.EnabledLegacy}`, true))),
|
||||
when: ContextKeyExpr.and(TerminalContextKeys.focus, ContextKeyExpr.equals(TerminalContextKeyStrings.ShellType, WindowsShellType.PowerShell), TerminalContextKeys.terminalShellIntegrationEnabled, CONTEXT_ACCESSIBILITY_MODE_ENABLED.negate(), ContextKeyExpr.equals(`config.${TerminalSuggestSettingId.Enabled}`, true)),
|
||||
primary: KeyMod.CtrlCmd | KeyCode.Space,
|
||||
mac: { primary: KeyMod.WinCtrl | KeyCode.Space }
|
||||
});
|
||||
|
|
|
@ -289,7 +289,7 @@ export class TerminalProcessManager extends Disposable implements ITerminalProce
|
|||
const options: ITerminalProcessOptions = {
|
||||
shellIntegration: {
|
||||
enabled: this._configurationService.getValue(TerminalSettingId.ShellIntegrationEnabled),
|
||||
suggestEnabled: this._configurationService.getValue(TerminalSuggestSettingId.Enabled) || this._configurationService.getValue(TerminalSuggestSettingId.EnabledLegacy),
|
||||
suggestEnabled: this._configurationService.getValue(TerminalSuggestSettingId.Enabled),
|
||||
nonce: this.shellIntegrationNonce
|
||||
},
|
||||
windowsEnableConpty: this._terminalConfigurationService.config.windowsEnableConpty,
|
||||
|
@ -489,7 +489,7 @@ export class TerminalProcessManager extends Disposable implements ITerminalProce
|
|||
const options: ITerminalProcessOptions = {
|
||||
shellIntegration: {
|
||||
enabled: this._configurationService.getValue(TerminalSettingId.ShellIntegrationEnabled),
|
||||
suggestEnabled: this._configurationService.getValue(TerminalSuggestSettingId.Enabled) || this._configurationService.getValue(TerminalSuggestSettingId.EnabledLegacy),
|
||||
suggestEnabled: this._configurationService.getValue(TerminalSuggestSettingId.Enabled),
|
||||
nonce: this.shellIntegrationNonce
|
||||
},
|
||||
windowsEnableConpty: this._terminalConfigurationService.config.windowsEnableConpty,
|
||||
|
|
|
@ -209,8 +209,6 @@ export interface ITerminalConfiguration {
|
|||
shellIntegration?: {
|
||||
enabled: boolean;
|
||||
decorationsEnabled: boolean;
|
||||
// TODO: Legacy - remove soon
|
||||
suggestEnabled: boolean;
|
||||
};
|
||||
enableImages: boolean;
|
||||
smoothScrolling: boolean;
|
||||
|
|
|
@ -16,7 +16,6 @@ import { IContextKey } from 'vs/platform/contextkey/common/contextkey';
|
|||
import { IInstantiationService } from 'vs/platform/instantiation/common/instantiation';
|
||||
import { IStorageService, StorageScope, StorageTarget } from 'vs/platform/storage/common/storage';
|
||||
import { activeContrastBorder } from 'vs/platform/theme/common/colorRegistry';
|
||||
import { ITerminalConfigurationService } from 'vs/workbench/contrib/terminal/browser/terminal';
|
||||
import { TerminalStorageKeys } from 'vs/workbench/contrib/terminal/common/terminalStorageKeys';
|
||||
import type { ITerminalAddon, Terminal } from '@xterm/xterm';
|
||||
|
||||
|
@ -114,7 +113,6 @@ export class SuggestAddon extends Disposable implements ITerminalAddon, ISuggest
|
|||
private readonly _terminalSuggestWidgetVisibleContextKey: IContextKey<boolean>,
|
||||
@IConfigurationService private readonly _configurationService: IConfigurationService,
|
||||
@IInstantiationService private readonly _instantiationService: IInstantiationService,
|
||||
@ITerminalConfigurationService private readonly _terminalConfigurationService: ITerminalConfigurationService
|
||||
) {
|
||||
super();
|
||||
|
||||
|
@ -159,7 +157,7 @@ export class SuggestAddon extends Disposable implements ITerminalAddon, ISuggest
|
|||
|
||||
private _sync(promptInputState: IPromptInputModelState): void {
|
||||
const config = this._configurationService.getValue<ITerminalSuggestConfiguration>(terminalSuggestConfigSection);
|
||||
const enabled = config.enabled || this._terminalConfigurationService.config.shellIntegration?.suggestEnabled;
|
||||
const enabled = config.enabled;
|
||||
if (!enabled) {
|
||||
return;
|
||||
}
|
||||
|
|
|
@ -10,7 +10,6 @@ import { TerminalSettingId } from 'vs/platform/terminal/common/terminal';
|
|||
|
||||
export const enum TerminalSuggestSettingId {
|
||||
Enabled = 'terminal.integrated.suggest.enabled',
|
||||
EnabledLegacy = 'terminal.integrated.shellIntegration.suggestEnabled',
|
||||
QuickSuggestions = 'terminal.integrated.suggest.quickSuggestions',
|
||||
SuggestOnTriggerCharacters = 'terminal.integrated.suggest.suggestOnTriggerCharacters',
|
||||
}
|
||||
|
@ -30,13 +29,6 @@ export const terminalSuggestConfiguration: IStringDictionary<IConfigurationPrope
|
|||
type: 'boolean',
|
||||
default: false,
|
||||
},
|
||||
[TerminalSuggestSettingId.EnabledLegacy]: {
|
||||
restricted: true,
|
||||
markdownDescription: localize('suggest.enabled', "Enables experimental terminal Intellisense suggestions for supported shells ({0}) when {1} is set to {2}.\n\nIf shell integration is installed manually, {3} needs to be set to {4} before calling the shell integration script.", 'PowerShell', `\`#${TerminalSettingId.ShellIntegrationEnabled}#\``, '`true`', '`VSCODE_SUGGEST`', '`1`'),
|
||||
type: 'boolean',
|
||||
default: false,
|
||||
markdownDeprecationMessage: localize('suggest.enabled.deprecated', 'This setting is deprecated, please use `{0}` instead.', `\`#${TerminalSuggestSettingId.Enabled}#\``)
|
||||
},
|
||||
[TerminalSuggestSettingId.QuickSuggestions]: {
|
||||
restricted: true,
|
||||
markdownDescription: localize('suggest.quickSuggestions', "Controls whether suggestions should automatically show up while typing. Also be aware of the {0}-setting which controls if suggestions are triggered by special characters.", `\`#${TerminalSuggestSettingId.SuggestOnTriggerCharacters}#\``),
|
||||
|
|
Loading…
Reference in a new issue