bigfish / vim-js-context-coloring

JavaScript Context Coloring in Vim
MIT License
151 stars 8 forks source link

Make acorn allow import/export #19

Closed gunar closed 8 years ago

gunar commented 8 years ago

allowImportExportEverywhere is necessary for acorn (the js parser) to allow for import and export syntax, now common to ECMAScript2015.

Thank you!

bigfish commented 8 years ago

thanks, I'd forgotten to add sourceType:module to the acorn options. the other options should help the parser be more tolerant, too.

bigfish commented 8 years ago

I just pushed a change so that sourceType is only set to module if import/exports statements are found, just in case it might cause issues when code is not a module. I've had this on the neovim branch for some time so I think it's safe.