File tree Expand file tree Collapse file tree 1 file changed +9
-6
lines changed
Expand file tree Collapse file tree 1 file changed +9
-6
lines changed Original file line number Diff line number Diff line change @@ -64,14 +64,17 @@ function M.buf_attach(force)
6464
6565 logger .trace (" attaching to buffer" )
6666
67- -- This could cause slowdowns when going into Insert mode
68- if not vim .lsp .buf_is_attached (bufnr , M .id ) then
67+ if not M .id then
6968 M .ensure_client_started ()
69+ end
7070
71- if not M .id then
72- return
73- end
71+ if not M .id then
72+ logger .trace (" failed to start copilot client" )
73+ return
74+ end
7475
76+ -- This could cause slowdowns when going into Insert mode
77+ if not vim .lsp .buf_is_attached (bufnr , M .id ) then
7578 vim .lsp .buf_attach_client (bufnr , M .id )
7679 logger .trace (" explicitly attached client to buffer" )
7780 end
@@ -156,7 +159,7 @@ function M.setup()
156159 end ),
157160 })
158161
159- M .ensure_client_started ( )
162+ vim . schedule ( M .ensure_client_started )
160163end
161164
162165function M .teardown ()
You can’t perform that action at this time.
0 commit comments