File tree 3 files changed +5
-6
lines changed 3 files changed +5
-6
lines changed Original file line number Diff line number Diff line change 70
70
"commandPalette" : [
71
71
{
72
72
"command" : " nipy.exportPlugin" ,
73
- "when" : " false "
73
+ "when" : " editorLangId == python "
74
74
},
75
75
{
76
76
"command" : " nipy.registerPlugin" ,
77
- "when" : " false "
77
+ "when" : " editorLangId == python "
78
78
}
79
79
],
80
80
"explorer/context" : [
Original file line number Diff line number Diff line change @@ -89,11 +89,11 @@ export async function createDataPlugin(): Promise<DataPlugin | null> {
89
89
}
90
90
91
91
export async function exportPlugin ( uri : vscode . Uri ) : Promise < void > {
92
- if ( ! uri ) {
92
+ const scriptPath = uri ?. fsPath ?? vscu . getOpenPythonScript ( ) ?. fsPath ;
93
+ if ( ! scriptPath ) {
93
94
return ;
94
95
}
95
96
96
- const scriptPath = uri . fsPath ;
97
97
const workspaceDir = path . dirname ( scriptPath ) ;
98
98
const pluginName = path . basename ( path . dirname ( scriptPath ) ) ;
99
99
const extensions = await readOrRequestFileExtensionConfig ( workspaceDir ) ;
Original file line number Diff line number Diff line change @@ -10,8 +10,7 @@ export function activate(context: vscode.ExtensionContext): void {
10
10
const createDataPluginCommand = vscode . commands . registerCommand (
11
11
'nipy.createDataPlugin' ,
12
12
async ( ) => {
13
- // eslint-disable-next-line @typescript-eslint/no-floating-promises
14
- commands . createDataPlugin ( ) ;
13
+ void commands . createDataPlugin ( ) ;
15
14
}
16
15
) ;
17
16
const exportPluginCommand = vscode . commands . registerCommand (
You can’t perform that action at this time.
0 commit comments