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

let js2-mode support flow syntax #6

Open
17 of 20 tasks
HairyRabbit opened this issue Dec 11, 2017 · 11 comments
Open
17 of 20 tasks

let js2-mode support flow syntax #6

HairyRabbit opened this issue Dec 11, 2017 · 11 comments

Comments

@HairyRabbit
Copy link
Owner

HairyRabbit commented Dec 11, 2017

linked issues

flow syntax supports

type annotation

  • union type
  • intersection type
  • object type
  • array type
  • tuple type
  • function type
  • literal type
  • maybe type
  • typeof type
  • primitive type

decls, exprs, stmts

  • modules
  • functions
  • classes
  • variables
  • type aliases
  • opaque type aliases
  • interfaces
  • type casing
  • type utilities
  • declares

note

  • type casing exprs supported, but broken for print ast on test, works fine with syntax highlight.
  • usually declares decls is not useful for me

screenshot

2

@HairyRabbit HairyRabbit changed the title feature support flow syntax for variable declaration type annotation feature for js2-mode support flow syntax for variable declaration type annotation Dec 15, 2017
@HairyRabbit HairyRabbit changed the title feature for js2-mode support flow syntax for variable declaration type annotation let js2-mode support flow syntax Dec 18, 2017
@saixmh
Copy link

saixmh commented Dec 19, 2017

Amazing! Big suceess!

@rNoz
Copy link

rNoz commented Dec 24, 2017

Happy to read this progress. Looking forward to get it upstream :D

@HairyRabbit
Copy link
Owner Author

HairyRabbit commented Dec 25, 2017

@rNoz Merry Christmas 🎄

I will finish this work(maybe typescript supports), but I don't think the PR will be merge.

@rNoz
Copy link

rNoz commented Jan 10, 2018

@HairyRabbit Happy new year!
Your work is amazing ;) I will wait to see if I can replace js2-mode with yours, or get merged somehow.

@HairyRabbit
Copy link
Owner Author

@rNoz Yeap, just replace with:

(load "path/to/js2-mode/js2-mode.el")
(js2-mode)

can test the feature. Thanks for any feedback.

@aaronjensen
Copy link

Are you planning to release this as a different package if you don't plan to merge it upstream?

Should jsx support work? Currently opening tags seem to get the type annotation face and closing tags the string face...

@HairyRabbit
Copy link
Owner Author

@aaronjensen
wow~ I'm happy to do if anyone want to this.

The jsx supports was a bug, fixed on current version.

image

@aaronjensen
Copy link

Hmm, they're still not fontified for me unless I'm also using rjsx-mode as well, is that expected?

Why don't you plan on merging upstream? They may accept it.

If not, a package would be great.

@HairyRabbit
Copy link
Owner Author

@aaronjensen
Looks like js2-jsx-mode doesn't highlight the jsx tags, I also use rjsx-mode for my case :)
I will send PR when I works done with export { foo as bar } from 'm'

@shackra
Copy link

shackra commented Jul 17, 2019

Is the author still accepting pull requests?

has the author made the paperwork (I talk about the copyright assignment) for a future pull request to upstream?

@HairyRabbit
Copy link
Owner Author

I haven't pull this request to upstream yet, because some features are still work in progress.

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

No branches or pull requests

5 participants