File tree Expand file tree Collapse file tree 1 file changed +6
-3
lines changed
Expand file tree Collapse file tree 1 file changed +6
-3
lines changed Original file line number Diff line number Diff line change @@ -209,9 +209,12 @@ function M.setup(opts)
209209 M .config = vim .tbl_deep_extend (" force" , M .config , opts )
210210
211211 -- enable necessary capabilities for enabled LSP file operations
212- M .config .capabilities = vim .tbl_deep_extend (" force" , M .config .capabilities or {}, {
213- workspace = { fileOperations = vim .tbl_get (M .config , " file_operations" , " operations" ) },
214- })
212+ local fileOperations = vim .tbl_get (M .config , " file_operations" , " operations" )
213+ if fileOperations and not vim .tbl_isempty (fileOperations ) then
214+ M .config .capabilities = vim .tbl_deep_extend (" force" , M .config .capabilities or {}, {
215+ workspace = { fileOperations = fileOperations },
216+ })
217+ end
215218 local rename_augroup = vim .api .nvim_create_augroup (" astrolsp_rename_operations" , { clear = true })
216219 vim .api .nvim_create_autocmd (" User" , {
217220 group = rename_augroup ,
You can’t perform that action at this time.
0 commit comments