|
2 | 2 | // Import the module and reference it with the alias vscode in your code below |
3 | 3 | import * as vscode from 'vscode'; |
4 | 4 |
|
5 | | -import axios from 'axios'; |
6 | 5 | import * as hljs from 'highlight.js/lib/highlight'; |
7 | 6 | import * as markdownitContainer from 'markdown-it-container'; |
8 | 7 | import * as Prism from 'prismjs'; |
| 8 | +import React from 'react'; |
| 9 | +import ReactTreeView from 'react-vsc-treeview'; |
9 | 10 | import * as S from 'string'; |
10 | 11 |
|
11 | | -import { registerCommands } from './commands/index'; |
12 | | -import { initializeStorage } from './store/storage'; |
| 12 | +// import { registerCommands } from './commands/index'; |
| 13 | +// import { initializeStorage } from './store/storage'; |
| 14 | +import { initializeAPIClient } from './api'; |
| 15 | +import { TreeApp } from './tree/TreeApp'; |
13 | 16 |
|
14 | 17 | require('prismjs/components/prism-wiki'); |
15 | 18 | require('prismjs/components/prism-haskell'); |
@@ -203,13 +206,14 @@ function highlightRender(code, lang) { |
203 | 206 | } |
204 | 207 |
|
205 | 208 | let highlight; |
206 | | -// this method is called when your extension is activated |
207 | | -// your extension is activated the very first time the command is executed |
208 | | -axios.defaults.withCredentials = true; |
209 | 209 |
|
210 | 210 | export async function activate(context: vscode.ExtensionContext) { |
211 | | - initializeStorage(); |
212 | | - registerCommands(context); |
| 211 | + await initializeAPIClient(context); |
| 212 | + |
| 213 | + // initializeStorage(); |
| 214 | + // registerCommands(context); |
| 215 | + |
| 216 | + ReactTreeView.render(React.createElement(TreeApp), 'mdTreeItems'); |
213 | 217 |
|
214 | 218 | return { |
215 | 219 | extendMarkdownIt(md: any) { |
@@ -263,6 +267,7 @@ export async function activate(context: vscode.ExtensionContext) { |
263 | 267 |
|
264 | 268 | return md; |
265 | 269 | }, |
| 270 | + context, |
266 | 271 | }; |
267 | 272 | } |
268 | 273 |
|
|
0 commit comments