Skip to content

Commit 9fb0a3a

Browse files
committed
Fix history list refresh function
1 parent 5e70b3d commit 9fb0a3a

File tree

3 files changed

+16
-2
lines changed

3 files changed

+16
-2
lines changed

package.json

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,8 @@
1616
"onView:mdTreeItems",
1717
"onCommand:HackMD.login",
1818
"onCommand:HackMD.logout",
19-
"onCommand:HackMD.createActiveEditorContentToHackMD"
19+
"onCommand:HackMD.createActiveEditorContentToHackMD",
20+
"onCommand:HackMD.createCodeSnippet"
2021
],
2122
"license": "MIT",
2223
"homepage": "https://github.com/hackmdio/vscode-hackmd/blob/master/README.md",
@@ -75,7 +76,7 @@
7576
"mdTree": [
7677
{
7778
"id": "mdTreeItems",
78-
"name": ""
79+
"name": "History"
7980
}
8081
]
8182
},
@@ -106,6 +107,10 @@
106107
{
107108
"command": "HackMD.createActiveEditorContentToHackMD",
108109
"title": "HackMD: Create Active Editor Content To HackMD"
110+
},
111+
{
112+
"command": "HackMD.createCodeSnippet",
113+
"title": "HackMD: Create a code snippet"
109114
}
110115
],
111116
"menus": {

src/commands/index.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,12 @@ import * as vscode from 'vscode';
22
import { registerUserCommands } from './user'
33
import { registerTreeViewCommands } from './treeView'
44
import { registerNoteCommands } from './note';
5+
import { registerSnippetCommands } from './snippet'
56
import { Store } from '../store';
67

78
export function registerCommand(context: vscode.ExtensionContext, store: Store) {
89
registerUserCommands(context, store);
910
registerTreeViewCommands(context, store);
1011
registerNoteCommands(context);
12+
registerSnippetCommands(context);
1113
}

src/commands/snippet.ts

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
import * as vscode from 'vscode';
2+
3+
export function registerSnippetCommands(context: vscode.ExtensionContext) {
4+
context.subscriptions.push(vscode.commands.registerCommand('HackMD.createCodeSnippet', () => {
5+
console.log('test');
6+
}));
7+
}

0 commit comments

Comments
 (0)