Skip to content

Commit 883dded

Browse files
authored
Explicitly enable json validation (#4915)
In my set up, json validation was not occurring despite this being a default value. Explicitly setting this here, and also enabling a customisation to disable it if desired.
1 parent 6f9e3ee commit 883dded

File tree

2 files changed

+8
-0
lines changed

2 files changed

+8
-0
lines changed

CHANGELOG.org

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
* Changelog
22
** Unreleased 9.0.1
3+
* Add explicit flag to enable (or disable) JSON validation.
34
* Fix Accommodate renaming of lsp-postgres binaries
45
* Fix =lsp-org= for org >= 9.7 (see #4300)
56
* Add format on save support

clients/lsp-json.el

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,8 +54,15 @@ here, https://github.com/emacs-lsp/lsp-mode/issues/3368#issuecomment-1049635155.
5454
:group 'lsp-json
5555
:package-version '(lsp-mode . "6.3"))
5656

57+
(defcustom lsp-json-validate t
58+
"Enable json validaten."
59+
:type 'boolean
60+
:group 'lsp-json
61+
:package-version '(lsp-mode . "9.0.1"))
62+
5763
(lsp-register-custom-settings
5864
'(("json.schemas" lsp-json-schemas)
65+
("json.validate.enable" lsp-json-validate)
5966
("http.proxy" lsp-http-proxy)
6067
("http.proxyStrictSSL" lsp-http-proxyStrictSSL)))
6168

0 commit comments

Comments
 (0)