@@ -35,6 +35,7 @@ import {
35
35
import { validateFilePaths } from './validations/validateFilePath' ;
36
36
import { fileSystemService } from './services/fs.service' ;
37
37
import { legalFileGlob } from 'shared' ;
38
+ import { renameFilesHandler } from './providers/didRenameFiles' ;
38
39
39
40
const connection = createConnection ( ProposedFeatures . all ) ;
40
41
@@ -93,7 +94,7 @@ connection.onInitialized(() => {
93
94
}
94
95
95
96
connection . client . register ( DidChangeWatchedFilesNotification . type ) ;
96
- const p : FileOperationRegistrationOptions = {
97
+ const registrationOptions : FileOperationRegistrationOptions = {
97
98
filters : [
98
99
{
99
100
pattern : {
@@ -102,15 +103,12 @@ connection.onInitialized(() => {
102
103
} ,
103
104
] ,
104
105
} ;
105
- connection . client . register ( DidRenameFilesNotification . type , p ) ;
106
106
107
- connection . workspace . onDidRenameFiles ( ( params ) => {
108
- console . log ( params ) ;
109
- params . files . forEach ( ( file ) => {
110
- console . log ( 'old:' , fileSystemService . trimWorkspaceFromURI ( file . oldUri ) ) ;
111
- console . log ( 'new:' , fileSystemService . trimWorkspaceFromURI ( file . newUri ) ) ;
112
- } ) ;
113
- } ) ;
107
+ connection . client . register (
108
+ DidRenameFilesNotification . type ,
109
+ registrationOptions
110
+ ) ;
111
+ connection . workspace . onDidRenameFiles ( renameFilesHandler ) ;
114
112
115
113
if ( configService . hasWorkspaceFolderCapability ) {
116
114
connection . workspace . onDidChangeWorkspaceFolders ( ( _event ) => {
0 commit comments