Skip to content

Commit 8abb919

Browse files
authored
Enable font ligatures in result editors (microsoft#178096)
* Use arrow cursor for interactive session list * Enable font ligatures in result editors
1 parent 18606bc commit 8abb919

File tree

3 files changed

+9
-4
lines changed

3 files changed

+9
-4
lines changed

src/vs/workbench/contrib/interactiveSession/browser/interactiveSessionListRenderer.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -577,6 +577,7 @@ class CodeBlockPart extends Disposable implements IInteractiveResultCodeBlockPar
577577
private getEditorOptionsFromConfig(): IEditorOptions {
578578
return {
579579
wordWrap: this.options.configuration.resultEditor.wordWrap,
580+
fontLigatures: this.options.configuration.resultEditor.fontLigatures,
580581
bracketPairColorization: this.options.configuration.resultEditor.bracketPairColorization,
581582
fontFamily: this.options.configuration.resultEditor.fontFamily === 'default' ?
582583
EDITOR_FONT_DEFAULTS.fontFamily :

src/vs/workbench/contrib/interactiveSession/browser/interactiveSessionOptions.ts

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
import { Color } from 'vs/base/common/color';
77
import { Emitter } from 'vs/base/common/event';
88
import { Disposable } from 'vs/base/common/lifecycle';
9-
import { IBracketPairColorizationOptions } from 'vs/editor/common/config/editorOptions';
9+
import { IBracketPairColorizationOptions, IEditorOptions } from 'vs/editor/common/config/editorOptions';
1010
import { IConfigurationService } from 'vs/platform/configuration/common/configuration';
1111
import { IThemeService } from 'vs/platform/theme/common/themeService';
1212
import { IViewDescriptorService } from 'vs/workbench/common/views';
@@ -33,11 +33,12 @@ export interface IInteractiveSessionInputEditorOptions {
3333

3434
export interface IInteractiveSessionResultEditorOptions {
3535
readonly fontSize: number;
36-
readonly fontFamily: string;
36+
readonly fontFamily: string | undefined;
3737
readonly lineHeight: number;
3838
readonly fontWeight: string;
3939
readonly backgroundColor: Color | undefined;
4040
readonly bracketPairColorization: IBracketPairColorizationOptions;
41+
readonly fontLigatures: boolean | string | undefined;
4142
readonly wordWrap: 'off' | 'on';
4243

4344
// Bring these back if we make the editors editable
@@ -64,6 +65,7 @@ export class InteractiveSessionEditorOptions extends Disposable {
6465
'interactiveSession.editor.fontWeight',
6566
'interactiveSession.editor.wordWrap',
6667
'editor.cursorBlinking',
68+
'editor.fontLigatures',
6769
'editor.accessibilitySupport',
6870
'editor.bracketPairColorization.enabled',
6971
'editor.bracketPairColorization.independentColorPoolPerBracketType',
@@ -94,7 +96,7 @@ export class InteractiveSessionEditorOptions extends Disposable {
9496
}
9597

9698
private update() {
97-
const editorConfig = this.configurationService.getValue<any>('editor');
99+
const editorConfig = this.configurationService.getValue<IEditorOptions>('editor');
98100

99101
// TODO shouldn't the setting keys be more specific?
100102
const interactiveSessionEditorConfig = this.configurationService.getValue<IInteractiveSessionConfiguration>('interactiveSession').editor;
@@ -114,7 +116,8 @@ export class InteractiveSessionEditorOptions extends Disposable {
114116
enabled: this.configurationService.getValue<boolean>('editor.bracketPairColorization.enabled'),
115117
independentColorPoolPerBracketType: this.configurationService.getValue<boolean>('editor.bracketPairColorization.independentColorPoolPerBracketType'),
116118
},
117-
wordWrap: interactiveSessionEditorConfig.wordWrap
119+
wordWrap: interactiveSessionEditorConfig.wordWrap,
120+
fontLigatures: editorConfig.fontLigatures,
118121
}
119122

120123
};

src/vs/workbench/contrib/interactiveSession/browser/media/interactiveSession.css

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818
flex-direction: column;
1919
gap: 6px;
2020

21+
cursor: default;
2122
user-select: text;
2223
-webkit-user-select: text;
2324
}

0 commit comments

Comments
 (0)