@@ -17,13 +17,11 @@ import { StringBuilder } from 'vs/editor/common/core/stringBuilder';
1717import { IModelDeltaDecoration , InjectedTextCursorStops , PositionAffinity } from 'vs/editor/common/model' ;
1818import { ILanguageIdCodec } from 'vs/editor/common/languages' ;
1919import { ILanguageService } from 'vs/editor/common/languages/language' ;
20- import { ghostTextBackground , ghostTextBorder , ghostTextForeground } from 'vs/editor/common/core/editorColorRegistry' ;
2120import { LineDecoration } from 'vs/editor/common/viewLayout/lineDecorations' ;
2221import { RenderLineInput , renderViewLine } from 'vs/editor/common/viewLayout/viewLineRenderer' ;
2322import { InlineDecorationType } from 'vs/editor/common/viewModel' ;
2423import { GhostTextReplacement , GhostTextWidgetModel } from 'vs/editor/contrib/inlineCompletions/browser/ghostText' ;
2524import { IInstantiationService } from 'vs/platform/instantiation/common/instantiation' ;
26- import { registerThemingParticipant } from 'vs/platform/theme/common/themeService' ;
2725
2826const ttPolicy = window . trustedTypes ?. createPolicy ( 'editorGhostText' , { createHTML : value => value } ) ;
2927
@@ -437,26 +435,3 @@ class ViewMoreLinesContentWidget extends Disposable implements IContentWidget {
437435 }
438436}
439437
440- registerThemingParticipant ( ( theme , collector ) => {
441- const foreground = theme . getColor ( ghostTextForeground ) ;
442- if ( foreground ) {
443- // `!important` ensures that other decorations don't cause a style conflict (#132017).
444- collector . addRule ( `.monaco-editor .ghost-text-decoration { color: ${ foreground . toString ( ) } !important; }` ) ;
445- collector . addRule ( `.monaco-editor .ghost-text-decoration-preview { color: ${ foreground . toString ( ) } !important; }` ) ;
446- collector . addRule ( `.monaco-editor .suggest-preview-text .ghost-text { color: ${ foreground . toString ( ) } !important; }` ) ;
447- }
448-
449- const background = theme . getColor ( ghostTextBackground ) ;
450- if ( background ) {
451- collector . addRule ( `.monaco-editor .ghost-text-decoration { background-color: ${ background . toString ( ) } ; }` ) ;
452- collector . addRule ( `.monaco-editor .ghost-text-decoration-preview { background-color: ${ background . toString ( ) } ; }` ) ;
453- collector . addRule ( `.monaco-editor .suggest-preview-text .ghost-text { background-color: ${ background . toString ( ) } ; }` ) ;
454- }
455-
456- const border = theme . getColor ( ghostTextBorder ) ;
457- if ( border ) {
458- collector . addRule ( `.monaco-editor .suggest-preview-text .ghost-text { border: 1px solid ${ border } ; }` ) ;
459- collector . addRule ( `.monaco-editor .ghost-text-decoration { border: 1px solid ${ border } ; }` ) ;
460- collector . addRule ( `.monaco-editor .ghost-text-decoration-preview { border: 1px solid ${ border } ; }` ) ;
461- }
462- } ) ;
0 commit comments