vscode-language-renpy icon indicating copy to clipboard operation
vscode-language-renpy copied to clipboard

Missing syntax highlighting for dataclasses and class references

Open multimokia opened this issue 1 year ago • 1 comments

Extension version

2.1.1

Issue description

When creating dataclasses, fields and references to classes aren't highlighted, but instead are shown in the default color (as if they were being handled by a python 2 syntax highlighter) image

As well, the id field is colored in gold due to the builtin function.

Loading the file as explicitly python displays the following: image

Ideally it'd be nice for the extension to be able to render classes like these similarly

Scope inspector screenshots

image image

Code

init python:
    @dataclass
    class LatLonPair:
        lon: float,
        lat: float

    @dataclass
    class SimpleWeatherInfo:
        id: int,
        main: str,
        description: str,
        icon: str

multimokia avatar Aug 24 '22 16:08 multimokia

Hmm, that's interesting. It should be the same.. I might have a look later, see if I can spot the issue.

One thing I can think of is updated grammar files or VSCode's python now having a build in language server. I know there is an official plugin

duckdoom4 avatar Aug 24 '22 19:08 duckdoom4