summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobert Pluim <rpluim@gmail.com>2022-10-25 15:18:51 +0200
committerRobert Pluim <rpluim@gmail.com>2022-10-25 16:22:07 +0200
commit8c3b8c36677eedfc3839488e3cef9f6a5937baa3 (patch)
tree71ebce2e53617f5827ff962372809d0c1c60b5aa
parent1e1be54156108a25ba78ca4268af3113945d574e (diff)
downloademacs-8c3b8c36677eedfc3839488e3cef9f6a5937baa3.tar.gz
emacs-8c3b8c36677eedfc3839488e3cef9f6a5937baa3.tar.bz2
emacs-8c3b8c36677eedfc3839488e3cef9f6a5937baa3.zip
Fix eglot defcustom types
* lisp/progmodes/eglot.el (eglot-autoreconnect): Allow for 'nil'. (eglot-connect-timeout): Allow for 'nil' and add descriptions. (eglot-sync-connect): Split boolean into 'nil' and 't' and add descriptions. (eglot-confirm-server-initiated-edits): Change 'symbol' type to 'const'.
-rw-r--r--lisp/progmodes/eglot.el13
1 files changed, 8 insertions, 5 deletions
diff --git a/lisp/progmodes/eglot.el b/lisp/progmodes/eglot.el
index 662c233f30d..201fafb6712 100644
--- a/lisp/progmodes/eglot.el
+++ b/lisp/progmodes/eglot.el
@@ -323,13 +323,15 @@ never reconnect automatically after unexpected server shutdowns,
crashes or network failures. A positive integer number says to
only autoreconnect if the previous successful connection attempt
lasted more than that many seconds."
- :type '(choice (boolean :tag "Whether to inhibit autoreconnection")
+ :type '(choice (const :tag "Reconnect automatically" t)
+ (const :tag "Never reconnect" nil)
(integer :tag "Number of seconds")))
(defcustom eglot-connect-timeout 30
"Number of seconds before timing out LSP connection attempts.
If nil, never time out."
- :type 'number)
+ :type '(choice (number :tag "Number of seconds")
+ (const :tag "Never time out" nil)))
(defcustom eglot-sync-connect 3
"Control blocking of LSP connection attempts.
@@ -337,8 +339,9 @@ If t, block for `eglot-connect-timeout' seconds. A positive
integer number means block for that many seconds, and then wait
for the connection in the background. nil has the same meaning
as 0, i.e. don't block at all."
- :type '(choice (boolean :tag "Whether to inhibit autoreconnection")
- (integer :tag "Number of seconds")))
+ :type '(choice (const :tag "Block for `eglot-connect-timeout' seconds" t)
+ (const :tag "Never block" nil)
+ (integer :tag "Number of seconds to block")))
(defcustom eglot-autoshutdown nil
"If non-nil, shut down server after killing last managed buffer."
@@ -363,7 +366,7 @@ done by `eglot-reconnect'."
(defcustom eglot-confirm-server-initiated-edits 'confirm
"Non-nil if server-initiated edits should be confirmed with user."
:type '(choice (const :tag "Don't show confirmation prompt" nil)
- (symbol :tag "Show confirmation prompt" 'confirm)))
+ (const :tag "Show confirmation prompt" confirm)))
(defcustom eglot-extend-to-xref nil
"If non-nil, activate Eglot in cross-referenced non-project files."