File tree Expand file tree Collapse file tree 3 files changed +16
-2
lines changed
Expand file tree Collapse file tree 3 files changed +16
-2
lines changed Original file line number Diff line number Diff line change 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" ,
7576 "mdTree" : [
7677 {
7778 "id" : " mdTreeItems" ,
78- "name" : " "
79+ "name" : " History "
7980 }
8081 ]
8182 },
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" : {
Original file line number Diff line number Diff line change @@ -2,10 +2,12 @@ import * as vscode from 'vscode';
22import { registerUserCommands } from './user'
33import { registerTreeViewCommands } from './treeView'
44import { registerNoteCommands } from './note' ;
5+ import { registerSnippetCommands } from './snippet'
56import { Store } from '../store' ;
67
78export function registerCommand ( context : vscode . ExtensionContext , store : Store ) {
89 registerUserCommands ( context , store ) ;
910 registerTreeViewCommands ( context , store ) ;
1011 registerNoteCommands ( context ) ;
12+ registerSnippetCommands ( context ) ;
1113}
Original file line number Diff line number Diff line change 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+ }
You can’t perform that action at this time.
0 commit comments