emacs-lsp / lsp-pyright

lsp-mode :heart: pyright
https://emacs-lsp.github.io/lsp-pyright
GNU General Public License v3.0
291 stars 25 forks source link

Inconsistent/random/non-deterministic choice of variable faces #84

Open gbordyugov opened 1 year ago

gbordyugov commented 1 year ago

Hello,

I'm running lsp-mode-20230401.434 and lsp-pyright-20230225.1118 on emacs 28.2 under macos x.

My problem is that the choice of the face used to render variables seems to be random and inconsistent. More over, it can change if I re-open the file again in a freshly-started emacs.

image image

Both grey and brown variables are using lsp-face-highlight-read with the cursor on them, but the brown additionally use font-lock-variable-name-face.

For both grey and brown variables, lsp-describe-thing-at-point recognise and report them as variables.

This problem occurs within classes declarations and function bodies.

Am I missing an important piece of face choosing logic?

Using zenburn-theme-20230315.1004, too (disabling it doesn't solve the problem though).