mirror of
https://github.com/doomemacs/doomemacs
synced 2025-08-01 12:17:25 -05:00
tools/lsp: prompt for project if one can't be guessed #1928
And don't recognize $HOME as a valid project root.
This commit is contained in:
@ -20,6 +20,15 @@ This can be a single company backend or a list thereof. It can be anything
|
||||
:definition 'lsp-find-definition
|
||||
:references 'lsp-find-references)
|
||||
|
||||
(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."
|
||||
:filter-return #'lsp--calculate-root
|
||||
(cond ((and root (not (file-equal-p root "~")))
|
||||
root)
|
||||
(lsp-auto-guess-root
|
||||
(lsp--find-root-interactively (lsp-session)))))
|
||||
|
||||
(defadvice! +lsp-init-a (&optional arg)
|
||||
"Enable `lsp-mode' in the current buffer.
|
||||
|
||||
|
Reference in New Issue
Block a user