lifeart / vscode-ember

VSCode client for the Ember Language Server
https://marketplace.visualstudio.com/items?itemName=lifeart.vscode-ember-unstable
Other
30 stars 9 forks source link

Optional chaining syntax highlighting error #4

Closed gvocale closed 4 years ago

gvocale commented 4 years ago

When using Unstable Ember Language Server, using optional chaining seem to affect syntax highlighting.

With Unstable Ember Language Server OFF

Screen Shot 2020-03-24 at 10 05 11 PM

With Unstable Ember Language Server ON

Screen Shot 2020-03-24 at 10 04 25 PM
lifeart commented 4 years ago

@gvocale I can't see difference :) UELS - don't touching syntax higlighting.

Higlighting - https://github.com/lifeart/vsc-ember-syntax

But, we don't rewrite JS parsing logic, only extend it https://github.com/lifeart/vsc-ember-syntax/blob/master/syntaxes/inline-hbs.json

lifeart commented 4 years ago

Now I see, getters color, sample

import Component from '@glimmer/component';

import { inject as service } from '@ember/service';
interface Args {
    foo?: string
}
export default class HeaderCartComponent extends Component<Args> {
    @service('cart') cart;

    get hasCategory() {
        return this.args.foo?.toString();
    }

    foo() {

    }
}

it's very strange

lifeart commented 4 years ago

Issue appears right after ts language features loading, I think it's related to "ordering", I see same behavour without "UELS", all you need to do - wait until ts features will be loaded.

lifeart commented 4 years ago

image

(els already loaded ^)

image

(ts loaded ^)

lifeart commented 4 years ago

disabled UELS and fully loaded TS

image

lifeart commented 4 years ago

@gvocale try disable UELS and wait for 1 minute, you should see same error

gvocale commented 4 years ago

@lifeart my problem is not with the following:

Screen Shot 2020-03-25 at 11 10 58 AM

But rather with the following: ON

Screen Shot 2020-03-25 at 11 11 04 AM

OFF

Screen Shot 2020-03-25 at 11 11 07 AM

Using optional chaining seem to throw off the color of few lines of code after.

Right now I have UELS off and I haven't been running anymore in the issue. To be honest, other extensions as well were causing the same issue. Right now I have the following extensions enabled:

Screen Shot 2020-03-25 at 11 13 12 AM
lifeart commented 4 years ago

It looks like vs code issue itself

lifeart commented 4 years ago

closing it as not related to extension