Skip to content

Commit

Permalink
Per #790, #590: Adjust last commit about workspace configuration
Browse files Browse the repository at this point in the history
* README.md (way): Adjust.

* eglot.el (json): Don't require needlessly.
(eglot-show-workspace-configuration): Don't depend on json-mode.
  • Loading branch information
joaotavora committed Sep 17, 2022
1 parent 18d4627 commit a67284b
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 6 deletions.
4 changes: 1 addition & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -141,9 +141,7 @@ out-of-the-box, but some need to know project-specific settings, which
LSP calls "workspace configuration".

These per-project settings are realized with the Elisp variable
`eglot-workspace-configuration`.

This variable's value is sent over to the server:
`eglot-workspace-configuration`. They are sent over to the server:

* initially, as a [`didChangeConfiguration` notification][did-change-configuration];
* as the response to [configuration request][configuration-request] from the server.
Expand Down
4 changes: 1 addition & 3 deletions eglot.el
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,6 @@
(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
Expand Down Expand Up @@ -2222,8 +2221,7 @@ format described above.")
(insert (jsonrpc--json-encode conf))
(with-no-warnings
(require 'json)
(require 'json-mode)
(json-mode)
(when (require 'json-mode nil t) (json-mode))
(json-pretty-print-buffer))
(pop-to-buffer (current-buffer)))))

Expand Down

0 comments on commit a67284b

Please sign in to comment.