rhaiscript / lsp

Language server for Rhai.
Apache License 2.0
43 stars 4 forks source link

String template literals break formatting #94

Closed tamasfe closed 1 year ago

tamasfe commented 1 year ago

String templates require special care, currently they break formatting.

Right now only the first chunk is used during formatting, so `foo${1 + 2}` will end up as `foo which is obviously wrong.

Instead we should iterate over all chunks, and allow inconsistently breaking inside ${} as well.