From 5532f11f5d31bd9b03e2256a7a8a52cc94545445 Mon Sep 17 00:00:00 2001 From: Francesco Stasi Date: Mon, 15 Mar 2021 09:23:20 +0100 Subject: [PATCH] editor.quicksSuggestions.other defaults off --- .../browser/boards/boards-service-provider.ts | 2 +- .../browser/contributions/add-zip-library.ts | 2 +- .../src/browser/output-service-impl.ts | 2 +- .../src/browser/settings.tsx | 36 +++++++++++++++++-- .../src/browser/style/settings-dialog.css | 2 +- .../toolbar/arduino-toolbar-contribution.ts | 12 +++---- .../src/electron-main/splash/splash-screen.ts | 6 ++-- .../src/node/core-client-provider.ts | 2 +- .../src/node/monitor/monitor-service-impl.ts | 4 +-- .../src/node/notification-service-server.ts | 2 +- arduino-ide-extension/tslint.json | 3 +- browser-app/package.json | 7 +++- electron-app/package.json | 7 +++- 13 files changed, 65 insertions(+), 22 deletions(-) diff --git a/arduino-ide-extension/src/browser/boards/boards-service-provider.ts b/arduino-ide-extension/src/browser/boards/boards-service-provider.ts index 0b095f544..e443b7457 100644 --- a/arduino-ide-extension/src/browser/boards/boards-service-provider.ts +++ b/arduino-ide-extension/src/browser/boards/boards-service-provider.ts @@ -93,7 +93,7 @@ export class BoardsServiceProvider implements FrontendApplicationContribution { if (!AttachedBoardsChangeEvent.isEmpty(event)) { this.logger.info('Attached boards and available ports changed:'); this.logger.info(AttachedBoardsChangeEvent.toString(event)); - this.logger.info(`------------------------------------------`); + this.logger.info('------------------------------------------'); } this._attachedBoards = event.newState.boards; this._availablePorts = event.newState.ports; diff --git a/arduino-ide-extension/src/browser/contributions/add-zip-library.ts b/arduino-ide-extension/src/browser/contributions/add-zip-library.ts index ba32c813a..0a12e979d 100644 --- a/arduino-ide-extension/src/browser/contributions/add-zip-library.ts +++ b/arduino-ide-extension/src/browser/contributions/add-zip-library.ts @@ -82,7 +82,7 @@ export class AddZipLibrary extends SketchContribution { if (name) { throw new AlreadyInstalledError(`A library folder named ${name} already exists. Do you want to overwrite it?`, name); } else { - throw new AlreadyInstalledError(`A library already exists. Do you want to overwrite it?`); + throw new AlreadyInstalledError('A library already exists. Do you want to overwrite it?'); } } } diff --git a/arduino-ide-extension/src/browser/output-service-impl.ts b/arduino-ide-extension/src/browser/output-service-impl.ts index 098db8b42..60c5a94bd 100644 --- a/arduino-ide-extension/src/browser/output-service-impl.ts +++ b/arduino-ide-extension/src/browser/output-service-impl.ts @@ -14,7 +14,7 @@ export class OutputServiceImpl implements OutputService { append(message: OutputMessage): void { const { chunk } = message; - const channel = this.outputChannelManager.getChannel(`Arduino`); + const channel = this.outputChannelManager.getChannel('Arduino'); channel.show({ preserveFocus: true }); channel.append(chunk); } diff --git a/arduino-ide-extension/src/browser/settings.tsx b/arduino-ide-extension/src/browser/settings.tsx index 650868406..6db428ddb 100644 --- a/arduino-ide-extension/src/browser/settings.tsx +++ b/arduino-ide-extension/src/browser/settings.tsx @@ -24,6 +24,7 @@ export interface Settings extends Index { editorFontSize: number; // `editor.fontSize` themeId: string; // `workbench.colorTheme` autoSave: 'on' | 'off'; // `editor.autoSave` + quickSuggestions: Record<'other'|'comments'|'strings', boolean>; // `editor.quickSuggestions` autoScaleInterface: boolean; // `arduino.window.autoScale` interfaceScale: number; // `arduino.window.zoomLevel` https://github.com/eclipse-theia/theia/issues/8751 @@ -84,6 +85,7 @@ export class SettingsService { editorFontSize, themeId, autoSave, + quickSuggestions, autoScaleInterface, interfaceScale, // checkForUpdates, @@ -97,6 +99,11 @@ export class SettingsService { this.preferenceService.get('editor.fontSize', 12), this.preferenceService.get('workbench.colorTheme', 'arduino-theme'), this.preferenceService.get<'on' | 'off'>('editor.autoSave', 'on'), + this.preferenceService.get('editor.quickSuggestion', { + 'other': false, + 'comments': false, + 'strings': false + }), this.preferenceService.get('arduino.window.autoScale', true), this.preferenceService.get('arduino.window.zoomLevel', 0), // this.preferenceService.get('arduino.ide.autoUpdate', true), @@ -113,6 +120,7 @@ export class SettingsService { editorFontSize, themeId, autoSave, + quickSuggestions, autoScaleInterface, interfaceScale, // checkForUpdates, @@ -155,10 +163,10 @@ export class SettingsService { return `Invalid sketchbook location: ${sketchbookPath}`; } if (editorFontSize <= 0) { - return `Invalid editor font size. It must be a positive integer.`; + return 'Invalid editor font size. It must be a positive integer.'; } if (!ThemeService.get().getThemes().find(({ id }) => id === themeId)) { - return `Invalid theme.`; + return 'Invalid theme.'; } return true; } catch (err) { @@ -175,6 +183,7 @@ export class SettingsService { editorFontSize, themeId, autoSave, + quickSuggestions, autoScaleInterface, interfaceScale, // checkForUpdates, @@ -199,6 +208,7 @@ export class SettingsService { this.preferenceService.set('editor.fontSize', editorFontSize, PreferenceScope.User), this.preferenceService.set('workbench.colorTheme', themeId, PreferenceScope.User), this.preferenceService.set('editor.autoSave', autoSave, PreferenceScope.User), + this.preferenceService.set('editor.quickSuggestions', quickSuggestions, PreferenceScope.User), this.preferenceService.set('arduino.window.autoScale', autoScaleInterface, PreferenceScope.User), this.preferenceService.set('arduino.window.zoomLevel', interfaceScale, PreferenceScope.User), // this.preferenceService.set('arduino.ide.autoUpdate', checkForUpdates, PreferenceScope.User), @@ -360,6 +370,13 @@ export class SettingsComponent extends React.Component Auto save +