emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[elpa] externals/eglot a5f60dd6bf 4/4: Minor checkdoc fixes


From: ELPA Syncer
Subject: [elpa] externals/eglot a5f60dd6bf 4/4: Minor checkdoc fixes
Date: Sat, 8 Jan 2022 13:57:30 -0500 (EST)

branch: externals/eglot
commit a5f60dd6bf7ba2210de53637a9837cc049faddf5
Author: Stefan Kangas <stefan@marxist.se>
Commit: Stefan Kangas <stefan@marxist.se>

    Minor checkdoc fixes
    
    * eglot.el (eglot, eglot--when-buffer-window, eglot--widening)
    (eglot-initialization-options, eglot--current-flymake-report-fn)
    (eglot-handle-notification, eglot-handle-request)
    (eglot--highlight-piggyback, eglot-register-capability)
    (eglot-unregister-capability):
    * eglot-tests.el (auto-detect-running-server, auto-shutdown)
    (auto-reconnect, eglot--tests-force-full-eldoc, rename-a-symbol)
    (basic-completions, non-unique-completions, basic-xref)
    (snippet-completions, snippet-completions-with-company)
    (eglot-eldoc-after-completions, python-yapf-formatting)
    (javascript-basic, json-basic, eglot-ensure)
    (eglot--guessing-contact): Doc fixes; formatting.
    
    * eglot.el (xref-backend-identifier-completion-table): Fix error
    format.
---
 eglot-tests.el | 36 ++++++++++++++++++------------------
 eglot.el       | 42 +++++++++++++++++++++---------------------
 2 files changed, 39 insertions(+), 39 deletions(-)

