src/Tools/VSCode/extension/src/extension.ts
changeset 65984 8e6a833da7db
parent 65983 d8c5603c1732
child 65985 1be7135917a6
equal deleted inserted replaced
65983:d8c5603c1732 65984:8e6a833da7db
     1 'use strict';
     1 'use strict';
     2 
     2 
     3 import { ExtensionContext, workspace, window } from 'vscode';
       
     4 import * as path from 'path';
     3 import * as path from 'path';
     5 import * as fs from 'fs';
     4 import * as fs from 'fs';
     6 import * as library from './library'
     5 import * as library from './library'
     7 import * as decorations from './decorations';
     6 import * as decorations from './decorations';
     8 import * as preview from './preview';
     7 import * as preview from './preview';
     9 import * as protocol from './protocol';
     8 import * as protocol from './protocol';
       
     9 import { ExtensionContext, workspace, window, commands } from 'vscode';
    10 import { LanguageClient, LanguageClientOptions, SettingMonitor, ServerOptions, TransportKind, NotificationType }
    10 import { LanguageClient, LanguageClientOptions, SettingMonitor, ServerOptions, TransportKind, NotificationType }
    11   from 'vscode-languageclient';
    11   from 'vscode-languageclient';
    12 
    12 
    13 
    13 
    14 let last_caret_update: protocol.Caret_Update = {}
    14 let last_caret_update: protocol.Caret_Update = {}
    99     })
    99     })
   100 
   100 
   101 
   101 
   102     /* preview */
   102     /* preview */
   103 
   103 
       
   104     context.subscriptions.push(
       
   105       commands.registerCommand("isabelle.preview", uri => preview.request_preview(uri, false)),
       
   106       commands.registerCommand("isabelle.preview-side", uri => preview.request_preview(uri, true)),
       
   107       commands.registerCommand("isabelle.preview-source", preview.show_source))
       
   108 
   104     language_client.onReady().then(() => preview.init(context, language_client))
   109     language_client.onReady().then(() => preview.init(context, language_client))
   105 
   110 
   106 
   111 
   107     /* start server */
   112     /* start server */
   108 
   113