mirror of
https://github.com/microsoft/monaco-editor.git
synced 2025-12-22 15:05:39 +01:00
Introduce a new 'json-interpolation' language that extends JSON with
${...} variable interpolation syntax. Features include:
- Monarch tokenizer with nextEmbedded for JavaScript inside ${...}
- Variable context API for custom completion and hover providers
- Diagnostics filtering to ignore errors inside interpolations
- Full JSON language service integration (formatting, symbols, etc.)
- Support for JSONC-style comments and trailing commas
Usage:
```typescript
monaco.languages.jsonInterpolation.jsonInterpolationDefaults.setVariableContext({
getVariables: () => [
{ name: 'env', type: 'string', value: 'production' }
]
});
```
|
||
|---|---|---|
| .. | ||
| src | ||
| build.script.ts | ||
| plugin.js | ||
| rollup-types.config.mjs | ||
| vite.config.mjs | ||