feat: create lsp workspaces automatically

This commit is contained in:
Simon Hudon 2022-01-12 13:26:55 -05:00 committed by GitHub
parent 111d09fda3
commit 6820c8bd92
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -172,7 +172,15 @@ enabled and disabled respectively.")
;; Flycheck
(setq-local flycheck-disabled-checkers '())
;; Lean massively benefits from semantic tokens, so change default to enabled
(setq-local lsp-semantic-tokens-enable t))
(setq-local lsp-semantic-tokens-enable t)
(lean4-create-lsp-workspace))
(defun lean4-create-lsp-workspace ()
"This will allow us to use emacs when a repo contains
multiple lean packages"
(when-let ((root (vc-find-root (buffer-file-name)
"lakefile.lean")))
(lsp-workspace-folders-add root)))
;; Automode List
;;;###autoload