Open msateri opened 1 year ago
Additional info: I moved the lsp-treemacs-20230504.516 directory out of my elpa dir and went back to my previous version (20221001.1958), and now it works again. So there is something with the new version.
Can you check if you are reproducing it when using M-x lsp-start-plain?
Thanks for the very quick response! M-x lsp-start-plain first generates another error ("Debugger entered--Lisp error: (void-function clang-format+-mode)"), but when I manage to open a file, lsp-treemacs works.
Then try to delete the elpa dir + restart emacs + reinstalling the packages.
Alright, I'll try it on Monday. I've left the office for the day now.
I tried to delete my elpa directory, but I still get the same error.
Is there anything else that I can test to figure out what is causing this?
did you restart before reinstalling? Can you give me the callstack for the error?
Yes. I killed emacs, removed the elpa directory and let it reinstall all the packages from scratch when starting up.
Debugger entered--Lisp error: (void-function icon) icon(class) lsp-treemacs--generic-icon((:label #("A class" 1 7 (face lsp-signature-face)) :key "A" :icon class :kind 5 :location #<hash-table equal 2/2 0xdd10cd> :children ((:label #("foo bool (int, std::string, double)" 3 35 (face lsp-signature-face)) :key "foo" :icon method :kind 6 :location #<hash-table equal 2/2 0x409aa79> :ret-action lsp-treemacs-symbols-goto-symbol)) :ret-action lsp-treemacs-symbols-goto-symbol) nil)
treemacs--do-expand-variadic-parent(#<marker at 1 in LSP Symbols List> #s(treemacs-extension :name lsp-treemacs-generic-root :closed-state #f(compiled-function () #<bytecode 0x14d65a9>) :open-state #f(compiled-function () #<bytecode 0x14d65b5>) :closed-icon #f(compiled-function (&optional btn item) #<bytecode 0x14d65c1>) :open-icon #f(compiled-function (&optional btn item) #<bytecode 0x147ce51>) :children #f(compiled-function (&optional btn item) #<bytecode 0x147ce5d>) :key #f(compiled-function (&optional btn item) #<bytecode 0x147ce69>) :label #f(compiled-function (&optional btn item) #<bytecode 0x147ce75>) :more-properties #f(compiled-function (&optional btn item) #<bytecode 0x147ce81>) :child-type #f(compiled-function () #<bytecode 0x147ce8d>) :variadic? t :async? nil :entry-point? t) 999) treemacs--variadic-extension-entry-render(#s(treemacs-extension :name lsp-treemacs-generic-root :closed-state #f(compiled-function () #<bytecode 0x14d65a9>) :open-state #f(compiled-function () #<bytecode 0x14d65b5>) :closed-icon #f(compiled-function (&optional btn item) #<bytecode 0x14d65c1>) :open-icon #f(compiled-function (&optional btn item) #<bytecode 0x147ce51>) :children #f(compiled-function (&optional btn item) #<bytecode 0x147ce5d>) :key #f(compiled-function (&optional btn item) #<bytecode 0x147ce69>) :label #f(compiled-function (&optional btn item) #<bytecode 0x147ce75>) :more-properties #f(compiled-function (&optional btn item) #<bytecode 0x147ce81>) :child-type #f(compiled-function () #<bytecode 0x147ce8d>) :variadic? t :async? nil :entry-point? t) 999) treemacs--render-extension(#s(treemacs-extension :name lsp-treemacs-generic-root :closed-state #f(compiled-function () #<bytecode 0x14d65a9>) :open-state #f(compiled-function () #<bytecode 0x14d65b5>) :closed-icon #f(compiled-function (&optional btn item) #<bytecode 0x14d65c1>) :open-icon #f(compiled-function (&optional btn item) #<bytecode 0x147ce51>) :children #f(compiled-function (&optional btn item) #<bytecode 0x147ce5d>) :key #f(compiled-function (&optional btn item) #<bytecode 0x147ce69>) :label #f(compiled-function (&optional btn item) #<bytecode 0x147ce75>) :more-properties #f(compiled-function (&optional btn item) #<bytecode 0x147ce81>) :child-type #f(compiled-function () #<bytecode 0x147ce8d>) :variadic? t :async? nil :entry-point? t) 999) lsp-treemacs-render(((:label #("A class" 1 7 (face lsp-signature-face)) :key "A" :icon class :kind 5 :location #<hash-table equal 2/2 0xdd10cd> :children ((:label #("foo bool (int, std::string, double)" 3 35 (face lsp-signature-face)) :key "foo" :icon method :kind 6 :location #<hash-table equal 2/2 0x409aa79> :ret-action lsp-treemacs-symbols-goto-symbol)) :ret-action lsp-treemacs-symbols-goto-symbol) (:label #("A::foo bool (const int, std::string, const double)" 6 50 (face lsp-signature-face)) :key "A::foo" :icon method :kind 6 :location #<hash-table equal 2/2 0x1a1c855> :ret-action lsp-treemacs-symbols-goto-symbol) (:label #("E enum" 1 6 (face lsp-signature-face)) :key "E" :icon enumerator :kind 10 :location #<hash-table equal 2/2 0x16c1e65> :children ((:label #("E_1 E" 3 5 (face lsp-signature-face)) :key "E_1" :icon enumitem :kind 22 :location #<hash-table equal 2/2 0x19d1735> :ret-action lsp-treemacs-symbols-goto-symbol) (:label #("E_2 E" 3 5 (face lsp-signature-face)) :key "E_2" :icon enumitem :kind 22 :location #<hash-table equal 2/2 0x194e11d> :ret-action lsp-treemacs-symbols-goto-symbol)) :ret-action lsp-treemacs-symbols-goto-symbol) (:label #("E_struct struct" 8 15 (face lsp-signature-face)) :key "E_struct" :icon structure :kind 23 :location #<hash-table equal 2/2 0x3fff295> :children ((:label #("a int" 1 5 (face lsp-signature-face)) :key "a" :icon field :kind 8 :location #<hash-table equal 2/2 0x40b0cb1> :ret-action lsp-treemacs-symbols-goto-symbol) (:label #("e enum E" 1 8 (face lsp-signature-face)) :key "e" :icon field :kind 8 :location #<hash-table equal 2/2 0x18864a9> :ret-action lsp-treemacs-symbols-goto-symbol)) :ret-action lsp-treemacs-symbols-goto-symbol) (:label #("main int (int, char *)" 4 23 (face lsp-signature-face)) :key "main" :icon method :kind 12 :location #<hash-table equal 2/2 0x15ebcdd> :ret-action lsp-treemacs-symbols-goto-symbol)) " LSP Symbols " t "LSP Symbols List*") lsp-treemacs--update-symbols()
apply(#f(compiled-function (document-symbols) #<bytecode 0x14c8701>) (#<hash-table equal 6/6 0x11705a5> #<hash-table equal 5/5 0xdd10ed> #<hash-table equal 6/6 0x1a1c875> #<hash-table equal 6/6 0x16c1e85> #<hash-table equal 5/5 0x3fff2b5>))
lsp--parser-on-message(#<hash-table equal 3/3 0x1170585> #s(lsp--workspace :ewoc nil :server-capabilities #<hash-table equal 29/29 0x131ac45> :registered-server-capabilities nil :root "/home/msateri/slask" :client #s(lsp--client :language-id nil :add-on? nil :new-connection (:connect #f(compiled-function (filter sentinel name environment-fn workspace) #<bytecode 0x1542d89>) :test\? #f(compiled-function () #<bytecode 0x1542da1>)) :ignore-regexps nil :ignore-messages nil :notification-handlers #<hash-table equal 0/65 0x1542dc5> :request-handlers #<hash-table equal 0/65 0x15424b1> :response-handlers #<hash-table eql 0/65 0x1542fad> :prefix-function nil :uri-handlers #<hash-table equal 0/65 0x15432a5> :action-handlers #<hash-table equal 0/65 0x154357d> :major-modes nil :activation-fn #f(compiled-function (file-name mode) #<bytecode 0x1542db9>) :priority -1 :server-id clangd :multi-root nil :initialization-options nil :semantic-tokens-faces-overrides nil :custom-capabilities nil :library-folders-fn #f(compiled-function (workspace) #<bytecode 0x1542cfd>) :before-file-open-fn nil :initialized-fn nil :remote? nil :completion-in-comments? nil :path->uri-fn nil :uri->path-fn nil :environment-fn nil :after-open-fn nil :async-request-handlers #<hash-table equal 0/65 0x154359d> :download-server-fn #f(compiled-function (client callback error-callback update\?) #<bytecode 0x1542d11>) :download-in-progress? nil :buffers nil :synchronize-sections nil) :host-root nil :proc #<process clangd<2>> :cmd-proc #<process clangd<2>> :buffers (#
mapc(#f(compiled-function (msg) #<bytecode 0x11cd569>) (#<hash-table equal 3/3 0x1170585>))
If you change the function like that it will most likely work:
(defun lsp-treemacs--generic-icon (item expanded?)
"Get the symbol for the the kind."
(concat
(if (or (plist-get item :children)
(plist-get item :children-async))
(if expanded? "▾ " "▸ ")
" ")
(or (plist-get item :icon-literal)
(-if-let ((icon (plist-get item :icon)))
(treemacs-get-icon-value
icon
nil
lsp-treemacs-theme)
" "))))
I will try to fix it later today.
I get a warning: lsp-treemacs-generic.el:104:40:Warning: attempt to let-bind constant ‘:icon’
But it works. Thank you so much for your help, this is world class support! :-)
I get the error message "Error processing message (void-function icon)" when attempting to use lsp-treemacs functions. I have used it before, but I upgraded (to 20230504.516 from melpa), and now it doesn't seem to work for me.