diff --git a/eglot-tests.el b/eglot-tests.el
index 217b6eebd7..b4842a14e2 100644
--- a/eglot-tests.el
+++ b/eglot-tests.el
@@ -323,12 +323,12 @@ Pass TIMEOUT to `eglot--with-timeout'."
        (should-error (eglot--current-server-or-lose))))))
 
 (ert-deftest auto-detect-running-server ()
-  "Visit a file and M-x eglot, then visit a neighbour. "
+  "Visit a file and \\[eglot], then visit a neighbour."
   (skip-unless (executable-find "pyls"))
   (eglot-tests--auto-detect-running-server-1))
 
 (ert-deftest auto-shutdown ()
-  "Visit a file and M-x eglot, then kill buffer. "
+  "Visit a file and \\[eglot], then kill buffer."
   (skip-unless (executable-find "pyls"))
   (let (server
         buffer)
@@ -347,7 +347,7 @@ Pass TIMEOUT to `eglot--with-timeout'."
         (should (not (jsonrpc-running-p server)))))))
 
 (ert-deftest auto-reconnect ()
-  "Start a server. Kill it. Watch it reconnect."
+  "Start a server.  Kill it.  Watch it reconnect."
   (skip-unless (executable-find "pyls"))
   (let (server (eglot-autoreconnect 1))
     (eglot--with-fixture
@@ -443,7 +443,7 @@ Pass TIMEOUT to `eglot--with-timeout'."
                          (unless (zerop (length bs)) bs))))
    when retval return retval
    do (sit-for 0.1)
-   finally (error "eglot--tests-force-full-eldoc didn't deliver.")))
+   finally (error "eglot--tests-force-full-eldoc didn't deliver")))
 
 (ert-deftest rls-hover-after-edit ()
   "Hover and highlightChanges are tricky in RLS."
@@ -480,7 +480,7 @@ Pass TIMEOUT to `eglot--with-timeout'."
             (eq id pending-id)))))))
 
 (ert-deftest rename-a-symbol ()
-  "Test basic symbol renaming"
+  "Test basic symbol renaming."
   (skip-unless (executable-find "pyls"))
   (eglot--with-fixture
       `(("rename-project"
@@ -495,7 +495,7 @@ Pass TIMEOUT to `eglot--with-timeout'."
                      "def foo (bla) : 1 + bla\n\ndef bar() : pass")))))
 
 (ert-deftest basic-completions ()
-  "Test basic autocompletion in a python LSP"
+  "Test basic autocompletion in a python LSP."
   (skip-unless (executable-find "pyls"))
   (eglot--with-fixture
       `(("project" . (("something.py" . "import sys\nsys.exi"))))
@@ -507,7 +507,7 @@ Pass TIMEOUT to `eglot--with-timeout'."
       (should (looking-back "sys.exit")))))
 
 (ert-deftest non-unique-completions ()
-  "Test completion resulting in 'Complete, but not unique'"
+  "Test completion resulting in 'Complete, but not unique'."
   (skip-unless (executable-find "pyls"))
   (eglot--with-fixture
       '(("project" . (("something.py" . "foo=1\nfoobar=2\nfoo"))))
@@ -524,7 +524,7 @@ Pass TIMEOUT to `eglot--with-timeout'."
         (should (looking-at "Complete, but not unique"))))))
 
 (ert-deftest basic-xref ()
-  "Test basic xref functionality in a python LSP"
+  "Test basic xref functionality in a python LSP."
   (skip-unless (executable-find "pyls"))
   (eglot--with-fixture
       `(("project" . (("something.py" . "def foo(): pass\ndef bar(): foo()"))))
@@ -542,7 +542,7 @@ def foobazquuz(d, e, f): pass
 ")
 
 (ert-deftest snippet-completions ()
-  "Test simple snippet completion in a python LSP"
+  "Test simple snippet completion in a python LSP."
   (skip-unless (and (executable-find "pyls")
                     (functionp 'yas-minor-mode)))
   (eglot--with-fixture
@@ -562,7 +562,7 @@ def foobazquuz(d, e, f): pass
 (defvar company-candidates)
 
 (ert-deftest snippet-completions-with-company ()
-  "Test simple snippet completion in a python LSP"
+  "Test simple snippet completion in a python LSP."
   (skip-unless (and (executable-find "pyls")
                     (functionp 'yas-minor-mode)
                     (functionp 'company-complete)))
@@ -585,7 +585,7 @@ def foobazquuz(d, e, f): pass
       (should (member "foobazquuz(d, e, f)" company-candidates)))))
 
 (ert-deftest eglot-eldoc-after-completions ()
-  "Test documentation echo in a python LSP"
+  "Test documentation echo in a python LSP."
   (skip-unless (executable-find "pyls"))
   (eglot--with-fixture
       `(("project" . (("something.py" . "import sys\nsys.exi"))))
@@ -652,7 +652,7 @@ pyls prefers autopep over yafp, despite its README stating 
the contrary."
        (string= (buffer-string) "def a(): pass\n\n\ndef b(): pass\n")))))
 
 (ert-deftest python-yapf-formatting ()
-  "Test formatting in the pyls python LSP"
+  "Test formatting in the pyls python LSP."
   (skip-unless (and (executable-find "pyls")
                     (not (executable-find "autopep8"))
                     (executable-find "yapf")))
@@ -673,7 +673,7 @@ pyls prefers autopep over yafp, despite its README stating 
the contrary."
        (string= (buffer-string) "def a():\n    pass\n\n\ndef b():\n    
pass\n")))))
 
 (ert-deftest javascript-basic ()
-  "Test basic autocompletion in a JavaScript LSP"
+  "Test basic autocompletion in a JavaScript LSP."
   (skip-unless (executable-find "typescript-language-server"))
   (eglot--with-fixture
       '(("project" . (("hello.js" . "console.log('Hello world!');"))))
@@ -702,7 +702,7 @@ pyls prefers autopep over yafp, despite its README stating 
the contrary."
                                diagnostics)))))))))
 
 (ert-deftest json-basic ()
-  "Test basic autocompletion in vscode-json-languageserver"
+  "Test basic autocompletion in vscode-json-languageserver."
   (skip-unless (executable-find "vscode-json-languageserver"))
   (eglot--with-fixture
       '(("project" .
@@ -746,12 +746,12 @@ pyls prefers autopep over yafp, despite its README 
stating the contrary."
           (should (looking-at "p")))))))
 
 (ert-deftest eglot-lsp-abiding-column ()
-  "Test basic `eglot-lsp-abiding-column' and 
`eglot-move-to-lsp-abiding-column'"
+  "Test basic `eglot-lsp-abiding-column' and 
`eglot-move-to-lsp-abiding-column'."
   (skip-unless (executable-find "clangd"))
   (eglot-tests--lsp-abiding-column-1))
 
 (ert-deftest eglot-ensure ()
-  "Test basic `eglot-ensure' functionality"
+  "Test basic `eglot-ensure' functionality."
   (skip-unless (executable-find "pyls"))
   (eglot--with-fixture
       `(("project" . (("foo.py" . "import sys\nsys.exi")
@@ -941,12 +941,12 @@ pyls prefers autopep over yafp, despite its README 
stating the contrary."
   "Evaluate BODY twice, binding results of `eglot--guess-contact'.
 
 INTERACTIVE-SYM is bound to the boolean passed to
-`eglot--guess-contact' each time. If the user would have been
+`eglot--guess-contact' each time.  If the user would have been
 prompted, PROMPT-ARGS-SYM is bound to the list of arguments that
 would have been passed to `read-shell-command', else nil.
 GUESSED-CLASS-SYM, GUESSED-CONTACT-SYM and GUESSED-LANG-ID-SYM
 are bound to the useful return values of
-`eglot--guess-contact'. Unless the server program evaluates to
+`eglot--guess-contact'.  Unless the server program evaluates to
 \"a-missing-executable.exe\", this macro will assume it exists."
   (declare (indent 1) (debug t))
   (let ((i-sym (cl-gensym)))
diff --git a/eglot.el b/eglot.el
index e9f48bb3c3..234e4f14e7 100644
--- a/eglot.el
+++ b/eglot.el
@@ -91,7 +91,7 @@
 
 ;;; User tweakable stuff
 (defgroup eglot nil
-  "Interaction with Language Server Protocol servers"
+  "Interaction with Language Server Protocol servers."
   :prefix "eglot-"
   :group 'applications)
 
@@ -577,7 +577,7 @@ treated as in `eglot-dbind'."
     `(let ((,b ,buf)) (if (buffer-live-p ,b) (with-current-buffer ,b 
,@body)))))
 
 (cl-defmacro eglot--when-buffer-window (buf &body body)
-  "Check BUF showing somewhere, then do BODY in it" (declare (indent 1) (debug 
t))
+  "Check BUF showing somewhere, then do BODY in it." (declare (indent 1) 
(debug t))
   (let ((b (cl-gensym)))
     `(let ((,b ,buf))
        ;;notice the exception when testing with `ert'
@@ -585,7 +585,7 @@ treated as in `eglot-dbind'."
          (with-current-buffer ,b ,@body)))))
 
 (cl-defmacro eglot--widening (&rest body)
-  "Save excursion and restriction. Widen. Then run BODY." (declare (debug t))
+  "Save excursion and restriction.  Widen.  Then run BODY." (declare (debug t))
   `(save-excursion (save-restriction (widen) ,@body)))
 
 (cl-defgeneric eglot-handle-request (server method &rest params)
@@ -598,7 +598,7 @@ treated as in `eglot-dbind'."
   "Ask SERVER to execute COMMAND with ARGUMENTS.")
 
 (cl-defgeneric eglot-initialization-options (server)
-  "JSON object to send under `initializationOptions'"
+  "JSON object to send under `initializationOptions'."
   (:method (_s) eglot--{})) ; blank default
 
 (cl-defgeneric eglot-register-capability (server method id &rest params)
@@ -1481,7 +1481,7 @@ and just return it.  PROMPT shouldn't end with a question 
mark."
     map))
 
 (defvar-local eglot--current-flymake-report-fn nil
-  "Current flymake report function for this buffer")
+  "Current flymake report function for this buffer.")
 
 (defvar-local eglot--saved-bindings nil
   "Bindings saved by `eglot--setq-saving'.")
@@ -1734,14 +1734,14 @@ Uses THING, FACE, DEFS and PREPEND."
 ;;;
 (cl-defmethod eglot-handle-notification
   (_server method &key &allow-other-keys)
-  "Handle unknown notification"
+  "Handle unknown notification."
   (unless (or (string-prefix-p "$" (format "%s" method))
               (not (memq 'disallow-unknown-methods eglot-strict-mode)))
     (eglot--warn "Server sent unknown notification method `%s'" method)))
 
 (cl-defmethod eglot-handle-request
   (_server method &key &allow-other-keys)
-  "Handle unknown request"
+  "Handle unknown request."
   (when (memq 'disallow-unknown-methods eglot-strict-mode)
     (jsonrpc-error "Unknown request method `%s'" method)))
 
@@ -1754,14 +1754,14 @@ COMMAND is a symbol naming the command."
 
 (cl-defmethod eglot-handle-notification
   (_server (_method (eql window/showMessage)) &key type message)
-  "Handle notification window/showMessage"
+  "Handle notification window/showMessage."
   (eglot--message (propertize "Server reports (type=%s): %s"
                               'face (if (<= type 1) 'error))
                   type message))
 
 (cl-defmethod eglot-handle-request
   (_server (_method (eql window/showMessageRequest)) &key type message actions)
-  "Handle server request window/showMessageRequest"
+  "Handle server request window/showMessageRequest."
   (let* ((actions (append actions nil)) ;; gh#627
          (label (completing-read
                  (concat
@@ -1776,16 +1776,16 @@ COMMAND is a symbol naming the command."
 
 (cl-defmethod eglot-handle-notification
   (_server (_method (eql window/logMessage)) &key _type _message)
-  "Handle notification window/logMessage") ;; noop, use events buffer
+  "Handle notification window/logMessage.") ;; noop, use events buffer
 
 (cl-defmethod eglot-handle-notification
   (_server (_method (eql telemetry/event)) &rest _any)
-  "Handle notification telemetry/event") ;; noop, use events buffer
+  "Handle notification telemetry/event.") ;; noop, use events buffer
 
 (cl-defmethod eglot-handle-notification
   (server (_method (eql textDocument/publishDiagnostics)) &key uri diagnostics
           &allow-other-keys) ; FIXME: doesn't respect `eglot-strict-mode'
-  "Handle notification publishDiagnostics"
+  "Handle notification publishDiagnostics."
   (if-let ((buffer (find-buffer-visiting (eglot--uri-to-path uri))))
       (with-current-buffer buffer
         (cl-loop
@@ -1839,18 +1839,18 @@ THINGS are either registrations or unregisterations 
(sic)."
 
 (cl-defmethod eglot-handle-request
   (server (_method (eql client/registerCapability)) &key registrations)
-  "Handle server request client/registerCapability"
+  "Handle server request client/registerCapability."
   (eglot--register-unregister server registrations 'register))
 
 (cl-defmethod eglot-handle-request
   (server (_method (eql client/unregisterCapability))
           &key unregisterations) ;; XXX: "unregisterations" (sic)
-  "Handle server request client/unregisterCapability"
+  "Handle server request client/unregisterCapability."
   (eglot--register-unregister server unregisterations 'unregister))
 
 (cl-defmethod eglot-handle-request
   (_server (_method (eql workspace/applyEdit)) &key _label edit)
-  "Handle server request workspace/applyEdit"
+  "Handle server request workspace/applyEdit."
   (eglot--apply-workspace-edit edit eglot-confirm-server-initiated-edits))
 
 (defun eglot--TextDocumentIdentifier ()
@@ -2180,7 +2180,7 @@ Try to visit the target file for a richer summary line."
     (xref-make-match summary (xref-make-file-location file line column) 
length)))
 
 (cl-defmethod xref-backend-identifier-completion-table ((_backend (eql eglot)))
-  (eglot--error "cannot (yet) provide reliable completion table for LSP 
symbols"))
+  (eglot--error "Cannot (yet) provide reliable completion table for LSP 
symbols"))
 
 (cl-defmethod xref-backend-identifier-at-point ((_backend (eql eglot)))
   ;; JT@19/10/09: This is a totally dummy identifier that isn't even
@@ -2578,7 +2578,7 @@ is not active."
 (defvar eglot--highlights nil "Overlays for textDocument/documentHighlight.")
 
 (defun eglot--highlight-piggyback (_cb)
-  "Request and handle `:textDocument/documentHighlight'"
+  "Request and handle `:textDocument/documentHighlight'."
   ;; FIXME: Obviously, this is just piggy backing on eldoc's calls for
   ;; convenience, as shown by the fact that we just ignore cb.
   (let ((buf (current-buffer)))
@@ -2821,7 +2821,7 @@ at point.  With prefix argument, prompt for ACTION-KIND."
 ;;;
 (cl-defmethod eglot-register-capability
   (server (method (eql workspace/didChangeWatchedFiles)) id &key watchers)
-  "Handle dynamic registration of workspace/didChangeWatchedFiles"
+  "Handle dynamic registration of workspace/didChangeWatchedFiles."
   (eglot-unregister-capability server method id)
   (let* (success
          (globs (mapcar
@@ -2863,7 +2863,7 @@ at point.  With prefix argument, prompt for ACTION-KIND."
 
 (cl-defmethod eglot-unregister-capability
   (server (_method (eql workspace/didChangeWatchedFiles)) id)
-  "Handle dynamic unregistration of workspace/didChangeWatchedFiles"
+  "Handle dynamic unregistration of workspace/didChangeWatchedFiles."
   (mapc #'file-notify-rm-watch (gethash id (eglot--file-watches server)))
   (remhash id (eglot--file-watches server))
   (list t "OK"))
@@ -2948,7 +2948,7 @@ If NOERROR, return predicate, else erroring function."
 (cl-defmethod eglot-handle-notification
   ((server eglot-rls) (_method (eql window/progress))
    &key id done title message &allow-other-keys)
-  "Handle notification window/progress"
+  "Handle notification window/progress."
   (setf (eglot--spinner server) (list id title done message)))
 
 
@@ -2958,7 +2958,7 @@ If NOERROR, return predicate, else erroring function."
   :documentation "Eclipse's Java Development Tools Language Server.")
 
 (cl-defmethod eglot-initialization-options ((server eglot-eclipse-jdt))
-  "Passes through required jdt initialization options"
+  "Passes through required jdt initialization options."
   `(:workspaceFolders
     [,@(cl-delete-duplicates
         (mapcar #'eglot--path-to-uri



reply via email to

[Prev in Thread] Current Thread [Next in Thread]