Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
protected setConfigTabSizeWidget(): void {
const editor = this.editorManager.currentEditor;
const editorModel = this.getModel(editor);
if (editor && editorModel) {
const modelOptions = editorModel.getOptions();
const tabSize = modelOptions.tabSize;
const useSpaceOrTab = modelOptions.insertSpaces ? 'Spaces' : 'Tab Size';
this.statusBar.setElement('editor-status-tabbing-config', {
text: `${useSpaceOrTab}: ${tabSize}`,
alignment: StatusBarAlignment.RIGHT,
priority: 10,
command: EditorCommands.CONFIG_INDENTATION.id,
tooltip: 'Select Indentation'
});
}
}
protected removeConfigTabSizeWidget(): void {
protected registerEditorCommandHandlers(): void {
this.registry.registerHandler(EditorCommands.SHOW_REFERENCES.id, this.newShowReferenceHandler());
this.registry.registerHandler(EditorCommands.CONFIG_INDENTATION.id, this.newConfigIndentationHandler());
this.registry.registerHandler(EditorCommands.CONFIG_EOL.id, this.newConfigEolHandler());
this.registry.registerHandler(EditorCommands.INDENT_USING_SPACES.id, this.newConfigTabSizeHandler(true));
this.registry.registerHandler(EditorCommands.INDENT_USING_TABS.id, this.newConfigTabSizeHandler(false));
}