Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Nullish coalescing operator (??) #111

Closed
mrleblanc101 opened this issue Oct 9, 2020 · 6 comments
Closed

Nullish coalescing operator (??) #111

mrleblanc101 opened this issue Oct 9, 2020 · 6 comments

Comments

@mrleblanc101
Copy link

mrleblanc101 commented Oct 9, 2020

Syntax highlight breaks when using ?? operator.

Capture d’écran, le 2020-10-09 à 15 43 01

@mrleblanc101
Copy link
Author

Optional chaining doesn't work either

@djcaesar9114
Copy link

Optional chaining doesn't work either

I confirm. Is this repo still maintained?

@hedefalk
Copy link
Owner

hedefalk commented Jun 7, 2021

Optional chaining doesn't work either

I confirm. Is this repo still maintained?

Not by me. I gave admin rights to @aidistan who have been maintaining for quite some time (thanks for that!)

Dunno about current status, haven't seen much activity lately…

I wouldn't wanna be any kind of blocker so if someone is invested, I'll hand the torch. Probably better with more active maintainers too…

@mmccartn
Copy link

mmccartn commented Nov 17, 2021

This issue is caused by language-javascript and is not related to language-vue. I recommend closing this issue and directing users to the open language-js Pull Request that aims to resolve this (and related) issues with modern js ?-based operators.

If you don't use the tree-sitter parser, then you can apply the changes from the PR with the following commands:

git clone https://github.com/icecream17/language-javascript.git
cd ./language-javascript
git checkout operators
rm ./grammars/tree-sitter*
npm install # ignore node-gyp errors

@BrandonDusseau
Copy link

BrandonDusseau commented Feb 10, 2022

For anyone who stumbles across this from Google like I did, the known workaround is to install language-babel. This seems to fix syntax highlighting with optional chaining, at least. See atom/language-javascript#640 comment

Edit: this solves it for the script portion of a single-file component, but doesn't seem to fix it for use within a template. I'll probably work around this by using computed values instead of using optional chaining within props.

@djcaesar9114
Copy link

For anyone who stumbles across this from Google like I did, the known workaround is to install language-babel.

Sorry, but it didn't work for me...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants