mirror of
https://github.com/doomemacs/doomemacs
synced 2025-08-15 13:23:42 -05:00
tools/lsp: fix +lsp-prompt-if-no-project-a #1928
Don't prompt for blacklisted folders, and don't refuse to recognize $HOME (let the user decide whether to blacklist it or not).
This commit is contained in:
@@ -53,12 +53,14 @@ auto-killed (which is usually an expensive process)."
|
||||
lsp--cur-workspace))))
|
||||
|
||||
(defadvice! +lsp-prompt-if-no-project-a (root)
|
||||
"Prompt for the project root only if no project was found.
|
||||
Also refuses to recognize $HOME as a valid project root."
|
||||
"Prompt for the project root only if no project was found."
|
||||
:filter-return #'lsp--calculate-root
|
||||
(cond ((and root (not (file-equal-p root "~")))
|
||||
root)
|
||||
(lsp-auto-guess-root
|
||||
(cond ((not lsp-auto-guess-root) nil)
|
||||
((null root) nil)
|
||||
((not (cl-find-if (lambda (dir)
|
||||
(and (lsp--files-same-host dir root)
|
||||
(file-in-directory-p dir root)))
|
||||
(lsp-session-folders-blacklist (lsp-session))))
|
||||
(lsp--find-root-interactively (lsp-session)))))
|
||||
|
||||
(defadvice! +lsp-init-a (&optional arg)
|
||||
|
Reference in New Issue
Block a user