-
Notifications
You must be signed in to change notification settings - Fork 164
Allow users to specify settings
of Copilot LSP
#380
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
I think you should also mention this in the README. |
80fd2a5
to
4c58853
Compare
4c58853
to
ac142db
Compare
I added the README entry. If there is something else missing, then let me know. |
copilot.el
Outdated
@@ -420,6 +443,13 @@ SUCCESS-FN is the CALLBACK." | |||
;; handle older jsonrpc versions | |||
(funcall make-fn :events-buffer-scrollback-size copilot-log-max))))) | |||
|
|||
(defun copilot--notify-configuration () |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think "copilot--notify-configuration-changed" is probably a better name for this function.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This function got removed. We only notify the server at the start now.
copilot.el
Outdated
Exchange the URI with the correct URI of your organization." | ||
:set #'copilot--lsp-configuration-changed | ||
:type 'sexp | ||
:group 'copilot) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Add a :package-version
property mentioning this got added in version 0.2.
copilot.el
Outdated
'(:github-enterprise (:uri \"https://example.ghe.com\")) | ||
|
||
Exchange the URI with the correct URI of your organization." | ||
:set #'copilot--lsp-configuration-changed |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm reasonably certain this will be triggered only when using M-x customize
, so you'll probably have to mention it somewhere, so people are not surprised that manual config changes don't trigger it.
copilot.el
Outdated
@@ -177,6 +177,29 @@ You may adjust this variable at your own risk." | |||
:group 'copilot | |||
:package-version '(copilot . "0.1")) | |||
|
|||
(defun copilot--lsp-configuration-changed (symbol value) | |||
"Notify the Copilot LSP configuration has changed and set SYMBOL to VALUE." |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You should probably add a note that's supposed to get triggered when copilot-lsp-settings
gets updated via the customize UI. Such callbacks are rarely used and might surprise many users.
I've added a few small remarks here and there, but overall your changes are in a good shape. |
Thanks for the review. I had to change one thing. There is an issue with the notify when changing the settings from something (e.g. |
Great work! Thanks! |
Feature
This allows users to set the
settings
(https://github.com/github/copilot-language-server-release?tab=readme-ov-file#configuration-management) for the Copilot LSP. VSCode stores this insettings.json
? Having this feature allows users to login into GitHub Enterprise instances. Without this it is not possible. You can also disable telemetry with this.How To Test
Testing this without a GHE instance is tricky but doable.
M-x copilot-logout
).eval-last-sexp (C-x C-e)
to step through the following snippetsAnother test can be: