Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Getting (invalid-function (icon (plist-get item :icon))) when calling (lsp-treemacs-call-hierarchy) #140

Open
Naomarik opened this issue Sep 26, 2022 · 6 comments

Comments

@Naomarik
Copy link

Naomarik commented Sep 26, 2022

If I remove the surrounding parenthesis on ((icon (plist-get item :icon)) found https://github.com/emacs-lsp/lsp-treemacs/blob/master/lsp-treemacs-generic.el#L82 it works for me, but have no experience in elisp to tell what that's doing.

Running latest doom emacs.

@visd0m
Copy link

visd0m commented Oct 13, 2022

Hi everyone, I have the same problem, any news on this?

@alanz
Copy link

alanz commented Nov 5, 2022

I'ts weird, on GNU Emacs 27.1 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.24.30, cairo version 1.16.0) of 2021-11-27, modified by Debian, whether I have the parens or not, emacs-lisp-macroexpand gives the same result

   (or (plist-get item :icon-literal)
       (if-let*
           ((icon
             (plist-get item :icon)))
           (treemacs-get-icon-value icon nil lsp-treemacs-theme)
         "   "))))

But if I remove the parens, reload the function, it then no longer gives the error, and the call hierarchy displays.

So at the very least this change should be safe, however it actually causes a problem

@Naomarik
Copy link
Author

Updating emacs from 27.1 to 28.1 solved this for me.

@tl072
Copy link

tl072 commented Nov 15, 2022

I'ts weird, on GNU Emacs 27.1 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.24.30, cairo version 1.16.0) of 2021-11-27, modified by Debian, whether I have the parens or not, emacs-lisp-macroexpand gives the same result

   (or (plist-get item :icon-literal)
       (if-let*
           ((icon
             (plist-get item :icon)))
           (treemacs-get-icon-value icon nil lsp-treemacs-theme)
         "   "))))

But if I remove the parens, reload the function, it then no longer gives the error, and the call hierarchy displays.

So at the very least this change should be safe, however it actually causes a problem

I just did this on emacs28 and it fixed the issue - i.e.

   (if-let*
       (icon
         (plist-get item :icon))

so weird...

@bridgesense
Copy link

I just did this on emacs28 and it fixed the issue - i.e.

I can confirm that this fix also works on emacs 27.2.50.

Thanks!

@traderLaval
Copy link

I confirm too, now it works fine :-)

tkrueger pushed a commit to tkrueger/prelude that referenced this issue Mar 16, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants