File tree Expand file tree Collapse file tree 4 files changed +18
-29
lines changed
Expand file tree Collapse file tree 4 files changed +18
-29
lines changed Original file line number Diff line number Diff line change 5151 },
5252 "Hackmd.enterprise" : {
5353 "type" : " boolean" ,
54+ "default" : false ,
5455 "description" : " Check this if you are connecting to HackMD Enterprise server which contains more features."
5556 }
5657 }
Original file line number Diff line number Diff line change 11import APIClient from '@hackmd/api' ;
22import { ExportType } from '@hackmd/api' ;
3- const API = new APIClient ( ) ;
4-
3+ import * as vscode from 'vscode' ;
4+ const config = {
5+ serverUrl : vscode . workspace . getConfiguration ( 'Hackmd' ) . get ( 'serverURL' ) as string ,
6+ enterprise : vscode . workspace . getConfiguration ( 'Hackmd' ) . get ( 'enterprise' ) as boolean
7+ } ;
8+ const API = new APIClient ( config ) ;
9+ vscode . workspace . onDidChangeConfiguration ( async e => {
10+ if ( e . affectsConfiguration ( 'Hackmd' ) ) {
11+ const clicked = await vscode . window . showInformationMessage ( 'Setting updated. Restart to apply this change.' , ...[ 'Restart' ] ) ;
12+ if ( clicked === 'Restart' ) {
13+ vscode . commands . executeCommand ( "workbench.action.reloadWindow" ) ;
14+ }
15+ }
16+ } ) ;
517export { API , ExportType } ;
618
719
Load Diff This file was deleted.
Original file line number Diff line number Diff line change @@ -4,10 +4,10 @@ import axios from 'axios';
44import * as vscode from 'vscode' ;
55import * as markdownitContainer from 'markdown-it-container' ;
66import * as S from 'string' ;
7- import { store } from './store'
8- import { initializeStorage } from './store/storage'
7+ import { store } from './store' ;
8+ import { initializeStorage } from './store/storage' ;
99import * as Prism from 'prismjs' ;
10- import { registerCommand } from './commands'
10+ import { registerCommand } from './commands' ;
1111
1212require ( 'prismjs/components/prism-wiki' ) ;
1313require ( 'prismjs/components/prism-haskell' ) ;
You can’t perform that action at this time.
0 commit comments