1- // The module 'vscode' contains the VS Code extensibility API
2- // Import the module and reference it with the alias vscode in your code below
31import * as vscode from "vscode"
4- import { actual_callout } from "./commands/format"
2+ import { format } from "./commands/format"
53import {
64 createOutputChannel ,
75 onDidChangeConfiguration ,
@@ -48,23 +46,16 @@ export async function activate(context: vscode.ExtensionContext) {
4846 )
4947
5048 context . subscriptions . push (
51- vscode . commands . registerCommand ( "sqlmesh.signinSpecifyFlow" , signInSpecifyFlow ( authProvider )
49+ vscode . commands . registerCommand (
50+ "sqlmesh.signinSpecifyFlow" ,
51+ signInSpecifyFlow ( authProvider )
5252 )
5353 )
54-
5554 context . subscriptions . push (
5655 vscode . commands . registerCommand ( "sqlmesh.signout" , signOut ( authProvider ) )
5756 )
58-
5957 context . subscriptions . push (
60- vscode . commands . registerCommand ( "sqlmesh.format" , async ( ) => {
61- const out = await actual_callout . format ( )
62- if ( out === 0 ) {
63- vscode . window . showInformationMessage ( "Project formatted successfully" )
64- } else {
65- vscode . window . showErrorMessage ( "Project format failed" )
66- }
67- } )
58+ vscode . commands . registerCommand ( "sqlmesh.format" , format )
6859 )
6960
7061 lspClient = new LSPClient ( )
@@ -77,12 +68,11 @@ export async function activate(context: vscode.ExtensionContext) {
7768 await lspClient . restart ( )
7869 }
7970 }
80-
8171 context . subscriptions . push (
8272 onDidChangePythonInterpreter ( async ( ) => {
8373 await restart ( )
8474 } ) ,
85- onDidChangeConfiguration ( async ( _ : vscode . ConfigurationChangeEvent ) => {
75+ onDidChangeConfiguration ( async ( ) => {
8676 await restart ( )
8777 } ) ,
8878 registerCommand ( `sqlmesh.restart` , async ( ) => {
0 commit comments