@@ -28,8 +28,8 @@ export async function activate(context: vscode.ExtensionContext) {
28
28
vscode . window . createTreeView (
29
29
'layouts_list' ,
30
30
{
31
- treeDataProvider : new TreeProvider ( ) ,
32
- showCollapseAll : true ,
31
+ treeDataProvider : new TreeProvider ( ) ,
32
+ showCollapseAll : true ,
33
33
} ,
34
34
) ;
35
35
}
@@ -70,17 +70,17 @@ async function save() {
70
70
return ;
71
71
} else {
72
72
found = Object . assign ( found , {
73
- documents : sortedSaveList ,
74
- layout : editorGroupLayout ,
73
+ documents : sortedSaveList ,
74
+ layout : editorGroupLayout ,
75
75
} ) ;
76
76
77
77
type = 'updated' ;
78
78
}
79
79
} else {
80
80
list . push ( {
81
- name : name ,
82
- documents : sortedSaveList ,
83
- layout : editorGroupLayout ,
81
+ name : name ,
82
+ documents : sortedSaveList ,
83
+ layout : editorGroupLayout ,
84
84
} ) ;
85
85
}
86
86
@@ -98,9 +98,9 @@ async function save() {
98
98
function getSortedSaveList ( tabs = null ) {
99
99
return sortList ( tabs || getOpenedTabsWithoutUntitled ( ) ) . map ( ( tab : vscode . Tab ) => ( {
100
100
// @ts -ignore
101
- fsPath : tab . input . uri . fsPath ,
102
- column : tab . group . viewColumn ,
103
- pinned : tab . isPinned ,
101
+ fsPath : tab . input . uri . fsPath ,
102
+ column : tab . group . viewColumn ,
103
+ pinned : tab . isPinned ,
104
104
} ) ) ;
105
105
}
106
106
@@ -165,8 +165,8 @@ async function update() {
165
165
const index = list . findIndex ( ( e ) => e . name == selection ) ;
166
166
167
167
list [ index ] = Object . assign ( list [ index ] , {
168
- documents : getSortedSaveList ( ) ,
169
- layout : await runCommand ( 'vscode.getEditorLayout' ) ,
168
+ documents : getSortedSaveList ( ) ,
169
+ layout : await runCommand ( 'vscode.getEditorLayout' ) ,
170
170
} ) ;
171
171
172
172
await saveUserLists ( list ) ;
@@ -178,9 +178,9 @@ async function update() {
178
178
179
179
function openFile ( doc ) {
180
180
return showDocument ( {
181
- fsPath : doc . fsPath ,
182
- column : doc . column ,
183
- pinned : doc . pinned || false ,
181
+ fsPath : doc . fsPath ,
182
+ column : doc . column ,
183
+ pinned : doc . pinned || false ,
184
184
} ) ;
185
185
}
186
186
@@ -251,7 +251,7 @@ async function saveUserLists(list, forceGlobal = false) {
251
251
252
252
function getOpenedTabs ( ) {
253
253
return vscode . window . tabGroups . all
254
- . flatMap ( ( v ) => v . tabs )
254
+ . flatMap ( ( v : vscode . TabGroup [ ] ) => v . tabs )
255
255
. filter ( ( tab : vscode . Tab ) => tab . input !== undefined && tab . input instanceof vscode . TabInputText ) ;
256
256
}
257
257
@@ -262,7 +262,7 @@ function getOpenedTabsWithoutUntitled() {
262
262
263
263
async function showQuickPick ( list , type ) {
264
264
return vscode . window . showQuickPick ( list , {
265
- placeHolder : `chose a group to ${ type } ` ,
265
+ placeHolder : `choose a group to ${ type } ` ,
266
266
} ) ;
267
267
}
268
268
@@ -281,9 +281,9 @@ async function showDocument(doc) {
281
281
const document = await vscode . workspace . openTextDocument ( doc . fsPath ) ;
282
282
283
283
await vscode . window . showTextDocument ( document , {
284
- viewColumn : doc . column ,
285
- preserveFocus : false ,
286
- preview : false ,
284
+ viewColumn : doc . column ,
285
+ preserveFocus : false ,
286
+ preview : false ,
287
287
} ) ;
288
288
289
289
if ( doc . pinned ) {
0 commit comments