File tree Expand file tree Collapse file tree 1 file changed +13
-0
lines changed
Expand file tree Collapse file tree 1 file changed +13
-0
lines changed Original file line number Diff line number Diff line change @@ -212,6 +212,19 @@ function M.setup(opts)
212212 M .config .capabilities = vim .tbl_deep_extend (" force" , M .config .capabilities or {}, {
213213 workspace = { fileOperations = vim .tbl_get (M .config , " file_operations" , " operations" ) },
214214 })
215+ local rename_augroup = vim .api .nvim_create_augroup (" astrolsp_rename_operations" , { clear = true })
216+ vim .api .nvim_create_autocmd (" User" , {
217+ group = rename_augroup ,
218+ desc = " trigger willRenameFiles LSP operation on AstroCore file rename" ,
219+ pattern = " AstroRenameFilePre" ,
220+ callback = function (args ) require (" astrolsp.file_operations" ).willRenameFiles (args .data ) end ,
221+ })
222+ vim .api .nvim_create_autocmd (" User" , {
223+ group = rename_augroup ,
224+ desc = " trigger didRenameFiles LSP operation on AstroCore file rename" ,
225+ pattern = " AstroRenameFilePost" ,
226+ callback = function (args ) require (" astrolsp.file_operations" ).didRenameFiles (args .data ) end ,
227+ })
215228
216229 -- normalize format_on_save to table format
217230 if vim .tbl_get (M .config , " formatting" , " format_on_save" ) == false then
You can’t perform that action at this time.
0 commit comments