2

When I open a Python file I keep seeing LSP :: Connected to [pyls:N] message in the minibuffer. How can I suppress it?

Since I know I have enabled lsp, I don't want to see that message always whenever I open a new file. I have looked into https://emacs-lsp.github.io/lsp-mode/tutorials/how-to-turn-off but I couldn't find an option to disable it.

my configuration:

(require 'lsp-mode)
(add-hook 'python-mode-hook 'lsp)
(add-hook 'python-mode-hook #'lsp-deferred)
(setq lsp-enable-symbol-highlighting nil)
(setq lsp-ui-doc-enable nil)
(setq lsp-lens-enable nil)
(setq lsp-headerline-breadcrumb-enable nil)
(setq lsp-ui-sideline-enable nil)
(setq lsp-diagnostics-provider :none)
alper
  • 1,238
  • 11
  • 30

1 Answers1

3
(defun disable-lsp-conn-msg-advice (func &rest r)
  (unless (string-prefix-p "Connected to" (car r))
    (apply func r)))

(advice-add 'lsp--info :around #'disable-lsp-conn-msg-advice)
TerryTsao
  • 1,176
  • 4
  • 18