You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
" NOTE: The enable/disable commands are deprecated
132
142
function!s:CommandEnable(...) abort
133
-
letg:augment_enabled=v:true
143
+
callaugment#DisplayError('The `Enable` and `Disable` commands are deprecated in favor of the `g:augment_disable_completions` option. See `:help g:augment_disable_completions` for more details.')
134
144
endfunction
135
145
136
146
function!s:CommandDisable(...) abort
137
-
letg:augment_enabled=v:false
147
+
callaugment#DisplayError('The `Enable` and `Disable` commands are deprecated in favor of the `g:augment_disable_completions` option. See `:help g:augment_disable_completions` for more details.')
callaugment#log#Error('Workspace folders set to invalid value: ' . string(g:augment_workspace_folders) . '. See `:h g:augment_workspace_folders` for configuration instructions.')
328
+
return []
329
+
endif
330
+
293
331
let valid_folders = []
294
-
for folder ing:augment_workspace_folders
295
-
let abs_path =fnamemodify(folder, ':p')
296
-
if!isdirectory(abs_path)
297
-
callaugment#log#Error('The following workspace folder does not exist: ' . abs_path)
332
+
for folder in folders_list
333
+
iftype(folder) !=v:t_string
334
+
callaugment#log#Error('Expected workspace folder type to be string. Got: ' . string(folder))
298
335
else
299
-
calladd(valid_folders, folder)
336
+
let abs_path =fnamemodify(folder, ':p')
337
+
if!isdirectory(abs_path)
338
+
callaugment#log#Error('The following workspace folder does not exist: ' . abs_path)
" Check that the runtime environment is installed. If not, return a partially initialized client
347
-
ifexecutable(s:job_command[0]) ==0
348
-
callaugment#log#Error('The Augment runtime (' . s:job_command[0] . ') was not found. If node is available on your system under a different name, you can set the `g:augment_node_command` variable. See `:help g:augment_node_command` for more details.')
349
-
return client
350
-
endif
351
-
352
388
" Convert any workspace folders to URIs for the language server
353
389
let workspace_folders =s:GetWorkspaceFolders()
354
390
355
391
" Start the server and send the initialize request
392
+
let job_command =augment#client#GetJobCommand()
356
393
ifhas('nvim')
357
394
" Nvim-specific client setup
358
395
callextend(client, {
@@ -365,7 +402,7 @@ function! s:New() abort
365
402
366
403
" If the client exits, lua will notify NvimOnExit()
367
404
let client.client_id =luaeval('require("augment").start_client(_A[1], _A[2], _A[3])',
0 commit comments