fix(lsp): stop logging project root

This is done upstream now. Also prevents double-prompting (#6877).

Ref: emacs-lsp/lsp-mode@65fb3e8d07
Close: #6877
This commit is contained in:
Eric Dallo 2022-10-28 21:44:01 -03:00 committed by GitHub
parent 3d8f9ae5ea
commit 8b414e6d0a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -76,15 +76,7 @@ Can be a list of backends; accepts any value `company-backends' accepts.")
(setq-local flycheck-checker old-checker))
(apply fn args)))
(add-hook! 'lsp-mode-hook
(defun +lsp-display-guessed-project-root-h ()
"Log what LSP things is the root of the current project."
;; Makes it easier to detect root resolution issues.
(when-let (path (buffer-file-name (buffer-base-buffer)))
(if-let (root (lsp--calculate-root (lsp-session) path))
(lsp--info "Guessed project root is %s" (abbreviate-file-name root))
(lsp--info "Could not guess project root."))))
#'+lsp-optimization-mode)
(add-hook! 'lsp-mode-hook #'+lsp-optimization-mode)
(when (modulep! :completion company)
(add-hook! 'lsp-completion-mode-hook