Skip to content

Commit 6dfc960

Browse files
kurnevskyyyoncho
authored andcommitted
Append existing experimental capabilities. (#32)
1 parent d097670 commit 6dfc960

File tree

1 file changed

+3
-7
lines changed

1 file changed

+3
-7
lines changed

lsp-metals-treeview.el

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -813,13 +813,9 @@ METALS-CLIENT."
813813
be sent during initialisation. Add to our custom capabilities so
814814
that this will be sent during initial connection."
815815
(interactive)
816-
(let ((custom-capabilities
817-
(append (lsp--client-custom-capabilities metals-client)
818-
`((experimental
819-
(treeViewProvider . ,(if enable?
820-
t
821-
:json-false)))))))
822-
(setf (lsp--client-custom-capabilities metals-client) custom-capabilities)))
816+
(let* ((custom-capabilities (lsp--client-custom-capabilities metals-client))
817+
(experimental (cl-find-if (lambda (e) (eq (car e) 'experimental)) custom-capabilities)))
818+
(nconc (cdr experimental) `((treeViewProvider . ,(if enable? t :json-false))))))
823819

824820
(defun lsp-metals-treeview (&optional workspace)
825821
"Display the Metals treeview window for the WORKSPACE (optional). If

0 commit comments

Comments
 (0)