Skip to content

Commit 936dd86

Browse files
authored
Capture lsp--cur-workspace in lsp-configure-buffer (#2327)
- fixes #2326 - fixes #2318
1 parent 15be167 commit 936dd86

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

lsp-mode.el

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3652,7 +3652,12 @@ in that particular folder."
36523652

36533653
(defun lsp-configure-buffer ()
36543654
"Configure LSP features for current buffer."
3655-
(let (lsp--cur-workspace)
3655+
;; make sure the core is running in the context of all available workspaces
3656+
;; to avoid misconfiguration in case we are running in `with-lsp-workspace' context
3657+
(let ((lsp--buffer-workspaces (cond
3658+
(lsp--buffer-workspaces)
3659+
(lsp--cur-workspace (list lsp--cur-workspace))))
3660+
lsp--cur-workspace)
36563661
(when lsp-auto-configure
36573662
(when (and lsp-enable-text-document-color
36583663
(lsp-feature? "textDocument/documentColor"))

0 commit comments

Comments
 (0)