Moved to lucacasonato/mf2-language-server
This extension adds syntax highlighting support for MessageFormat 2 messages
contained in .mf2
files.
To use this extension, open a file containing a MessageFormat 2 message, and
select the MessageFormat 2
language after running the > Change Language Mode
command from the Command Palette
(Ctrl/Cmd+Shift+P). Files ending in .mf2
are
automatically highlighted as MessageFormat 2
.
In JavaScript files, template strings inside of a new Intl.MessageFormat()
expression (or new MessageFormat
) will be highlighted. Template strings
prefixed with /* mf2 */
are also highlighted.
| |
const message = new Intl.MessageFormat(
"en",
`Hello, { $name :fallback value=|World| }!`,
); | |
const message = /* mf2 */ `
.input {$count :number}
.match {$count}
0 {{No new notifications}}
one {{{$count} new notification}}
* {{{$count} new notifications}}
`; |