@@ -3,7 +3,7 @@ import * as monaco from 'monaco-editor'
33import { createConfiguredEditor , createModelReference } from 'vscode/monaco'
44import { registerFileSystemOverlay , HTMLFileSystemProvider } from 'vscode/service-override/files'
55import * as vscode from 'vscode'
6- import { ILogService , StandaloneServices , IPreferencesService , IEditorService , IDialogService } from 'vscode/services'
6+ import { ILogService , StandaloneServices , IPreferencesService , IEditorService , IDialogService , getService } from 'vscode/services'
77import { ConfirmResult , Parts , isPartVisibile , setPartVisibility } from 'vscode/service-override/views'
88import { clearStorage } from './setup'
99import { CustomEditorInput } from './features/customView'
@@ -114,11 +114,23 @@ const settingsModelReference = await createModelReference(monaco.Uri.from({ sche
114114 "terminal.integrated.tabs.title": "\${sequence}",
115115 "typescript.tsserver.log": "normal"
116116}` )
117- createConfiguredEditor ( document . getElementById ( 'settings-editor' ) ! , {
117+ const settingEditor = createConfiguredEditor ( document . getElementById ( 'settings-editor' ) ! , {
118118 model : settingsModelReference . object . textEditorModel ,
119119 automaticLayout : true
120120} )
121121
122+ settingEditor . addAction ( {
123+ id : 'custom-action' ,
124+ async run ( ) {
125+ void ( await getService ( IDialogService ) ) . info ( 'Custom action executed!' )
126+ } ,
127+ label : 'Custom action visible in the command palette' ,
128+ keybindings : [
129+ monaco . KeyMod . CtrlCmd | monaco . KeyCode . KeyK
130+ ] ,
131+ contextMenuGroupId : 'custom'
132+ } )
133+
122134const keybindingsModelReference = await createModelReference ( monaco . Uri . from ( { scheme : 'user' , path : '/keybindings.json' } ) , `[
123135 {
124136 "key": "ctrl+d",
0 commit comments