File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -236,6 +236,15 @@ M.initialize_or_attach = function(buf)
236236 local config = require (" powershell.config" ).config
237237 local root_dir = config .root_dir (buf )
238238
239+ local session_details = all_session_details [root_dir ]
240+ if session_details then
241+ local lsp_config = get_lsp_config (buf , session_details )
242+ if not lsp_config then return end
243+ local client = vim .lsp .start (lsp_config , { bufnr = buf })
244+ util .clients_id [buf ] = client
245+ return
246+ end
247+
239248 if not is_pending [root_dir ] then
240249 is_pending [root_dir ] = true
241250 else
@@ -253,15 +262,6 @@ M.initialize_or_attach = function(buf)
253262 return
254263 end
255264
256- local session_details = all_session_details [root_dir ]
257- if session_details then
258- local lsp_config = get_lsp_config (buf , session_details )
259- if not lsp_config then return end
260- local client = vim .lsp .start (lsp_config , { bufnr = buf })
261- util .clients_id [buf ] = client
262- return
263- end
264-
265265 local client_id = util .clients_id [buf ]
266266 assert (not client_id )
267267 local term_buf = api .nvim_create_buf (false , false )
You can’t perform that action at this time.
0 commit comments