0

When I open a Python file I keep seeing LSP :: Connected to [pyls:N]. message on the minibuffer. Is it possible to 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 setup:

(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)

1
(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)
7
  • Woaw that was a fast answer thank you – alper Mar 10 at 9:03
  • @alper Glad to help. Fast since it's easy. 🤓 – TerryTsao Mar 10 at 9:05
  • Its not related to lsp but I also keep seeing Fill column set to 80 (was 80) is it possible to suppress it too? – alper Mar 10 at 9:49
  • @alper Bottom line you would have to discover its origin to try advising it. – TerryTsao Mar 10 at 9:55
  • 1
    @alper No it should not be a factor. Works fine on my machine. – TerryTsao Mar 10 at 10:55

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.