-
-
Notifications
You must be signed in to change notification settings - Fork 904
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Invalid face reference: lsp-flycheck-info-unnecessary #2255
Comments
Willing to turn that into PR? |
I see the exact issue with up-to-date flycheck: 20221112.1552 version. With both Should the issue be re-opened? |
I see the same issue |
@ericdallo @yyoncho any suggestions? I still see this as well. Please reopen if that's the right thing to do? |
This issue was fized 9 months ago, the complains started 2months ago, so I suggest opening a new issue with detailed repro and link to this issue, it may be something different that is causing the same issue to final user |
@indigoviolet are you using desktop mode or something like that? Also, before loading lsp-mode can you check if it is defined? |
I'm seeing the same issue. It seems to come up as I'm typing an import for a component in SvelteKit. I have Web mode enabled, and Copilot enabled as well. Flycheck:
Doom:
|
These are my findings. Current situationThis is what For each error of some level and tagged with some tags that LSP server yields:
ConsequencesEmacs can't find the face named as generated flycheck level as many times as characters in error message?
are emitted. If authors pretended to use the same face for symbol overlay and sideline overlay, both Transient solutionTo avoid changing the original source code, the referenced face can be defined in init file. E.g: (defface lsp-flycheck-info-unnecessary
'((t))
"Face which apply to side line for symbols not used.
Possibly erroneously redundant of lsp-flycheck-info-unnecessary-face."
:group 'lsp-ui-sideline) Then it can be themed or customized. Remember this is the face for sideline overlay. Permanent solutionI prefer different faces for symbol overlay and sideline overlay. |
Just added a simple to reproduce example with |
The transient solution by @pixel-ant triggers the issue syl20bnr/spacemacs#16224 for me. Having this warning is much better than the error in |
Using
lsp-pyright
with the above Python file, there are numerous Flycheck errors classified aslsp-flycheck-info-unnecessary
. Whenpoint
is on a line with one such error,Invalid face reference: lsp-flycheck-info-unnecessary
appears in theMessages
buffer. This message seems to be called bymerge_face_ref
in thexfaces.c
file in core Emacs.The following seems to make the message go away:
Apparently, making the
face
name matchname
does the trick, but I'm not sure why. The error levels that Flycheck defines don't look like this. It seems weird to define some symbol that has not only the properties assigned to it byflycheck-define-error-level
but also is the name of a face, so we should probably find a cleaner solution.I am not able to build Emacs from source on my machine for some reason, so I can't go into
xfaces.c
to debug this.The text was updated successfully, but these errors were encountered: