[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
feature/eglot2emacs 51ae66b50c 099/120: Add eglot-show-configuration to
From: |
João Távora |
Subject: |
feature/eglot2emacs 51ae66b50c 099/120: Add eglot-show-configuration to debug workspace configurations |
Date: |
Thu, 20 Oct 2022 07:17:06 -0400 (EDT) |
branch: feature/eglot2emacs
commit 51ae66b50c9f73956039fddba72dbd7213926622
Author: Fredrik Bergroth <fbergroth@gmail.com>
Commit: João Távora <joaotavora@gmail.com>
Add eglot-show-configuration to debug workspace configurations
Also see https://github.com/joaotavora/eglot/issues/790,
https://github.com/joaotavora/eglot/issues/1033.
GitHub-reference: per https://github.com/joaotavora/eglot/issues/590
---
lisp/progmodes/eglot.el | 13 +++++++++++++
1 file changed, 13 insertions(+)
diff --git a/lisp/progmodes/eglot.el b/lisp/progmodes/eglot.el
index e399b29f09..91733a8d7a 100644
--- a/lisp/progmodes/eglot.el
+++ b/lisp/progmodes/eglot.el
@@ -75,6 +75,7 @@
(require 'filenotify)
(require 'ert)
(require 'array)
+(require 'json)
;; ElDoc is preloaded in Emacs, so `require'-ing won't guarantee we are
;; using the latest version from GNU Elpa when we load eglot.el. Use an
@@ -2210,6 +2211,18 @@ above.")
;;;###autoload
(put 'eglot-workspace-configuration 'safe-local-variable 'listp)
+(defun eglot-show-configuration (server)
+ "Dump `eglot-workspace-configuration' as json for debugging."
+ (interactive (list (eglot--read-server "Server configuration"
+ (eglot-current-server))))
+ (let ((conf (eglot--workspace-configuration server)))
+ (with-current-buffer (get-buffer-create " *eglot configuration*")
+ (erase-buffer)
+ (insert (jsonrpc--json-encode conf))
+ (json-mode)
+ (json-pretty-print-buffer)
+ (pop-to-buffer (current-buffer)))))
+
(defun eglot--workspace-configuration (server)
(if (functionp eglot-workspace-configuration)
(funcall eglot-workspace-configuration server)
- feature/eglot2emacs 26bd153b90 028/120: Print server command to events buffer, (continued)
- feature/eglot2emacs 26bd153b90 028/120: Print server command to events buffer, João Távora, 2022/10/20
- feature/eglot2emacs abfb193201 032/120: Remove unnecessary compatibility code, João Távora, 2022/10/20
- feature/eglot2emacs 85ecf46a18 046/120: Have a couple of lsp faces inherit from basic "shadow", João Távora, 2022/10/20
- feature/eglot2emacs 6d815aaa98 057/120: Tweak on-type-formatting code, João Távora, 2022/10/20
- feature/eglot2emacs b59fa2548e 083/120: Cosmetic decisions guaranteed to tick off someone somewhere (tm), João Távora, 2022/10/20
- feature/eglot2emacs 6717589c57 086/120: Be more conservative with the lsp identifier guess, João Távora, 2022/10/20
- feature/eglot2emacs 3967d22b9c 005/120: ; fix typos, João Távora, 2022/10/20
- feature/eglot2emacs 5c6eb3caa9 074/120: Don't ignore flymake-no-changes-timeout, João Távora, 2022/10/20
- feature/eglot2emacs 6ee995fe6b 094/120: Add marksman server for markdown, João Távora, 2022/10/20
- feature/eglot2emacs 0e8a8697ba 092/120: Merge commit '7738854e09' to fix fallout of force-push in gnu elpa, João Távora, 2022/10/20
- feature/eglot2emacs 51ae66b50c 099/120: Add eglot-show-configuration to debug workspace configurations,
João Távora <=
- feature/eglot2emacs 14586fedcf 103/120: Don't exceed max-specdl-size in big go projects, João Távora, 2022/10/20
- feature/eglot2emacs a8b3b6a526 014/120: Add vim-language-server for vimrc-mode, João Távora, 2022/10/20
- feature/eglot2emacs b1c7aa1d17 003/120: Add yaml-language-server for yaml-mode, João Távora, 2022/10/20
- feature/eglot2emacs 51fc8fc3d2 002/120: Use `locate-user-emacs-file` instead of `concat`, João Távora, 2022/10/20
- feature/eglot2emacs 06f1cd6365 008/120: Add lua-lsp support for lua-mode, João Távora, 2022/10/20
- feature/eglot2emacs 7c712abf8f 009/120: Minor checkdoc fixes, João Távora, 2022/10/20
- feature/eglot2emacs 8a9959e054 039/120: Add clojure-lsp support for clojure, João Távora, 2022/10/20
- feature/eglot2emacs bc05805887 036/120: ; unbreak tests on emacs 26, João Távora, 2022/10/20
- feature/eglot2emacs 8b31247f1c 044/120: Properly check the completionitem.deprecated property, João Távora, 2022/10/20
- feature/eglot2emacs 5b88ec259c 026/120: Change from symbol-at-point to thing-at-point, João Távora, 2022/10/20