File tree Expand file tree Collapse file tree 1 file changed +13
-12
lines changed
Expand file tree Collapse file tree 1 file changed +13
-12
lines changed Original file line number Diff line number Diff line change @@ -16,18 +16,19 @@ const { activate, deactivate } = defineExtension(async () => {
1616 return
1717 }
1818
19- // Try to activate the vscode-neovim extension if it's not already active
20- if ( ! vscode_nvim_ext . isActive ) {
21- logger . info ( 'Activating vscode-neovim extension...' )
22- try {
23- await vscode_nvim_ext . activate ( )
24- logger . info ( 'vscode-neovim extension activated successfully' )
25- }
26- catch ( err ) {
27- logger . error ( 'Failed to activate vscode-neovim extension:' , err )
28- window . showErrorMessage ( 'Failed to activate vscode-neovim extension' )
29- return
30- }
19+ // Use the whenReady method which returns a promise that resolves when the extension is activated
20+ try {
21+ // Wait for the extension to be activated by VSCode
22+ await vscode_nvim_ext . activate ( )
23+ logger . info ( 'vscode-neovim extension is active' )
24+
25+ // Continue with the rest of your extension initialization
26+ // ...
27+ }
28+ catch ( err ) {
29+ logger . error ( 'Failed to wait for vscode-neovim extension:' , err )
30+ window . showErrorMessage ( 'Failed to connect to vscode-neovim extension' )
31+ return
3132 }
3233
3334 // Set up the mode manager
You can’t perform that action at this time.
0 commit comments