MCPcopy Create free account
hub / github.com/cmoog/vscode-sql-notebook / activate

Function activate

src/main.ts:19–48  ·  view source on GitHub ↗
(context: vscode.ExtensionContext)

Source from the content-addressed store, hash-verified

17export const globalLspClient = new SqlLspClient();
18
19export function activate(context: vscode.ExtensionContext) {
20 context.subscriptions.push(
21 vscode.workspace.registerNotebookSerializer(
22 notebookType,
23 new SQLSerializer()
24 )
25 );
26 const connectionsSidepanel = new SQLNotebookConnections(context);
27 vscode.window.registerTreeDataProvider(
28 'sqlnotebook-connections',
29 connectionsSidepanel
30 );
31
32 activateFormProvider(context);
33
34 context.subscriptions.push(new SQLNotebookController());
35
36 vscode.commands.registerCommand(
37 'sqlnotebook.deleteConnectionConfiguration',
38 deleteConnectionConfiguration(context, connectionsSidepanel)
39 );
40
41 vscode.commands.registerCommand('sqlnotebook.refreshConnectionPanel', () => {
42 connectionsSidepanel.refresh();
43 });
44 vscode.commands.registerCommand(
45 'sqlnotebook.connect',
46 connectToDatabase(context, connectionsSidepanel)
47 );
48}
49
50export function deactivate() {}

Callers

nothing calls this directly

Calls 4

refreshMethod · 0.95
activateFormProviderFunction · 0.90
connectToDatabaseFunction · 0.90

Tested by

no test coverage detected