From: João Távora Date: Wed, 16 Dec 2020 10:22:56 +0000 (+0000) Subject: Cosmetic whitespace fix (indentation, long lines, tabs->spaces) X-Git-Tag: emacs-29.0.90~1616^2~524^2~4^2~194 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=d18f546844350d7fd91477dcaf0a65772828b463;p=emacs.git Cosmetic whitespace fix (indentation, long lines, tabs->spaces) * eglot.el (eglot-server-programs, for, eglot--after-change) (eglot-code-actions, eglot-register-capability) (eglot-register-capability): Fix whitespace. --- diff --git a/lisp/progmodes/eglot.el b/lisp/progmodes/eglot.el index e148403590a..404ed19049c 100644 --- a/lisp/progmodes/eglot.el +++ b/lisp/progmodes/eglot.el @@ -100,15 +100,16 @@ typescript-mode) . ("javascript-typescript-stdio")) (sh-mode . ("bash-language-server" "start")) - (php-mode . ("php" "vendor/felixfbecker/\ + (php-mode + . ("php" "vendor/felixfbecker/\ language-server/bin/php-language-server.php")) ((c++-mode c-mode) . ("ccls")) ((caml-mode tuareg-mode reason-mode) . ("ocaml-language-server" "--stdio")) (ruby-mode - . ("solargraph" "socket" "--port" - :autoport)) - (haskell-mode . ("haskell-language-server-wrapper" "--lsp")) + . ("solargraph" "socket" "--port" :autoport)) + (haskell-mode + . ("haskell-language-server-wrapper" "--lsp")) (elm-mode . ("elm-language-server")) (kotlin-mode . ("kotlin-language-server")) (go-mode . ("gopls")) @@ -1522,7 +1523,7 @@ Uses THING, FACE, DEFS and PREPEND." (priority . ,(+ 50 i)) (keymap . ,(let ((map (make-sparse-keymap))) (define-key map [mouse-1] - (eglot--mouse-call 'eglot-code-actions)) + (eglot--mouse-call 'eglot-code-actions)) map))))) @@ -1763,8 +1764,8 @@ Records BEG, END and PRE-CHANGE-LENGTH locally." ,(buffer-substring-no-properties b-beg-marker b-end-marker))) (setcar eglot--recent-changes - `(,lsp-beg ,lsp-end ,pre-change-length - ,(buffer-substring-no-properties beg end))))) + `(,lsp-beg ,lsp-end ,pre-change-length + ,(buffer-substring-no-properties beg end))))) (_ (setf eglot--recent-changes :emacs-messup))) (when eglot--change-idle-timer (cancel-timer eglot--change-idle-timer)) (let ((buf (current-buffer))) @@ -2533,9 +2534,9 @@ code actions at point" actions) (eglot--error "No code actions here"))) (preferred-action (cl-find-if - (jsonrpc-lambda (&key isPreferred &allow-other-keys) - isPreferred) - actions)) + (jsonrpc-lambda (&key isPreferred &allow-other-keys) + isPreferred) + actions)) (menu `("Eglot code actions:" ("dummy" ,@menu-items))) (action (if (listp last-nonmenu-event) (x-popup-menu last-nonmenu-event menu) @@ -2572,16 +2573,16 @@ code actions at point" finally return result)) (cl-defmethod eglot-register-capability - (server (method (eql workspace/didChangeWatchedFiles)) id &key watchers) + (server (method (eql workspace/didChangeWatchedFiles)) id &key watchers) "Handle dynamic registration of workspace/didChangeWatchedFiles" (eglot-unregister-capability server method id) (let* (success (globs (mapcar (eglot--lambda ((FileSystemWatcher) globPattern) globPattern) watchers)) - (glob-dirs - (delete-dups (mapcar #'file-name-directory - (mapcan #'file-expand-wildcards globs))))) + (glob-dirs + (delete-dups (mapcar #'file-name-directory + (mapcan #'file-expand-wildcards globs))))) (cl-labels ((handle-event (event) @@ -2605,13 +2606,13 @@ code actions at point" (handle-event `(,desc 'created ,file1))))))) (unwind-protect (progn - (dolist (dir glob-dirs) - (push (file-notify-add-watch dir '(change) #'handle-event) - (gethash id (eglot--file-watches server)))) - (setq - success - `(:message ,(format "OK, watching %s directories in %s watchers" - (length glob-dirs) (length watchers))))) + (dolist (dir glob-dirs) + (push (file-notify-add-watch dir '(change) #'handle-event) + (gethash id (eglot--file-watches server)))) + (setq + success + `(:message ,(format "OK, watching %s directories in %s watchers" + (length glob-dirs) (length watchers))))) (unless success (eglot-unregister-capability server method id))))))