Problem: Eglot constantly floods the echo area with messages like:
[eglot] vid_sampler 5743c883-2a9f-43af-aec8-b0db83a32e77: | lint: mccabe
.
(Here, vid_sampler
is the name of the project that I'm working on.) The problem is not only this specific message, it's the constant flood of messages like it that drown out useful information. All of these messages start with "[eglot] vid_sampler" then have some kind of UID followed by a "|", but they have different endings.
Relevant stack trace, obtained by doing (setq debug-on-message "lint: mccabe")
and then triggering the message:
Debugger entered--Lisp error: "[eglot] vid_sampler 5743c883-2a9f-43af-aec8-b0db83a32e77: | lint: mccabe "
(message "%s %s %s" "[eglot] vid_sampler 5743c883-2a9f-43af-aec8-b0db83a32e77:" "|" "lint: mccabe ")
(progress-reporter-do-update (2 . [nil nil nil "[eglot] vid_sampler 5743c883-2a9f-43af-aec8-b0db83a32e77:" 1 0 "lint: mccabe "]) nil "lint: mccabe ")
(eglot--reporter-update (2 . [nil nil nil "[eglot] vid_sampler 5743c883-2a9f-43af-aec8-b0db83a32e77:" 1 0 "lint: mccabe "]) nil "lint: mccabe ")
(#f(compiled-function (arg1 arg2 &rest rest) "Handle $/progress notification identified by TOKEN from SERVER." #<bytecode 0x1557504e87d9>) #<eglot-lsp-server eglot-lsp-server-15574f2120f4> $/progress :token "5743c883-2a9f-43af-aec8-b0db83a32e77" :value (:kind "begin" :title "lint: mccabe"))
(apply #f(compiled-function (arg1 arg2 &rest rest) "Handle $/progress notification identified by TOKEN from SERVER." #<bytecode 0x1557504e87d9>) #<eglot-lsp-server eglot-lsp-server-15574f2120f4> $/progress (:token "5743c883-2a9f-43af-aec8-b0db83a32e77" :value (:kind "begin" :title "lint: mccabe")))
(eglot-handle-notification #<eglot-lsp-server eglot-lsp-server-15574f2120f4> $/progress :token "5743c883-2a9f-43af-aec8-b0db83a32e77" :value (:kind "begin" :title "lint: mccabe"))
(apply eglot-handle-notification #<eglot-lsp-server eglot-lsp-server-15574f2120f4> $/progress (:token "5743c883-2a9f-43af-aec8-b0db83a32e77" :value (:kind "begin" :title "lint: mccabe")))
(#f(compiled-function (server method params) #<bytecode 0x15574f2120cd>) #<eglot-lsp-server eglot-lsp-server-15574f2120f4> $/progress (:token "5743c883-2a9f-43af-aec8-b0db83a32e77" :value (:kind "begin" :title "lint: mccabe")))
(jsonrpc-connection-receive #<eglot-lsp-server eglot-lsp-server-15574f2120f4> (:jsonrpc "2.0" :method "$/progress" :params (:token "5743c883-2a9f-43af-aec8-b0db83a32e77" :value (:kind "begin" :title "lint: mccabe"))))
(jsonrpc--process-filter #<process EGLOT (vid_sampler/(python-mode python-ts-mode))> "Content-Length: 121\15\nContent-Type: application/vscode-jsonrpc; charset=utf8\15\n\15\n{\"jsonrpc\":\"2.0\",\"method\":\"$\\/progress\",\"params\":{\"token\":\"2937f41d-ebbd-4200-9bf0-c2bcd9152a65\",\"value\":{\"kind\":\"end\"}}}Content-Length: 151\15\nContent-Type: application/vscode-jsonrpc; charset=utf8\15\n\15\n{\"jsonrpc\":\"2.0\",\"method\":\"$\\/progress\",\"params\":{\"token\":\"8ff27715-2fa0-4e6d-bd59-7bf106582550\",\"value\":{\"kind\":\"begin\",\"title\":\"lint: pycodestyle\"}}}Content-Length: 121\15\nContent-Type: application/vscode-jsonrpc; charset=utf8\15\n\15\n{\"jsonrpc\":\"2.0\",\"method\":\"$\\/progress\",\"params\":{\"token\":\"8ff27715-2fa0-4e6d-bd59-7bf106582550\",\"value\":{\"kind\":\"end\"}}}Content-Length: 146\15\nContent-Type: application/vscode-jsonrpc; charset=utf8\15\n\15\n{\"jsonrpc\":\"2.0\",\"method\":\"$\\/progress\",\"params\":{\"token\":\"5743c883-2a9f-43af-aec8-b0db83a32e77\",\"value\":{\"kind\":\"begin\",\"title\":\"lint: mccabe\"}}}Content-Length: 121\15\nContent-Type: application/vscode-jsonrpc; charset=utf8\15\n\15\n{\"jsonrpc\":\"2.0\",\"method\":\"$\\/progress\",\"params\":{\"token\":\"5743c883-2a9f-43af-aec8-b0db83a32e77\",\"value\":{\"kind\":\"end\"}}}Content-Length: 3108\15\nContent-Type: application/vscode-jsonrpc; charset=utf8\15\n\15\n{\"jsonrpc\":\"2.0\",\"method\":\"textDocument\\/publishDiagnostics\",\"params\":{\"uri\":\"file:\\/\\/\\/home\\/nate\\/spyder_projects\\/vid_sampler\\/vid_sample.py\",\"diagnostics\":[{\"source\":\"pyflakes\",\"range\":{\"start\":{\"line\":8,\"character\":0},\"end\":{\"line\":8,\"character\":10}},\"message\":\"'re' imported but unused\",\"severity\":2},{\"source\":\"pyflakes\",\"range\":{\"start\":{\"line\":11,\"character\":0},\"end\":{\"line\":11,\"character\":16}},\"message\":\"'warnings' imported but unused\",\"severity\":2},{\"source\":\"pyflakes\",\"range\":{\"start\":{\"line\":18,\"character\":0},\"end\":{\"line\":18,\"character\":19}},\"message\":\"'numpy as np' imported but unused\",\"severity\":2},{\"source\":\"pyflakes\",\"range\":{\"start\":{\"line\":149,\"character\":18},\"end\":{\"line\":149,\"character\":49}},\"message\":\"undefined name 'mx'\",\"severity\":1},{\"source\":\"pyflakes\",\"range\":{\"start\":{\"line\":203,\"character\":4},\"end\":{\"line\":203,\"character\":14}},\"message\":\"local variable 'data' is assigned to but never used\",\"severity\":2},{\"source\":\"pycodestyle\",\"range\":{\"start\":{\"line\":29,\"character\":79},\"end\":{\"line\":29,\"character\":88}},\"message\":\"E501 line too long (87 > 79 characters)\",\"code\":\"E501\",\"severity\":2},{\"source\":\"pycodestyle\",\"range\":{\"start\":{\"line\":114,\"character\":0},\"end\":{\"line\":114,\"character\":30}},\"message\":\"E302 expected 2 blank lines, found 1\",\"code\":\"E302\",\"severity\":2},{\"source\":\"pycodestyle\",\"range\":{\"start\":{\"line\":115,\"character\":79},\"end\":{\"line\":115,\"character\":90}},\"message\":\"E501 line too long (89 > 79 characters)\",\"code\":\"E501\",\"severity\":2},{\"source\":\"pycodestyle\",\"range\":{\"start\":{\"line\":134,\"character\":0},\"end\":{\"line\":134,\"character\":36}},\"message\":\"E302 expected 2 blank lines, found 1\",\"code\":\"E302\",\"severity\":2},{\"source\":\"pycodestyle\",\"range\":{\"start\":{\"line\":160,\"character\":0},\"end\":{\"line\":160,\"character\":27}},\"message\":\"E303 too many blank lines (3)\",\"code\":\"E303\",\"severity\":2},{\"source\":\"pycodestyle\",\"range\":{\"start\":{\"line\":198,\"character\":0},\"end\":{\"line\":198,\"character\":43}},\"message\":\"E302 expected 2 blank lines, found 1\",\"code\":\"E302\",\"severity\":2},{\"source\":\"pycodestyle\",\"range\":{\"start\":{\"line\":213,\"character\":0},\"end\":{\"line\":213,\"character\":32}},\"message\":\"E302 expected 2 blank lines, found 1\",\"code\":\"E302\",\"severity\":2},{\"source\":\"pycodestyle\",\"range\":{\"start\":{\"line\":223,\"character\":4},\"end\":{\"line\":223,\"character\":55}},\"message\":\"E303 too many blank lines (2)\",\"code\":\"E303\",\"severity\":2},{\"source\":\"pycodestyle\",\"range\":{\"start\":{\"line\":226,\"character\":4},\"end\":{\"line\":226,\"character\":59}},\"message\":\"E265 block comment should start with '# '\",\"code\":\"E265\",\"severity\":2},{\"source\":\"pycodestyle\",\"range\":{\"start\":{\"line\":227,\"character\":4},\"end\":{\"line\":227,\"character\":55}},\"message\":\"E265 block comment should start with '# '\",\"code\":\"E265\",\"severity\":2},{\"source\":\"pycodestyle\",\"range\":{\"start\":{\"line\":228,\"character\":4},\"end\":{\"line\":228,\"character\":27}},\"message\":\"E265 block comment should start with '# '\",\"code\":\"E265\",\"severity\":2},{\"source\":\"pycodestyle\",\"ran")
I have tried a lot of methods to disable these messages to no avail. Here's one attempt:
;; Stop spamming the f*cking minibuffer (didn't work)
(defun stop-spamming-pls (orig-fun &rest args)
(if (not (string-prefix-p "lint:" (nth 2 args)))
(apply orig-fun args))
)
(advice-add 'eglot--reporter-update :around #'stop-spamming-pls)
This removed some of the annoying messages, but it didn't work because others that look like it made it through. I am looking for a less botched solution that works and ideally solves the root of the problem in a robust manner.
eglot-stay-out-of
. I can't tell you what, but the options I can see are: 'yasnippet 'xref 'imenu 'flymake 'eldoc (of which I suspect only the last two are likely bets, but you could try them all for good measure).