From 347551b61f31b729848ac7094501f1a0d35a9122 Mon Sep 17 00:00:00 2001 From: kiennq Date: Sat, 18 Apr 2020 13:59:15 +0900 Subject: [PATCH] fix: don't unnecessarily sending nil rangeLimit (#1595) --- lsp-mode.el | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/lsp-mode.el b/lsp-mode.el index 68a8c38e29..92c9043f5c 100644 --- a/lsp-mode.el +++ b/lsp-mode.el @@ -3014,8 +3014,10 @@ disappearing, unset all the variables related to it." (hover . ((contentFormat . ["markdown" "plaintext"]))) (foldingRange . ,(when lsp-enable-folding `((dynamicRegistration . t) - (rangeLimit . ,lsp-folding-range-limit) - (lineFoldingOnly . ,(or lsp-folding-line-folding-only :json-false))))) + ,@(when lsp-folding-range-limit + `((rangeLimit . ,lsp-folding-range-limit))) + ,@(when lsp-folding-line-folding-only + `((lineFoldingOnly . t)))))) (callHierarchy . ((dynamicRegistration . :json-false))) (publishDiagnostics . ((relatedInformation . t) (tagSupport . ((valueSet . [1 2])))