mnespor / vscode-color-identifiers-mode

GNU General Public License v3.0
12 stars 2 forks source link

Not working in jupyter notebook. #14

Open ladyrick opened 3 weeks ago

ladyrick commented 3 weeks ago

Thank you for this extension. I have found a missing feature. It doesn't work in vscode jupyter notebook file (aka .ipynb file).

image
mnespor commented 2 weeks ago

Hi there!

I'm not the most familiar with .ipynb, but I'll say that color-identifiers gets its list of stuff to colorize by asking the language server (LSP) for a list of semantic tokens.

With Swift for example, I couldn't get colors until I started running a standalone language server alongside VS Code. Hopefully there's something similar you can install for ipynb files?

ladyrick commented 2 weeks ago

Thank you for your reply.

I have installed the "Jupyter" extension pack, including "Jupyter Keymap","Jupyter Notebook Renderers", "Jupyter Slide Show", "Jupyter Cell Tags".

And also I have "Python" and "Pylance" extension installed. Pylance is the language server for python language.

With these extensions, I believe the language server is OK, because everything in .ipynb file is just looks wnd works like in a .py file.

Except for colored tokens.

Language server features like code highlight, go to definition, all works well:

image

Same code in a .py file. Variables are colored:

image