Closed glortho closed 8 years ago
Thanks for reporting this. What file extension is this saved in and are you using another language package?
If you are using language-javascript
, it seems like the grammar is not parsing :
properly here. Going to create a PR on that package to fix this.
I'm not familiar with flowtype but do you need export
here for it to work?
Based on current es6 syntax, https://github.com/ModuleLoader/es6-module-loader/wiki/Brief-Overview-of-ES6-Module-syntax, the first line doesn't seem like valid syntax.
If you remove export
, your code block should align properly.
Thanks for the quick response @adrianlee44 . I'm using language-babel
. And Flow lets you share types as if they were modules: http://flowtype.org/docs/syntax.html#importing-and-exporting-types . In my case I'm exporting an object type alias, which is common across our codebase.
I know it can be tricky to detect all cases. As a recent convert from vim I was hoping for functionality along the lines of https://github.com/junegunn/vim-easy-align, which lets you specify the character or expression, on the fly or as a keymapping, that you'd like to use as the alignment axis. For example, I also like to align my import
statements on the from
. I don't suppose you secretly allow for something like that?
Hi @glortho, if you install language-babel and update aligner to v0.22.0, the code above will align properly.
Let me know if that works.
works! many thanks @adrianlee44
When I run aligner (0.21.0) on this flowtype definition to align colons, it aligns commas instead. Is this the expected behavior? If so, how can I align on colons instead?