litvis icon indicating copy to clipboard operation
litvis copied to clipboard

syntax highlighting in VSCode requires space between elm and open brace

Open jwoLondon opened this issue 5 years ago • 3 comments

Code block headers expressed as elm{l} and elm {l} (note the space in the second example) both work. In Atom syntax highlighting is applied to the block of code correctly, but in VSCode with the elm-tooling plugin (the one we recommend for litvis), only the second case with a space generates correct syntax colouring.

I assume the problem is with the elm-tooling plugin for VSCode, but could apply a Prettier type auto formatting to ensure a single space between the elm and { ?

jwoLondon avatar Sep 03 '20 08:09 jwoLondon

Created https://github.com/remarkjs/remark/issues/528 and https://github.com/prettier/prettier/issues/9155 to see if we can fix this on the formatting front.

kachkaev avatar Sep 05 '20 17:09 kachkaev

Hi Jo! WDYT of stopping the support of non-whitespace characters as the delimiter in litivs? See https://github.com/remarkjs/remark/issues/528#issuecomment-703297322.

Doing so will include the removal of my hack in Prettier https://github.com/prettier/prettier/pull/4783 as well as changing how mume separates the args from the language 'word'. This will make things in sync with how VSCode highlights the syntax.

I think that we initially got confused by what Atom was doing. If it only looked for spaces and tabs as word separators, we would do too. At the moment, it seems like we've ended up on a small island of not following the markdown specs.

kachkaev avatar Oct 04 '20 18:10 kachkaev

Yes, that makes sense, for the reasons discussed.

jwoLondon avatar Oct 04 '20 20:10 jwoLondon