This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2024-06-14
Channels
- # biff (2)
- # calva (1)
- # clj-kondo (1)
- # clj-otel (34)
- # clojure (49)
- # clojure-europe (44)
- # clojure-nl (2)
- # clojure-norway (21)
- # clojure-sweden (11)
- # clojure-uk (6)
- # clojurescript (7)
- # data-science (3)
- # datahike (34)
- # emacs (17)
- # fulcro (1)
- # gratitude (5)
- # honeysql (1)
- # jobs (11)
- # leiningen (42)
- # lsp (5)
- # nextjournal (3)
- # observability (1)
- # practicalli (2)
- # shadow-cljs (153)
- # solo-full-stack (5)
- # squint (7)
- # xtdb (16)
There's a small annoyance that I can't seem to fix in my Emacs setup. Whenever I open a new file for the first time I get a (wrong-type-argument hash-table-p nil)
error & I'd like to silence it. After looking through debugger messages, it seems that this comes from lsp-diagnostics--update-path
. More details in thread:
🎉 1
Here's the debug log I get:
Debugger entered--Lisp error: (wrong-type-argument hash-table-p nil)
gethash("newly-opened-file-path" nil)
(and t (gethash path lsp-diagnostic-stats))
(let* ((old-data (and t (gethash path lsp-diagnostic-stats))))
(if old-data
(let ((upper-bound 5) (counter 0))
(while (< counter upper-bound)
(let ((idx counter))
(let* ((v old-data) (v idx))
(aset v v (+ (aref v v) (aref new-stats idx))))) (setq counter (1+ counter))))
(puthash path new-stats lsp-diagnostic-stats)))
(let ((new-stats (copy-sequence new-stats))
(path (lsp--fix-path-casing (directory-file-name path))))
(let* ((old-data (and t (gethash path lsp-diagnostic-stats))))
(if old-data
(let ((upper-bound 5) (counter 0))
(while (< counter upper-bound)
(let ((idx counter))
(let* ((v old-data) (v idx))
(aset v v (+ (aref v v) (aref new-stats idx))))) (setq counter (1+ counter))))
(puthash path new-stats lsp-diagnostic-stats))))
lsp-diagnostics--update-path("newly-opened-file-path" [0 0 1 0 1])
This is not specific to a certain language, the same error is thrown when both working in Rust & Clojure.never saw that, but I'd guess it's a bad elisp compilation, I never faced that with lsp-mode
I have the same noise
@U0CKR20TW I fixed my issue by unsetting this snippet that I had added to appease lsp-doctor:
(setq lsp-use-plists t)