Skip to content

Commit

Permalink
Don't use child directories of "lake-packages" as workspace roots
Browse files Browse the repository at this point in the history
  • Loading branch information
bustercopley committed Aug 10, 2023
1 parent d1c9364 commit fde364e
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions lean4-mode.el
Original file line number Diff line number Diff line change
Expand Up @@ -190,6 +190,9 @@ This will allow us to use Emacs when a repo contains multiple lean packages."
(when-let ((file-name (buffer-file-name))
(root (vc-find-root (buffer-file-name)
"lakefile.lean")))
(while (let ((parent (f-parent root)))
(when (string= (f-filename parent) "lake-packages")
(setq root (f-parent parent)))))
(lsp-workspace-folders-add root)))

;; Automode List
Expand Down

0 comments on commit fde364e

Please sign in to comment.