Only load actively-worked on projects into a multi root lsp workspace

This commit is contained in:
Jeremy Dormitzer 2023-03-07 16:57:46 -05:00
parent f29d7410c3
commit 8aaf38447b

View File

@ -51,6 +51,9 @@
:config
(add-hook 'lsp-mode-hook #'lsp-enable-which-key-integration)
(add-to-list 'lsp-language-id-configuration '(direnv-envrc-mode . "shellscript"))
;; Only add projects to the current workspace when I open a file from that project
;; https://emacs-lsp.github.io/lsp-mode/page/faq/#how-do-i-force-lsp-mode-to-forget-the-workspace-folders-for-multi-root-servers-so-the-workspace-folders-are-added-on-demand
(advice-add 'lsp :before (lambda (&rest _args) (eval '(setf (lsp-session-server-id->folders (lsp-session)) (ht)))))
:custom
(lsp-keymap-prefix "C-c l")
(lsp-headerline-breadcrumb-enable nil)