Skip to content

Commit 0f89e26

Browse files
ncaqbbatsov
authored andcommitted
fix: from deprecated setEditorInfo to initializationOptions
``` [sdk] setEditorInfo is deprecated. Use initializationOptions for editorInfo and editorPluginInfo and workspace/didChangeConfiguration for editorConfiguration. ```
1 parent f0e4ce6 commit 0f89e26

File tree

1 file changed

+15
-8
lines changed

1 file changed

+15
-8
lines changed

copilot.el

Lines changed: 15 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -473,15 +473,22 @@ You can change the installed version with `M-x copilot-reinstall-server` or remo
473473
copilot-version installed-version)))
474474
(setq copilot--connection (copilot--make-connection))
475475
(copilot--log 'info "Copilot server started.")
476-
(copilot--request 'initialize `( :capabilities (:workspace (:workspaceFolders t))
477-
:processId ,(emacs-pid)))
476+
(copilot--request
477+
'initialize
478+
`(:processId
479+
,(emacs-pid)
480+
:capabilities
481+
(:workspace
482+
(:workspaceFolders t))
483+
:initializationOptions
484+
(:editorInfo
485+
(:name "Emacs" :version ,emacs-version)
486+
:editorPluginInfo
487+
(:name "copilot.el" :version ,(or (copilot-installed-version) "unknown"))
488+
,@(when copilot-network-proxy
489+
`(:networkProxy ,copilot-network-proxy)))))
478490
(copilot--notify 'initialized '())
479-
(copilot--notify 'workspace/didChangeConfiguration `(:settings ,copilot-lsp-settings))
480-
(copilot--async-request 'setEditorInfo
481-
`( :editorInfo (:name "Emacs" :version ,emacs-version)
482-
:editorPluginInfo (:name "copilot.el" :version ,(or (copilot-installed-version) "unknown"))
483-
,@(when copilot-network-proxy
484-
`(:networkProxy ,copilot-network-proxy)))))))
491+
(copilot--notify 'workspace/didChangeConfiguration `(:settings ,copilot-lsp-settings)))))
485492

486493
;;
487494
;; login / logout

0 commit comments

Comments
 (0)