diff --git a/CLAUDE.md b/CLAUDE.md index 2945dc2d11..f216322bb5 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -135,9 +135,9 @@ src/ ### Monaco Editor - Setup in `src/components/widgets/filesystem/setupMonaco.ts` (includes worker environment setup) -- Monarch tokenizers for `gcode`, `klipper-config`, `log` languages (in `src/monaco/language/*.monarch.ts`) -- Custom CodeLens providers (links to Klipper docs from config sections) -- Document symbol provider for `klipper-config`; folding range provider for `klipper-config` and `gcode` +- Monarch tokenizers for `gcode`, `klipper-config`, `moonraker-config`, `log` languages (in `src/monaco/language/*.monarch.ts`) +- Custom CodeLens providers (links to Klipper/Moonraker docs from config sections) +- CodeLens and document symbol providers for `klipper-config` and `moonraker-config`; folding range provider for `klipper-config`, `moonraker-config`, and `gcode` - Language providers run in dedicated Web Workers (`monacoCodeLensWorker`, `monacoDocumentSymbolsWorker`, `monacoFoldingRangesWorker`) ## Integration Points diff --git a/docs/docs/features/file-editor.md b/docs/docs/features/file-editor.md index 54a45656d0..172f565cc0 100644 --- a/docs/docs/features/file-editor.md +++ b/docs/docs/features/file-editor.md @@ -17,23 +17,23 @@ directly from your browser. ## Syntax highlighting -Rich, TextMate grammar-based syntax highlighting is provided for the following -file types: - -| File Type | Highlighted Elements | -|-----------------------------------------------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| -| **Klipper config** (`.cfg`, `.conf`) | Section headers, keys and values, pin references, sensor and thermistor types, driver types, serial paths, booleans, numbers, and embedded G-code within macros including Jinja2 template blocks | -| **G-code** (`.gcode`, `.g`, `.gc`, `.gco`, `.ufp`, `.nc`) | G/M/T commands, coordinates, feed rates, tool and offset registers, math functions, macro variables, and control keywords | -| **Log files** (`.log`) | Log-level colorization (debug, info, warning, error, critical), timestamps, URLs, UUIDs, git SHAs, exception names, and stack traces | -| **JSON** | Full validation and IntelliSense via a dedicated language worker | -| **CSS, SCSS, Less** | Property completion, hover, and validation via a dedicated language worker | -| **Markdown** | Basic syntax highlighting | +Syntax highlighting is provided for the following file types: + +| File Type | Highlighted Elements | +|-----------------------------------------------------------|------------------------------------------------------------------------------------------------------------------------------------------| +| **Klipper config** (`.cfg`) | Section headers, key names, values, boolean constants, comments, and SAVE_CONFIG block markers | +| **Moonraker config** (`.conf`) | Section headers, key names, values, boolean constants, space-prefixed escaped comment sigils (`\#`, `\;`), inline comments, and comments | +| **G-code** (`.gcode`, `.g`, `.gc`, `.gco`, `.ufp`, `.nc`) | G/M/T commands, coordinates, feed rates, tool and offset registers, math functions, macro variables, and control keywords | +| **Log files** (`.log`) | Log-level colorization (debug, info, warning, error, critical), timestamps, URLs, UUIDs, git SHAs, exception names, and stack traces | +| **JSON** | Full validation and IntelliSense via a dedicated language worker | +| **CSS, SCSS, Less** | Property completion, hover, and validation via a dedicated language worker | +| **Markdown** | Basic syntax highlighting | ## Documentation links -When editing Klipper config files, clickable **CodeLens** links appear above -each `[section]` header — linking directly to the relevant documentation page -for: +When editing Klipper or Moonraker config files, clickable **CodeLens** links +appear above each `[section]` header — linking directly to the relevant +documentation page for: - [Klipper](https://www.klipper3d.org/Config_Reference.html) - [Kalico](https://docs.kalico.gg/Config_Reference.html) @@ -47,7 +47,7 @@ being edited. This feature can be disabled in the editor settings. ## Outline and navigation -Klipper config files provide a two-level document outline: +Klipper and Moonraker config files provide a two-level document outline: - **Sections** — each `[section_name]` block - **Properties** — each `key: value` or `key = value` within a section @@ -57,14 +57,19 @@ property, or browse the outline panel. ## Code folding -Collapsible regions are supported for both Klipper config and G-code files. +Collapsible regions are supported for Klipper config, Moonraker config, and +G-code files. -**Klipper config:** +**Klipper and Moonraker config:** - Section blocks — collapse an entire `[section]` and its contents - Comment blocks — consecutive comment lines fold together - Named regions — `#region` / `#endregion` markers for custom foldable areas +**Klipper config only:** + +- SAVE_CONFIG blocks — the auto-generated `#*# ...` section folds as a unit + **G-code:** - Print layers — each `SET_PRINT_STATS_INFO ... CURRENT_LAYER=N` starts a diff --git a/package-lock.json b/package-lock.json index 344ad89f86..bf2bd21d55 100644 --- a/package-lock.json +++ b/package-lock.json @@ -72,7 +72,6 @@ "husky": "^9.1.7", "jsdom": "^29.0.2", "mockdate": "^3.0.5", - "monaco-vscode-textmate-theme-converter": "^0.1.7", "neostandard": "^0.13.0", "rollup": "^4.60.2", "sass-embedded": "^1.99.0", @@ -5702,16 +5701,6 @@ "node": ">= 0.8" } }, - "node_modules/commander": { - "version": "8.3.0", - "resolved": "https://registry.npmjs.org/commander/-/commander-8.3.0.tgz", - "integrity": "sha512-OkTL9umf+He2DZkUq8f8J9of7yL6RJKI24dVITBmNfZBmri9zYZQrKkuXiKhyfPSu8tUhnVBB1iKXevvnlR4Ww==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">= 12" - } - }, "node_modules/comment-parser": { "version": "1.4.6", "resolved": "https://registry.npmjs.org/comment-parser/-/comment-parser-1.4.6.tgz", @@ -9141,21 +9130,6 @@ "dev": true, "license": "MIT" }, - "node_modules/fs-extra": { - "version": "7.0.1", - "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-7.0.1.tgz", - "integrity": "sha512-YJDaCJZEnBmcbw13fvdAM9AwNOJwOzrE4pqMqBq5nFiEqXUqHwlK4B+3pUw6JNvfSPtX05xFHtYy/1ni01eGCw==", - "dev": true, - "license": "MIT", - "dependencies": { - "graceful-fs": "^4.1.2", - "jsonfile": "^4.0.0", - "universalify": "^0.1.0" - }, - "engines": { - "node": ">=6 <7 || >=8" - } - }, "node_modules/fs-tree-structure": { "version": "0.0.5", "resolved": "https://registry.npmjs.org/fs-tree-structure/-/fs-tree-structure-0.0.5.tgz", @@ -11202,16 +11176,6 @@ "node": ">=6" } }, - "node_modules/jsonfile": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-4.0.0.tgz", - "integrity": "sha512-m6F1R3z8jjlf2imQHS2Qez5sjKWQzbuuhuJ/FKYFRZvPE3PuHcSMVZzfsLhGVOkfd20obL5SWEBew5ShlquNxg==", - "dev": true, - "license": "MIT", - "optionalDependencies": { - "graceful-fs": "^4.1.6" - } - }, "node_modules/jsonparse": { "version": "1.3.1", "resolved": "https://registry.npmjs.org/jsonparse/-/jsonparse-1.3.1.tgz", @@ -12013,24 +11977,6 @@ "node": ">= 18" } }, - "node_modules/monaco-vscode-textmate-theme-converter": { - "version": "0.1.7", - "resolved": "https://registry.npmjs.org/monaco-vscode-textmate-theme-converter/-/monaco-vscode-textmate-theme-converter-0.1.7.tgz", - "integrity": "sha512-ZMsq1RPWwOD3pvXD0n+9ddnhfzZoiUMwNIWPNUqYqEiQeH2HjyZ9KYOdt/pqe0kkN8WnYWLrxT9C/SrtIsAu2Q==", - "dev": true, - "license": "MIT", - "dependencies": { - "commander": "^8.1.0", - "fs-extra": "^7.0.1", - "tslib": "^2.3.0" - }, - "bin": { - "mvttc": "lib/cjs/npx-script.js" - }, - "peerDependencies": { - "tslib": "^2.0.1" - } - }, "node_modules/mrmime": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/mrmime/-/mrmime-2.0.1.tgz", @@ -16027,16 +15973,6 @@ "node": ">=8" } }, - "node_modules/universalify": { - "version": "0.1.2", - "resolved": "https://registry.npmjs.org/universalify/-/universalify-0.1.2.tgz", - "integrity": "sha512-rBJeI5CXAlmy1pV+617WB9J63U6XcazHHF2f2dbJix4XzpUF0RS3Zbj0FGIOCAva5P/d/GBOYaACQ1w+0azUkg==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">= 4.0.0" - } - }, "node_modules/unplugin": { "version": "2.3.11", "resolved": "https://registry.npmjs.org/unplugin/-/unplugin-2.3.11.tgz", diff --git a/package.json b/package.json index 119a932de1..c845147178 100644 --- a/package.json +++ b/package.json @@ -25,8 +25,7 @@ "test": "npm run test:unit", "test:unit": "vitest --environment jsdom --config ./vitest.config.ts", "type-check": "vue-tsc --build --noEmit", - "circular-check": "skott --displayMode=file-tree --showCircularDependencies --no-trackTypeOnlyDependencies --tsconfig=./tsconfig.app.json", - "theme:convert": "cd tools; node convertTheme.mjs" + "circular-check": "skott --displayMode=file-tree --showCircularDependencies --no-trackTypeOnlyDependencies --tsconfig=./tsconfig.app.json" }, "main": "index.js", "dependencies": { @@ -93,7 +92,6 @@ "husky": "^9.1.7", "jsdom": "^29.0.2", "mockdate": "^3.0.5", - "monaco-vscode-textmate-theme-converter": "^0.1.7", "neostandard": "^0.13.0", "rollup": "^4.60.2", "sass-embedded": "^1.99.0", diff --git a/src/components/widgets/filesystem/monacoProviders.ts b/src/components/widgets/filesystem/monacoProviders.ts index 78b52eb4da..63e26d7334 100644 --- a/src/components/widgets/filesystem/monacoProviders.ts +++ b/src/components/widgets/filesystem/monacoProviders.ts @@ -91,7 +91,7 @@ abstract class MonacoProviderBase { } protected _createCacheKey (model: monaco.editor.ITextModel): string { - return `${model.uri.toString()}@${model.getVersionId()}` + return `${model.uri.toString()}@${model.getVersionId()}@${model.getLanguageId()}` } } @@ -100,7 +100,7 @@ export class MonacoDocumentSymbolProvider extends MonacoProviderBase(MonacoDocumentSymbolsWorker, 'klipper-config', model.getValue(), token) + const result = await this._workerWrapper(MonacoDocumentSymbolsWorker, model.getLanguageId(), model.getValue(), token) if (result == null) { return [] @@ -163,7 +163,7 @@ export class MonacoCodeLensProvider extends MonacoProviderBase(MonacoCodeLensWorker, 'klipper-config', model.getValue(), token) + const result = await this._workerWrapper(MonacoCodeLensWorker, model.getLanguageId(), model.getValue(), token) if (result == null) { return [] diff --git a/src/components/widgets/filesystem/setupMonaco.ts b/src/components/widgets/filesystem/setupMonaco.ts index e6bf87ffcb..e71a51e054 100644 --- a/src/components/widgets/filesystem/setupMonaco.ts +++ b/src/components/widgets/filesystem/setupMonaco.ts @@ -18,13 +18,12 @@ import CssWorker from 'monaco-editor/esm/vs/language/css/css.worker?worker' import * as monaco from 'monaco-editor/esm/vs/editor/editor.api' import getVueApp from '@/util/get-vue-app' -import themeDark from '@/monaco/theme/editor.dark.theme.json' -import themeLight from '@/monaco/theme/editor.light.theme.json' import type { KlippyApp } from '@/store/printer/types' import gcodeMonarchLanguage from '@/monaco/language/gcode.monarch' -import klipperConfigMonarchLanguage from '@/monaco/language/klipper-config.monarch' +import * as klipperConfigMonarchLanguage from '@/monaco/language/klipper-config.monarch' +import * as moonrakerConfigMonarchLanguage from '@/monaco/language/moonraker-config.monarch' import logMonarchLanguage from '@/monaco/language/log.monarch' import { type CodeLensSupportedService, MonacoCodeLensProvider, MonacoDocumentSymbolProvider, MonacoFoldingRangeProvider } from './monacoProviders' @@ -45,7 +44,8 @@ self.MonacoEnvironment = { async function setupMonaco () { monaco.languages.register({ id: 'gcode', extensions: ['gcode', 'g', 'gc', 'gco', 'ufp', 'nc'] }) - monaco.languages.register({ id: 'klipper-config', extensions: ['cfg', 'conf'] }) + monaco.languages.register({ id: 'klipper-config', extensions: ['cfg'] }) + monaco.languages.register({ id: 'moonraker-config', extensions: ['conf'] }) monaco.languages.register({ id: 'log', extensions: ['log'] }) monaco.languages.setLanguageConfiguration('gcode', { @@ -53,14 +53,12 @@ async function setupMonaco () { lineComment: ';' } }) - monaco.languages.setLanguageConfiguration('klipper-config', { - comments: { - lineComment: '#' - } - }) + monaco.languages.setLanguageConfiguration('klipper-config', klipperConfigMonarchLanguage.conf) + monaco.languages.setLanguageConfiguration('moonraker-config', moonrakerConfigMonarchLanguage.conf) monaco.languages.setMonarchTokensProvider('gcode', gcodeMonarchLanguage) - monaco.languages.setMonarchTokensProvider('klipper-config', klipperConfigMonarchLanguage) + monaco.languages.setMonarchTokensProvider('klipper-config', klipperConfigMonarchLanguage.language) + monaco.languages.setMonarchTokensProvider('moonraker-config', moonrakerConfigMonarchLanguage.language) monaco.languages.setMonarchTokensProvider('log', logMonarchLanguage) const app = getVueApp() @@ -77,14 +75,44 @@ async function setupMonaco () { window.open(url) }) - monaco.languages.registerDocumentSymbolProvider('klipper-config', new MonacoDocumentSymbolProvider()) - - monaco.languages.registerCodeLensProvider('klipper-config', new MonacoCodeLensProvider()) - - monaco.languages.registerFoldingRangeProvider(['klipper-config', 'gcode'], new MonacoFoldingRangeProvider()) - - monaco.editor.defineTheme('dark-converted', themeDark as monaco.editor.IStandaloneThemeData) - monaco.editor.defineTheme('light-converted', themeLight as monaco.editor.IStandaloneThemeData) + monaco.languages.registerDocumentSymbolProvider(['klipper-config', 'moonraker-config'], new MonacoDocumentSymbolProvider()) + + monaco.languages.registerCodeLensProvider(['klipper-config', 'moonraker-config'], new MonacoCodeLensProvider()) + + monaco.languages.registerFoldingRangeProvider(['klipper-config', 'moonraker-config', 'gcode'], new MonacoFoldingRangeProvider()) + + monaco.editor.defineTheme('light-converted', { + base: 'vs', + inherit: true, + rules: [ + { token: 'comment.control.save-config', foreground: '7b2fbe', fontStyle: 'italic' }, + { token: 'entity.name.section', foreground: '267f99', fontStyle: 'bold' }, + { token: 'variable.name', foreground: '0070c1' }, + { token: 'delimiter', foreground: '666666' }, + { token: 'constant.language', foreground: '0000ff' }, + { token: 'string', foreground: 'a31515' }, + { token: 'comment', foreground: '008000', fontStyle: 'italic' }, + ], + colors: {}, + }) + monaco.editor.defineTheme('dark-converted', { + base: 'vs-dark', + inherit: true, + rules: [ + { token: 'comment.control.save-config', foreground: 'c586c0', fontStyle: 'italic' }, + { token: 'entity.name.section', foreground: '4ec9b0', fontStyle: 'bold' }, + { token: 'variable.name', foreground: '9cdcfe' }, + { token: 'delimiter', foreground: '808080' }, + { token: 'constant.language', foreground: '569cd6' }, + { token: 'string', foreground: 'ce9178' }, + { token: 'comment', foreground: '6a9955', fontStyle: 'italic' }, + ], + colors: { + 'editor.background': '#28282b', + 'editor.lineHighlightBackground': '#3a3a3e', + 'minimap.background': '#28282b' + }, + }) return monaco } diff --git a/src/monaco/README.md b/src/monaco/README.md deleted file mode 100644 index c210b4e1c8..0000000000 --- a/src/monaco/README.md +++ /dev/null @@ -1,18 +0,0 @@ -### Monaco Support Credit -A big thank you to; - -- Aerosov for the klipper-config TextMate grammar definition - https://github.com/aeresov/vscode-klipper-config-syntax - -- Applied Engineering & Design for the gcode TextMate grammar definition - https://github.com/appliedengdesign/vscode-gcode-syntax - -- Microsoft for the log grammar definition - https://github.com/microsoft/vscode/blob/main/extensions/log/syntaxes/log.tmLanguage.json - -- NeekSandhu for the monaco textmate documentation and libs - https://github.com/NeekSandhu/monaco-textmate - https://github.com/NeekSandhu/monaco-editor-textmate - -- Nishkalkashyap for the vscode -> monaco theme converter - https://github.com/Nishkalkashyap/monaco-vscode-textmate-theme-converter diff --git a/src/monaco/language/klipper-config.monarch.ts b/src/monaco/language/klipper-config.monarch.ts index 70518c05ac..b7dc181508 100644 --- a/src/monaco/language/klipper-config.monarch.ts +++ b/src/monaco/language/klipper-config.monarch.ts @@ -1,315 +1,98 @@ -import type * as Monaco from 'monaco-editor/esm/vs/editor/editor.api' - -const klipperConfigMonarchLanguage: Monaco.languages.IMonarchLanguage = { - defaultToken: '', - ignoreCase: false, - tokenPostfix: '', - - knownConfigBlockNames: [ - 'ad5206', 'adc_scaled', 'adc_temperature', 'ads1x1x', 'adxl345', - 'aht10', 'aht20', 'aht21', 'aip31068_spi', 'angle', - 'axis_twist_compensation', - 'bed_mesh', 'bed_screws', 'bed_tilt', 'bltouch', - 'bme280', 'bme680', 'bmi160', 'bmp180', 'bmp280', 'bmp388', - 'board_pins', - 'carriage', 'controller_fan', - 'delayed_gcode', 'delta_calibrate', 'display', 'display_data', - 'display_glyph', 'display_status', 'display_template', 'dotstar', - 'dual_carriage', - 'endstop_phase', 'exclude_object', 'extra_carriage', 'extruder_stepper', - 'fan', 'fan_generic', 'filament_motion_sensor', - 'filament_switch_sensor', 'firmware_retraction', 'force_move', - 'gcode_arcs', 'gcode_button', 'gcode_macro', - 'hall_filament_width_sensor', 'heater_bed', 'heater_fan', - 'heater_generic', 'homing_heaters', 'homing_override', 'htu21d', - 'icm20948', 'idle_timeout', 'include', 'input_shaper', - 'led', 'lis2dw', 'lis3dh', 'lm75', 'load_cell', 'load_cell_probe', - 'manual_stepper', 'mcp4018', 'mcp4451', 'mcp4728', - 'mcu', 'menu', 'mpu9250', 'multi_pin', - 'neopixel', - 'output_pin', - 'palette2', 'pause_resume', 'pca9533', 'pca9632', 'printer', 'probe', - 'probe_eddy_current', 'pwm_cycle_time', 'pwm_tool', - 'quad_gantry_level', - 'resonance_tester', 'respond', - 'safe_z_home', 'samd_sercom', 'save_variables', - 'screws_tilt_adjust', 'sdcard_loop', 'servo', 'sht3x', - 'skew_correction', 'smart_effector', 'static_digital_output', - 'sx1509', - 'temperature_fan', 'temperature_probe', 'temperature_sensor', - 'thermistor', 'tsl1401cl_filament_width_sensor', - 'verify_heater', 'virtual_sdcard', - 'z_thermal_adjust', 'z_tilt' - ], - - knownDriverTypes: [ - 'tmc2130', 'tmc2208', 'tmc2209', 'tmc2240', 'tmc2660', 'tmc5160' - ], - - gcodeExtendedCommands: [ - 'ABORT', 'ACCEPT', 'ACCELEROMETER_DEBUG_READ', - 'ACCELEROMETER_DEBUG_WRITE', 'ACCELEROMETER_MEASURE', - 'ACCELEROMETER_QUERY', 'ACTIVATE_EXTRUDER', - 'ANGLE_CALIBRATE', 'ANGLE_CHIP_CALIBRATE', - 'ANGLE_DEBUG_READ', 'ANGLE_DEBUG_WRITE', - 'AXIS_TWIST_COMPENSATION_CALIBRATE', - 'BED_MESH_CALIBRATE', 'BED_MESH_CLEAR', 'BED_MESH_MAP', - 'BED_MESH_OFFSET', 'BED_MESH_OUTPUT', 'BED_MESH_PROFILE', - 'BED_SCREWS_ADJUST', 'BED_TILT_CALIBRATE', - 'BLTOUCH_DEBUG', 'BLTOUCH_STORE', - 'CALC_MEASURED_SKEW', 'CANCEL_PRINT', 'CLEAR_PAUSE', - 'DELTA_ANALYZE', 'DELTA_CALIBRATE', - 'DISABLE_FILAMENT_WIDTH_LOG', 'DISABLE_FILAMENT_WIDTH_SENSOR', - 'DUMP_TMC', - 'ENABLE_FILAMENT_WIDTH_LOG', 'ENABLE_FILAMENT_WIDTH_SENSOR', - 'ENDSTOP_PHASE_CALIBRATE', - 'EXCLUDE_OBJECT', 'EXCLUDE_OBJECT_DEFINE', 'EXCLUDE_OBJECT_END', - 'EXCLUDE_OBJECT_START', - 'FIRMWARE_RESTART', 'FORCE_MOVE', - 'GET_CURRENT_SKEW', 'GET_POSITION', 'GET_RETRACTION', - 'HELP', - 'INIT_TMC', - 'LDC_CALIBRATE_DRIVE_CURRENT', - 'LOAD_CELL_CALIBRATE', 'LOAD_CELL_DIAGNOSTIC', 'LOAD_CELL_READ', - 'LOAD_CELL_TARE', 'LOAD_CELL_TEST_TAP', - 'MANUAL_PROBE', 'MANUAL_STEPPER', 'MEASURE_AXES_NOISE', - 'PALETTE_CLEAR', 'PALETTE_CONNECT', 'PALETTE_CUT', - 'PALETTE_DISCONNECT', 'PALETTE_SMART_LOAD', - 'PAUSE', 'PID_CALIBRATE', - 'PROBE', 'PROBE_ACCURACY', 'PROBE_CALIBRATE', - 'PROBE_EDDY_CURRENT_CALIBRATE', - 'QUAD_GANTRY_LEVEL', 'QUERY_ADC', 'QUERY_ENDSTOPS', - 'QUERY_FILAMENT_SENSOR', 'QUERY_FILAMENT_WIDTH', - 'QUERY_PROBE', 'QUERY_RAW_FILAMENT_WIDTH', - 'RESET_FILAMENT_WIDTH_SENSOR', 'RESET_SMART_EFFECTOR', - 'RESPOND', 'RESTART', - 'RESTORE_DUAL_CARRIAGE_STATE', 'RESTORE_GCODE_STATE', - 'RESUME', - 'SAVE_CONFIG', 'SAVE_DUAL_CARRIAGE_STATE', 'SAVE_GCODE_STATE', - 'SAVE_VARIABLE', - 'SCREWS_TILT_CALCULATE', - 'SDCARD_LOOP_BEGIN', 'SDCARD_LOOP_DESIST', 'SDCARD_LOOP_END', - 'SDCARD_PRINT_FILE', 'SDCARD_RESET_FILE', - 'SET_DIGIPOT', 'SET_DISPLAY_GROUP', 'SET_DISPLAY_TEXT', - 'SET_DUAL_CARRIAGE', 'SET_EXTRUDER_ROTATION_DISTANCE', - 'SET_FAN_SPEED', 'SET_FILAMENT_SENSOR', - 'SET_GCODE_OFFSET', 'SET_GCODE_VARIABLE', - 'SET_HEATER_TEMPERATURE', 'SET_IDLE_TIMEOUT', - 'SET_INPUT_SHAPER', 'SET_KINEMATIC_POSITION', - 'SET_LED', 'SET_LED_TEMPLATE', - 'SET_PIN', 'SET_PRESSURE_ADVANCE', 'SET_PRINT_STATS_INFO', - 'SET_RETRACTION', 'SET_SERVO', 'SET_SKEW', 'SET_SMART_EFFECTOR', - 'SET_STEPPER_CARRIAGES', 'SET_STEPPER_ENABLE', - 'SET_TEMPERATURE_FAN_TARGET', - 'SET_TMC_CURRENT', 'SET_TMC_FIELD', 'SET_VELOCITY_LIMIT', - 'SET_Z_THERMAL_ADJUST', - 'SHAPER_CALIBRATE', 'SKEW_PROFILE', 'STATUS', 'STEPPER_BUZZ', - 'SYNC_EXTRUDER_MOTION', - 'TEMPERATURE_PROBE_CALIBRATE', 'TEMPERATURE_PROBE_COMPLETE', - 'TEMPERATURE_PROBE_ENABLE', 'TEMPERATURE_PROBE_NEXT', - 'TEMPERATURE_WAIT', 'TEST_RESONANCES', 'TESTZ', - 'TUNING_TOWER', 'TURN_OFF_HEATERS', - 'UPDATE_DELAYED_GCODE', - 'Z_ENDSTOP_CALIBRATE', 'Z_OFFSET_APPLY_ENDSTOP', - 'Z_OFFSET_APPLY_PROBE', 'Z_TILT_ADJUST' - ], - - gcodeExtendedParameters: [ - 'AC', 'ACCEL', 'ACCEL_PER_HZ', 'ACCEL_TO_DECEL', 'AD', - 'ADAPTIVE', 'ADAPTIVE_MARGIN', 'ADVANCE', 'ANGLE', 'AXIS', - 'BAND', 'BD', 'BLUE', - 'CARRIAGE', 'CENTER', 'CHIP', 'CHIPS', 'CLEAR', 'COMMAND', 'COUNT', - 'CURRENT', 'CURRENT_LAYER', 'CYCLE_TIME', - 'DAMPING_RATIO_X', 'DAMPING_RATIO_Y', 'DAMPING_RATIO_Z', - 'DIGIPOT', 'DIRECTION', 'DISABLE_CHECKS', 'DISPLAY', 'DISTANCE', - 'DRIFT_FILTER_CUTOFF_FREQUENCY', 'DURATION', - 'E', 'ENABLE', 'ERROR', 'EXTRUDER', - 'F', 'FACTOR', 'FAN', 'FIELD', 'FILENAME', - 'FREQ_END', 'FREQ_START', 'FREQUENCY_HZ', - 'GCODE_AXIS', 'GREEN', 'GROUP', - 'HEATER', 'HOLDCURRENT', 'HORIZONTAL_MOVE_Z', 'HZ_PER_SEC', - 'ID', 'INDEX', 'INPUT_SHAPING', - 'INSTANTANEOUS_CORNER_VELOCITY', - 'JSON', - 'LED', 'LIFT_SPEED', 'LIMIT_ACCEL', 'LIMIT_VELOCITY', - 'LOAD', 'LOAD_CELL', - 'MACRO', 'MAX_DEVIATION', 'MAX_SMOOTHING', 'MAX_SPEED', 'MAXIMUM', - 'METHOD', 'MIN_SPEED', 'MINIMUM', 'MINIMUM_CRUISE_RATIO', 'MODE', - 'MOTION_QUEUE', 'MOVE', 'MOVE_SPEED', 'MSG', - 'NAME', - 'OUTPUT', - 'P', 'PARAMETER', 'PGP', 'PIN', 'POINT', 'POLYGON', 'PREFIX', - 'PROBE_SPEED', 'PROFILE', 'PULLUP', - 'QUALITY', - 'RATE', 'RECOVERY_TIME', 'RED', 'REF_TEMP', 'REG', 'REGISTER', - 'REMOVE', 'RESET', 'RETRACT_LENGTH', 'RETRACT_SPEED', - 'S', 'SAMPLE_COUNT', 'SAMPLE_RETRACT_DIST', 'SAMPLE_TIME', - 'SAMPLES', 'SAMPLES_RESULT', 'SAMPLES_TOLERANCE', - 'SAMPLES_TOLERANCE_RETRIES', - 'SAVE', 'SENSITIVITY', 'SENSOR', 'SERVO', 'SET_HOMED', - 'SET_POSITION', - 'SHAPER_FREQ_X', 'SHAPER_FREQ_Y', 'SHAPER_FREQ_Z', - 'SHAPER_TYPE', 'SHAPER_TYPE_X', 'SHAPER_TYPE_Y', 'SHAPER_TYPE_Z', - 'SKIP', 'SMOOTH_TIME', 'SPEED', - 'SQUARE_CORNER_VELOCITY', 'START', 'STEP_DELTA', 'STEP_HEIGHT', - 'STEPPER', 'STOP_ON_ENDSTOP', 'SYNC', - 'T', 'TAP_THRESHOLD', 'TARGET', 'TEMP_COEFF', 'TEMPERATURE_FAN', - 'TEMPLATE', 'TIMEOUT', 'TOTAL_LAYER', 'TRANSMIT', - 'TRIGGER_FORCE', 'TYPE', - 'UNRETRACT_EXTRA_LENGTH', 'UNRETRACT_SPEED', - 'VAL', 'VALUE', 'VARIABLE', 'VELOCITY', - 'WHITE', 'WIDTH', 'WIPER', 'WRITE_FILE', - 'X', 'X_ADJUST', 'XY', 'XZ', - 'Y', 'Y_ADJUST', 'YZ', - 'Z', 'Z_ADJUST', 'ZFADE' - ], - - gcodeExtendedParamValues: [ - '5V', 'average', 'ccw', 'command', 'copy', 'cw', - 'echo', 'error', - 'manual', 'median', 'mirror', - 'OD', 'output_mode_store', - 'pin_down', 'pin_up', 'primary', - 'reset', - 'self_test', 'set_5V_output_mode', 'set_OD_output_mode', - 'touch_mode' - ], - - // Multi-word types must use regex (Monarch cases only match single tokens) - knownThermistorTypes: /EPCOS 100K B57560G104F|ATC Semitec 104GT-2|ATC Semitec 104NT-4-R025H42G|Generic 3950|NTC 100K beta 3950|Honeywell 100K 135-104LAG-J01|NTC 100K MGB18-104F39050L32|SliceEngineering 450|TDK NTCG104LH104JT1/, - - knownSensorTypes: /PT100 INA826/, - - knownSingleWordSensorTypes: [ - 'AD595', 'AD597', 'AD8494', 'AD8495', 'AD8496', 'AD8497', - 'AHT10', 'AHT20', 'AHT21', - 'BME280', 'BME680', 'BMP180', 'BMP280', 'BMP388', - 'DS18B20', - 'HTU21D', - 'LM75', - 'MAX6675', 'MAX31855', 'MAX31856', 'MAX31865', - 'MAX31867', 'MAX31868', 'MAX31875', - 'PT1000', - 'SHT21', 'SHT3X', 'SI7013', 'SI7020', 'SI7021', - 'temperature_host', 'temperature_mcu' - ], - - knownControlTypes: [ - 'pid', 'watermark' - ], - - knownDisplayTypes: [ - 'aip31068_spi', 'emulated_st7920', - 'hd44780', 'hd44780_spi', - 'sh1106', 'ssd1306', 'st7920', 'uc1701' - ], +import type * as monaco from 'monaco-editor/esm/vs/editor/editor.api' + +// Monarch language definition for Klipper printer.cfg +// +// Parser: configparser.RawConfigParser( +// strict=False, +// inline_comment_prefixes=(';', '#') +// ) +// +// Inline comment detection (CPython configparser._read, line 36): +// if index == 0 or (index > 0 and line[index-1].isspace()): +// comment_start = min(comment_start, index) +// +// A # or ; is treated as a comment only when: +// - it is the very first character on the line, OR +// - the character immediately before it is whitespace (space or tab) +// +// Therefore for values: +// key=value;comment → ';comment' is part of the value (letter before ;) +// key=value#comment → '#comment' is part of the value (letter before #) +// key=value ;comment → ';comment' is stripped (space before ;) +// key=value #comment → '#comment' is stripped (space before #) +// +// Section headers: inline stripping runs on the raw line first, then the +// stripped `value` is matched against SECTCRE which is NOT end-anchored — +// anything remaining after the last ] is silently discarded. +// All four variants ([h]#, [h] #, [h];, [h] ;) silently produce 'header'. +// +// Other behaviours: +// - No interpolation (RawConfigParser) — %(x)s / ${x} are plain text +// - Duplicate sections/keys allowed (strict=False, last wins) +// - #*# lines are Klipper's SAVE_CONFIG auto-written block marker + +export const conf: monaco.languages.LanguageConfiguration = { + comments: { lineComment: '#' }, + brackets: [['[', ']']], + autoClosingPairs: [{ open: '[', close: ']' }], +} +export const language: monaco.languages.IMonarchLanguage = { tokenizer: { root: [ - // Comments - [/#.*$/, 'comment.line.number-sign'], - [/;.*$/, 'comment.line.gcode'], - - // Config block headers: [section_name ...] - [/^\[/, 'keyword.control', '@configBlock'], - - // Config line: key = value or key: value - [/^(\w+)(\s*[:=]\s*)/, ['variable.name', ''], '@configValue'], - - // G-code lines (indented or within gcode sections) - { include: '@gcodeLine' } - ], + // Blank lines + [/^\s*$/, ''], + + // SAVE_CONFIG auto-generated block marker (#*#) + [/^\s*#\*#.*$/, 'comment.control.save-config'], + + // Full-line comments — # or ; as first non-whitespace character + [/^\s*[#;].*$/, 'comment'], + + // Section headers — SECTCRE is not end-anchored, so everything after + // ] is silently discarded at runtime. Tokenise it as a comment. + [ + /^(\s*)(\[)([^\]]+)(\])(.*)$/, + ['', 'bracket', 'entity.name.section', 'bracket', 'comment'], + ], + + // Key = value or key : value + // + // Safe key pattern: [^=:\s#;](?:[^=:]*[^=:\s])? + // - First char: non-delimiter, non-whitespace, non-comment-sigil + // - Middle: anything except = or : (greedy, optional) + // - Last char: non-delimiter, non-whitespace (explicit, prevents + // \s* from stealing trailing spaces via backtracking) + // - Single-char keys satisfy the outer group alone + [ + /^\s*([^=:\s#;](?:[^=:]*[^=:\s])?)\s*(=|:)/, + ['variable.name', 'delimiter'], + ], + + // Value portion — delegate to klipperValue state + { include: '@klipperValue' }, - configBlock: [ - [/\]/, 'keyword.control', '@pop'], - [/#.*$/, 'comment.line.number-sign'], - [/;.*$/, 'comment.line.gcode'], - [/\bstepper_\w+\b/, 'storage.type'], - [/\bextruder\d{0,2}\b/, 'storage.type'], - [/\bstepper_z\d?\b/, 'storage.type'], - [/\b\w+\b/, { - cases: { - '@knownConfigBlockNames': 'storage.type', - '@knownDriverTypes': 'support.type', - '@default': 'keyword.control' - } - }], - [/[^\]#;\s]+/, 'keyword.control'] ], - configValue: [ - [/$/, '', '@pop'], - [/#.*$/, 'comment.line.number-sign'], - [/;.*$/, 'comment.line.gcode'], - // Multi-word types (must be matched as regex before single-word catch-all) - [/@knownThermistorTypes/, 'support.type'], - [/@knownSensorTypes/, 'support.type'], - // Serial paths - [/\/dev\/serial\/by-(?:id|path)\/[\w/\-:.]+/, 'support.type'], - // Pin patterns - [/[~^!]*(?:z:)?[a-zA-Z]{1,2}\d{1,2}(?:\.\d{1,2})?/, 'support.type'], - [/[~^!]*(?:ar|analog)\d{1,2}/i, 'support.type'], - // Booleans - [/\b(?:true|false)\b/i, 'constant.language'], - { include: '@numbers' }, - // Single-word types and everything else - [/[^\s#;]+/, { - cases: { - '@knownSingleWordSensorTypes': 'support.type', - '@knownControlTypes': 'support.type', - '@knownDisplayTypes': 'support.type', - '@default': '' - } - }] - ], + klipperValue: [ + // Inline comment — one or more whitespace chars immediately before # or ;. + // Monarch processes the remaining string left-to-right, so a lookbehind + // on the sigil won't see spaces already consumed by earlier rules. + // Instead we match the whitespace + sigil + rest as a unit, returning + // two tokens so the space keeps the 'string' colour and only the + // sigil onward gets 'comment'. + [/([ \t]+)([#;].*)$/, ['string', 'comment']], - gcodeLine: [ - // Extended commands (matched via keyword array) - [/^\s+([A-Z_]+)\s/, { - cases: { - '$1@gcodeExtendedCommands': 'keyword.operator', - '@default': '' - } - }], - // Extended parameters: NAME= - [/([A-Z_]+)(=)/, { - cases: { - '$1@gcodeExtendedParameters': { token: 'variable.parameter', next: '@gcodeParamValue' }, - '@default': '' - } - }], - // Standard G/M/T/D commands - [/^\s+[GMTD](?![a-zA-Z])/, 'keyword.operator'], - // Macro blocks - [/\{/, 'string.unquoted', '@macroBlock'], - { include: '@numbers' } - ], + // Boolean-like constants Klipper recognises via getboolean() + [/\b(true|false|yes|no|on|off)\b/i, 'constant.language'], - gcodeParamValue: [ - [/\s/, '', '@pop'], - [/\{/, 'string.unquoted', '@macroBlock'], - [/\b\w+\b/, { - cases: { - '@gcodeExtendedParamValues': 'constant.language', - '@default': '' - } - }], - { include: '@numbers' }, - [/[^\s{]+/, ''] + // Plain value text (no interpolation) + [/./, 'string'], ], - - numbers: [ - [/-?\d+[.,]\d+\b/, 'constant.numeric'], - [/-?[.,]\d+\b/, 'constant.numeric'], - [/-?\d+\b/, 'constant.numeric'] - ], - - macroBlock: [ - [/\{/, 'string.unquoted', '@push'], - [/\}/, 'string.unquoted', '@pop'], - [/[^{}]+/, 'string.unquoted'] - ] - } + }, } -export default klipperConfigMonarchLanguage +// --- Monaco registration --- +// monaco.languages.register({ id: 'klipper-config' }) +// monaco.languages.setMonarchTokensProvider('klipper-config', language) +// monaco.languages.setLanguageConfiguration('klipper-config', conf) diff --git a/src/monaco/language/moonraker-config.monarch.ts b/src/monaco/language/moonraker-config.monarch.ts new file mode 100644 index 0000000000..9069baaa8d --- /dev/null +++ b/src/monaco/language/moonraker-config.monarch.ts @@ -0,0 +1,118 @@ +import type * as monaco from 'monaco-editor/esm/vs/editor/editor.api' + +// Monarch language definition for Moonraker moonraker.conf +// +// Parser: configparser.ConfigParser(interpolation=None) +// wrapped by FileSourceWrapper._parse_file() which pre-processes +// each line before handing it to configparser. +// +// Pre-processing rules (from confighelper.py _parse_file): +// +// 1. Full-line comments: +// if not line.strip() or line.lstrip()[0] in "#;": continue +// → # or ; as first non-whitespace drops the whole line. +// +// 2. Inline comments: +// line = line.expandtabs(tabsize=4) ← runs FIRST +// cmt_match = re.search(r" +[#;]", line) +// if cmt_match: line = line[:cmt_match.start()] +// → expandtabs() converts tabs to spaces before the regex runs, +// so tabs before # or ; also trigger inline comment stripping. +// The regex requires one or more spaces (post-expansion) before +// the sigil. The cut point is cmt_match.start(), so the leading +// whitespace is also removed. No whitespace → kept in value. +// key=value#comment → '#comment' kept (no whitespace before #) +// key=value;comment → ';comment' kept (no whitespace before ;) +// key=value #comment → ' #comment' cut (space before #) +// key=value\t#comment → '\t#comment' cut (tab expanded to spaces) +// +// 3. Backslash escape: +// line = re.sub(r" \\(#|;)", r" \1", line) +// → " \#" or " \;" (space + backslash + sigil) removes the backslash, +// leaving a literal # or ; in the value. +// → Only works when the backslash is itself preceded by a space. +// +// 4. Section headers: +// section_r = re.compile(r"\s*\[([^]]+)\]") +// The inline stripper (step 2) runs first. Then section_r, like +// configparser's own SECTCRE, is not end-anchored — anything remaining +// after ] is silently discarded. All four variants work: +// [header]#comment → no space before #, not stripped; section_r ignores rest +// [header] #comment → space before #, stripped to '[header]' +// [header];comment → no space before ;, not stripped; section_r ignores rest +// [header] ;comment → space before ;, stripped to '[header]' +// +// 5. No interpolation (interpolation=None) — %(x)s / ${x} are plain text. +// +// 6. Strict mode (default): duplicate sections or options within +// the same file raise ConfigError. + +export const conf: monaco.languages.LanguageConfiguration = { + comments: { lineComment: '#' }, + brackets: [['[', ']']], + autoClosingPairs: [{ open: '[', close: ']' }], +} + +export const language: monaco.languages.IMonarchLanguage = { + tokenizer: { + root: [ + // Blank lines + [/^\s*$/, ''], + + // Full-line comments — # or ; as first non-whitespace character + [/^\s*[#;].*$/, 'comment'], + + // Section headers — section_r / SECTCRE are not end-anchored, so + // everything after ] is silently discarded at runtime. Tokenise as comment. + [ + /^(\s*)(\[)([^\]]+)(\])(.*)$/, + ['', 'bracket', 'entity.name.section', 'bracket', 'comment'], + ], + + // Key = value or key : value + // + // Safe key pattern: [^=:\s#;](?:[^=:]*[^=:\s])? + // - First char: non-delimiter, non-whitespace, non-comment-sigil + // - Middle: anything except = or : (greedy, optional) + // - Last char: non-delimiter, non-whitespace (explicit, prevents + // \s* from stealing trailing spaces via backtracking) + // - Single-char keys satisfy the outer group alone + [ + /^\s*([^=:\s#;](?:[^=:]*[^=:\s])?)\s*(=|:)/, + ['variable.name', 'delimiter'], + ], + + // Value portion — delegate to moonrakerValue state + { include: '@moonrakerValue' }, + + ], + + moonrakerValue: [ + // Escaped comment sigil: " \#" or " \;" + // Space + backslash + sigil — backslash is removed at runtime, + // leaving a literal # or ; in the value. + // Matched before the inline-comment rule so " \#" is never mistaken + // for a space-preceded comment sigil. + [/ \\[#;]/, 'constant.character.escape'], + + // Inline comment — one or more whitespace chars immediately before # or ;. + // Monarch processes the remaining string left-to-right, so a lookbehind + // on the sigil won't see spaces already consumed by earlier rules. + // Instead we match the whitespace + sigil + rest as a unit, returning + // two tokens so the space keeps the 'string' colour and only the + // sigil onward gets 'comment'. + [/([ \t]+)([#;].*)$/, ['string', 'comment']], + + // Boolean-like constants + [/\b(true|false|yes|no|on|off)\b/i, 'constant.language'], + + // Plain value text (no interpolation) + [/./, 'string'], + ], + }, +} + +// --- Monaco registration --- +// monaco.languages.register({ id: 'moonraker-config' }) +// monaco.languages.setMonarchTokensProvider('moonraker-config', language) +// monaco.languages.setLanguageConfiguration('moonraker-config', conf) diff --git a/src/monaco/language/tmLanguage.json b/src/monaco/language/tmLanguage.json deleted file mode 100644 index c135c709e0..0000000000 --- a/src/monaco/language/tmLanguage.json +++ /dev/null @@ -1,274 +0,0 @@ -{ - "$schema": "http://json-schema.org/schema#", - "id": "https://raw.githubusercontent.com/martinring/tmlanguage/master/tmlanguage.json", - "$ref": "#/definitions/root", - "definitions": { - "root": { - "allOf": [ - { "$ref": "#/definitions/grammar" }, - { - "type": "object", - "properties": { - "name": { "type": "string" }, - "scopeName": { - "description": "this should be a unique name for the grammar, following the convention of being a dot-separated name where each new (left-most) part specializes the name. Normally it would be a two-part name where the first is either text or source and the second is the name of the language or document type. But if you are specializing an existing type, you probably want to derive the name from the type you are specializing. For example Markdown is text.html.markdown and Ruby on Rails (rhtml files) is text.html.rails. The advantage of deriving it from (in this case) text.html is that everything which works in the text.html scope will also work in the text.html.«something» scope (but with a lower precedence than something specifically targeting text.html.«something»).", - "type": "string", - "pattern": "^(text|source)(\\.[\\w0-9-]+)+$" - }, - "foldingStartMarker": { - "description": "regular expressions that lines (in the document) are matched against. If a line matches one of the patterns (but not both), it becomes a folding marker (see the foldings section for more info).", - "type": "string" - }, - "foldingStopMarker": { - "description": "regular expressions that lines (in the document) are matched against. If a line matches one of the patterns (but not both), it becomes a folding marker (see the foldings section for more info).", - "type": "string" - }, - "fileTypes": { - "description": "this is an array of file type extensions that the grammar should (by default) be used with. This is referenced when TextMate does not know what grammar to use for a file the user opens. If however the user selects a grammar from the language pop-up in the status bar, TextMate will remember that choice.", - "type": "array", - "items": { "type": "string" } - }, - "uuid": { "type": "string" }, - "firstLineMatch": { "type": "string" } - }, - "required": [ "scopeName" ] - } - ] - }, - "grammar": { - "type": "object", - "properties": { - "patterns": { - "type": "array", - "items": { "$ref": "#/definitions/pattern" }, - "default": [ ] - }, - "repository": { - "description": "a dictionary (i.e. key/value pairs) of rules which can be included from other places in the grammar. The key is the name of the rule and the value is the actual rule. Further explanation (and example) follow with the description of the include rule key.", - "type": "object", - "additionalProperties": { - "$ref": "#/definitions/pattern" - } - } - }, - "required": [ - "patterns" - ] - }, - "captures": { - "type": "object", - "patternProperties": { - "^[0-9]+$": { - "type": "object", - "properties": { - "name": { "$ref": "#/definitions/name" }, - "patterns": { - "type": "array", - "items": { "$ref": "#/definitions/pattern" }, - "default": [ ] - } - }, - "additionalProperties": false - } - }, - "additionalProperties": false - }, - "pattern": { - "type": "object", - "properties": { - "comment": { "type": "string" }, - "disabled": { "type": "integer", "minimum": 0, "maximum": 1 }, - "include": { - "description": "this allows you to reference a different language, recursively reference the grammar itself or a rule declared in this file’s repository.", - "type": "string" - }, - "match": { - "description": "a regular expression which is used to identify the portion of text to which the name should be assigned. Example: '\\b(true|false)\\b'.", - "type": "string" - }, - "name": { - "description": "the name which gets assigned to the portion matched. This is used for styling and scope-specific settings and actions, which means it should generally be derived from one of the standard names.", - "$ref": "#/definitions/name" - }, - "contentName": { - "description": "this key is similar to the name key but only assigns the name to the text between what is matched by the begin/end patterns.", - "$ref": "#/definitions/name" - }, - "begin": { - "description": "these keys allow matches which span several lines and must both be mutually exclusive with the match key. Each is a regular expression pattern. begin is the pattern that starts the block and end is the pattern which ends the block. Captures from the begin pattern can be referenced in the end pattern by using normal regular expression back-references. This is often used with here-docs. A begin/end rule can have nested patterns using the patterns key.", - "type": "string" - }, - "end": { - "description": "these keys allow matches which span several lines and must both be mutually exclusive with the match key. Each is a regular expression pattern. begin is the pattern that starts the block and end is the pattern which ends the block. Captures from the begin pattern can be referenced in the end pattern by using normal regular expression back-references. This is often used with here-docs. A begin/end rule can have nested patterns using the patterns key.", - "type": "string" - }, - "while": { - "description": "these keys allow matches which span several lines and must both be mutually exclusive with the match key. Each is a regular expression pattern. begin is the pattern that starts the block and while continues it.", - "type": "string" - }, - "captures": { - "description": "allows you to assign attributes to the captures of the match pattern. Using the captures key for a begin/end rule is short-hand for giving both beginCaptures and endCaptures with same values.", - "$ref": "#/definitions/captures" - }, - "beginCaptures": { - "description": "allows you to assign attributes to the captures of the begin pattern. Using the captures key for a begin/end rule is short-hand for giving both beginCaptures and endCaptures with same values.", - "$ref": "#/definitions/captures" - }, - "endCaptures": { - "description": "allows you to assign attributes to the captures of the end pattern. Using the captures key for a begin/end rule is short-hand for giving both beginCaptures and endCaptures with same values.", - "$ref": "#/definitions/captures" - }, - "whileCaptures": { - "description": "allows you to assign attributes to the captures of the while pattern. Using the captures key for a begin/while rule is short-hand for giving both beginCaptures and whileCaptures with same values.", - "$ref": "#/definitions/captures" - }, - "patterns": { - "description": "applies to the region between the begin and end matches", - "type": "array", - "items": { "$ref": "#/definitions/pattern" }, - "default": [ ] - }, - "applyEndPatternLast": { - "type": "integer", - "minimum": 0, - "maximum": 1 - } - }, - "dependencies": { - "begin": { "anyOf": [ "end", "while" ] }, - "end": [ "begin" ], - "while": [ "begin" ], - "contentName": [ "begin", "end" ], - "beginCaptures": { "anyOf": [[ "begin", "end" ], [ "begin", "while" ]] }, - "whileCaptures": [ "begin", "while" ], - "endCaptures": [ "begin", "end" ], - "applyEndPatternLast": [ "end" ] - } - }, - "name": { - "anyOf": [ - { - "type": "string", - "pattern": "^([\\w0-9]|\\$\\d+)+(\\.([\\w0-9-]|\\$\\d+)+)*$" - }, - { - "type": "string", - "enum": [ - "comment", - "comment.block", - "comment.block.documentation", - "comment.line", - "comment.line.double-dash", - "comment.line.double-slash", - "comment.line.number-sign", - "comment.line.percentage", - "constant", - "constant.character", - "constant.character.escape", - "constant.language", - "constant.numeric", - "constant.other", - "constant.regexp", - "constant.rgb-value", - "constant.sha.git-rebase", - "emphasis", - "entity", - "entity.name", - "entity.name.class", - "entity.name.function", - "entity.name.method", - "entity.name.section", - "entity.name.selector", - "entity.name.tag", - "entity.name.type", - "entity.other", - "entity.other.attribute-name", - "entity.other.inherited-class", - "header", - "invalid", - "invalid.deprecated", - "invalid.illegal", - "keyword", - "keyword.control", - "keyword.control.less", - "keyword.operator", - "keyword.operator.new", - "keyword.other", - "keyword.other.unit", - "markup", - "markup.bold", - "markup.changed", - "markup.deleted", - "markup.heading", - "markup.inline.raw", - "markup.inserted", - "markup.italic", - "markup.list", - "markup.list.numbered", - "markup.list.unnumbered", - "markup.other", - "markup.punctuation.list.beginning", - "markup.punctuation.quote.beginning", - "markup.quote", - "markup.raw", - "markup.underline", - "markup.underline.link", - "meta", - "meta.cast", - "meta.parameter.type.variable", - "meta.preprocessor", - "meta.preprocessor.numeric", - "meta.preprocessor.string", - "meta.return-type", - "meta.selector", - "meta.structure.dictionary.key.python", - "meta.tag", - "meta.type.annotation", - "meta.type.name", - "metatag.php", - "storage", - "storage.modifier", - "storage.modifier.import.java", - "storage.modifier.package.java", - "storage.type", - "storage.type.cs", - "storage.type.java", - "string", - "string.html", - "string.interpolated", - "string.jade", - "string.other", - "string.quoted", - "string.quoted.double", - "string.quoted.other", - "string.quoted.single", - "string.quoted.triple", - "string.regexp", - "string.unquoted", - "string.xml", - "string.yaml", - "strong", - "support", - "support.class", - "support.constant", - "support.function", - "support.function.git-rebase", - "support.other", - "support.property-value", - "support.type", - "support.type.property-name", - "support.type.property-name.css", - "support.type.property-name.less", - "support.type.property-name.scss", - "support.variable", - "variable", - "variable.language", - "variable.name", - "variable.other", - "variable.parameter" - ] - } - ] - } - } -} \ No newline at end of file diff --git a/src/monaco/theme/base.theme.dark.json b/src/monaco/theme/base.theme.dark.json deleted file mode 100644 index 8c86c4a2b3..0000000000 --- a/src/monaco/theme/base.theme.dark.json +++ /dev/null @@ -1,732 +0,0 @@ -{ - "$schema": "vscode://schemas/color-theme", - "type": "dark", - "colors": { - "activityBar.background": "#1f2430", - "activityBar.border": "#1f2430", - "activityBar.foreground": "#707a8ccc", - "activityBar.inactiveForeground": "#707a8c99", - "activityBarBadge.background": "#ffcc66", - "activityBarBadge.foreground": "#1f2430", - "badge.background": "#ffcc6633", - "badge.foreground": "#ffcc66", - "button.background": "#ffcc66", - "button.foreground": "#1f2430", - "button.hoverBackground": "#fac761", - "debugExceptionWidget.background": "#232834", - "debugExceptionWidget.border": "#191e2a", - "debugToolBar.background": "#232834", - "descriptionForeground": "#707a8c", - "diffEditor.insertedTextBackground": "#bae67e26", - "diffEditor.removedTextBackground": "#f29e7426", - "dropdown.background": "#232834", - "dropdown.border": "#434957", - "dropdown.foreground": "#707a8c", - "editor.background": "#1f2430", - "editor.findMatchBackground": "#ffcc660d", - "editor.findMatchBorder": "#ffcc66", - "editor.findMatchHighlightBackground": "#ffcc660d", - "editor.findMatchHighlightBorder": "#ffcc6659", - "editor.findRangeHighlightBackground": "#323a4c", - "editor.findRangeHighlightBorder": "#1f243000", - "editor.foreground": "#cbccc6", - "editor.inactiveSelectionBackground": "#323a4c", - "editor.lineHighlightBackground": "#191e2a", - "editor.rangeHighlightBackground": "#191e2a", - "editor.selectionBackground": "#33415e", - "editor.selectionHighlightBackground": "#323a4c", - "editor.selectionHighlightBorder": "#323a4c", - "editor.wordHighlightBackground": "#77a8d912", - "editor.wordHighlightBorder": "#77a8d980", - "editor.wordHighlightStrongBackground": "#a6cc7012", - "editor.wordHighlightStrongBorder": "#a6cc7080", - "editorBracketMatch.background": "#707a8c4d", - "editorBracketMatch.border": "#707a8c99", - "editorCodeLens.foreground": "#5c6773", - "editorCursor.foreground": "#ffcc66", - "editorError.foreground": "#ff3333", - "editorGroup.background": "#232834", - "editorGroup.border": "#191e2a", - "editorGroupHeader.noTabsBackground": "#1f2430", - "editorGroupHeader.tabsBackground": "#1f2430", - "editorGroupHeader.tabsBorder": "#1f2430", - "editorGutter.addedBackground": "#a6cc7099", - "editorGutter.deletedBackground": "#f2798399", - "editorGutter.modifiedBackground": "#77a8d999", - "editorHoverWidget.background": "#232834", - "editorHoverWidget.border": "#101521", - "editorIndentGuide.activeBackground": "#707a8cb3", - "editorIndentGuide.background": "#707a8c4d", - "editorLineNumber.activeForeground": "#707a8ccc", - "editorLineNumber.foreground": "#707a8c66", - "editorLink.activeForeground": "#ffcc66", - "editorMarkerNavigation.background": "#232834", - "editorOverviewRuler.addedForeground": "#a6cc7099", - "editorOverviewRuler.border": "#191e2a", - "editorOverviewRuler.deletedForeground": "#f2798399", - "editorOverviewRuler.errorForeground": "#ff3333", - "editorOverviewRuler.modifiedForeground": "#77a8d999", - "editorOverviewRuler.warningForeground": "#ffcc66", - "editorRuler.foreground": "#707a8c4d", - "editorSuggestWidget.background": "#232834", - "editorSuggestWidget.border": "#101521", - "editorSuggestWidget.highlightForeground": "#ffcc66", - "editorSuggestWidget.selectedBackground": "#191e2a", - "editorWarning.foreground": "#ffcc66", - "editorWhitespace.foreground": "#707a8c66", - "editorWidget.background": "#232834", - "errorForeground": "#ff3333", - "extensionButton.prominentBackground": "#ffcc66", - "extensionButton.prominentForeground": "#1f2430", - "extensionButton.prominentHoverBackground": "#fac761", - "focusBorder": "#596171", - "foreground": "#707a8c", - "gitDecoration.conflictingResourceForeground": "#ff0000", - "gitDecoration.deletedResourceForeground": "#f27983b3", - "gitDecoration.ignoredResourceForeground": "#525a69", - "gitDecoration.modifiedResourceForeground": "#77a8d9b3", - "gitDecoration.submoduleResourceForeground": "#d4bfffb3", - "gitDecoration.untrackedResourceForeground": "#a6cc70b3", - "icon.foreground": "#707a8c", - "input.background": "#1d222e", - "input.border": "#434957", - "input.foreground": "#cbccc6", - "input.placeholderForeground": "#5f6878", - "inputOption.activeBorder": "#ffcc66", - "inputValidation.errorBackground": "#1f2430", - "inputValidation.errorBorder": "#ff3333", - "inputValidation.infoBackground": "#1f2430", - "inputValidation.infoBorder": "#5ccfe6", - "inputValidation.warningBackground": "#1f2430", - "inputValidation.warningBorder": "#ffd580", - "list.activeSelectionBackground": "#191e2a", - "list.activeSelectionForeground": "#707a8c", - "list.errorForeground": "#f27983", - "list.filterMatchBackground": "#ffcc660d", - "list.filterMatchBorder": "#ffcc66", - "list.focusBackground": "#191e2a", - "list.focusForeground": "#707a8c", - "list.highlightForeground": "#ffcc66", - "list.hoverBackground": "#191e2a", - "list.hoverForeground": "#707a8c", - "list.inactiveSelectionBackground": "#191e2a", - "list.inactiveSelectionForeground": "#707a8c", - "list.invalidItemForeground": "#5f6878", - "listFilterWidget.background": "#232834", - "listFilterWidget.noMatchesOutline": "#ff3333", - "listFilterWidget.outline": "#ffcc66", - "panel.background": "#1f2430", - "panel.border": "#191e2a", - "panelTitle.activeBorder": "#ffcc66", - "panelTitle.activeForeground": "#cbccc6", - "panelTitle.inactiveForeground": "#707a8c", - "peekView.border": "#191e2a", - "peekViewEditor.background": "#232834", - "peekViewEditor.matchHighlightBackground": "#ffcc6633", - "peekViewResult.background": "#232834", - "peekViewResult.fileForeground": "#707a8c", - "peekViewResult.matchHighlightBackground": "#ffcc6633", - "peekViewTitle.background": "#232834", - "peekViewTitleDescription.foreground": "#707a8c", - "peekViewTitleLabel.foreground": "#707a8c", - "pickerGroup.border": "#191e2a", - "pickerGroup.foreground": "#525a69", - "progressBar.background": "#ffcc66", - "scrollbar.shadow": "#191e2a", - "scrollbarSlider.activeBackground": "#707a8cb3", - "scrollbarSlider.background": "#707a8c66", - "scrollbarSlider.hoverBackground": "#707a8c99", - "selection.background": "#33415efd", - "settings.headerForeground": "#cbccc6", - "settings.modifiedItemIndicator": "#77a8d9", - "sideBar.background": "#1f2430", - "sideBar.border": "#1f2430", - "sideBarSectionHeader.background": "#1f2430", - "sideBarSectionHeader.border": "#1f2430", - "sideBarSectionHeader.foreground": "#707a8c", - "sideBarTitle.foreground": "#707a8c", - "statusBar.background": "#1f2430", - "statusBar.border": "#1f2430", - "statusBar.debuggingBackground": "#f29e74", - "statusBar.debuggingForeground": "#1f2430", - "statusBar.foreground": "#707a8c", - "statusBar.noFolderBackground": "#232834", - "statusBarItem.activeBackground": "#191e2a", - "statusBarItem.hoverBackground": "#191e2a", - "statusBarItem.prominentBackground": "#191e2a", - "statusBarItem.prominentHoverBackground": "#00000030", - "tab.activeBackground": "#1f2430", - "tab.activeBorder": "#ffcc66", - "tab.activeForeground": "#cbccc6", - "tab.border": "#1f2430", - "tab.inactiveBackground": "#1f2430", - "tab.inactiveForeground": "#707a8c", - "tab.unfocusedActiveBorder": "#707a8c", - "tab.unfocusedActiveForeground": "#707a8c", - "tab.unfocusedInactiveForeground": "#707a8c", - "terminal.ansiBlack": "#191e2a", - "terminal.ansiBlue": "#6dcbfa", - "terminal.ansiBrightBlack": "#686868", - "terminal.ansiBrightBlue": "#73d0ff", - "terminal.ansiBrightCyan": "#95e6cb", - "terminal.ansiBrightGreen": "#bae67e", - "terminal.ansiBrightMagenta": "#d4bfff", - "terminal.ansiBrightRed": "#f28779", - "terminal.ansiBrightWhite": "#ffffff", - "terminal.ansiBrightYellow": "#ffd580", - "terminal.ansiCyan": "#90e1c6", - "terminal.ansiGreen": "#a6cc70", - "terminal.ansiMagenta": "#cfbafa", - "terminal.ansiRed": "#ed8274", - "terminal.ansiWhite": "#c7c7c7", - "terminal.ansiYellow": "#fad07b", - "terminal.background": "#1f2430", - "terminal.foreground": "#cbccc6", - "textBlockQuote.background": "#232834", - "textLink.activeForeground": "#ffcc66", - "textLink.foreground": "#ffcc66", - "textPreformat.foreground": "#cbccc6", - "titleBar.activeBackground": "#1f2430", - "titleBar.activeForeground": "#cbccc6", - "titleBar.border": "#1f2430", - "titleBar.inactiveBackground": "#1f2430", - "titleBar.inactiveForeground": "#707a8c", - "tree.indentGuidesStroke": "#707a8cb3", - "walkThrough.embeddedEditorBackground": "#232834", - "widget.shadow": "#141925" - }, - "tokenColors": [ - { - "scope": [ - "comment" - ], - "settings": { - "foreground": "#5C6773", - "fontStyle": "italic" - } - }, - { - "scope": [ - "string", - "constant.other.symbol" - ], - "settings": { - "foreground": "#BAE67E" - } - }, - { - "scope": [ - "string.regexp", - "constant.character", - "constant.other" - ], - "settings": { - "foreground": "#95E6CB" - } - }, - { - "scope": [ - "constant.numeric" - ], - "settings": { - "foreground": "#FFCC66" - } - }, - { - "scope": [ - "constant.language" - ], - "settings": { - "foreground": "#FFCC66" - } - }, - { - "scope": [ - "variable" - ], - "settings": { - "foreground": "#CBCCC6" - } - }, - { - "scope": [ - "variable.member" - ], - "settings": { - "foreground": "#F28779" - } - }, - { - "scope": [ - "variable.language" - ], - "settings": { - "foreground": "#5CCFE6", - "fontStyle": "italic" - } - }, - { - "scope": [ - "storage" - ], - "settings": { - "foreground": "#FFA759" - } - }, - { - "scope": [ - "keyword" - ], - "settings": { - "foreground": "#FFA759" - } - }, - { - "scope": [ - "keyword.operator" - ], - "settings": { - "foreground": "#F29E74" - } - }, - { - "scope": [ - "punctuation.separator", - "punctuation.terminator" - ], - "settings": { - "foreground": "#CBCCC6B3" - } - }, - { - "scope": [ - "punctuation.section" - ], - "settings": { - "foreground": "#CBCCC6" - } - }, - { - "scope": [ - "punctuation.accessor" - ], - "settings": { - "foreground": "#F29E74" - } - }, - { - "scope": [ - "source.java storage.type", - "source.haskell storage.type", - "source.c storage.type" - ], - "settings": { - "foreground": "#73D0FF" - } - }, - { - "scope": [ - "entity.other.inherited-class" - ], - "settings": { - "foreground": "#5CCFE6" - } - }, - { - "scope": [ - "storage.type.function" - ], - "settings": { - "foreground": "#FFA759" - } - }, - { - "scope": [ - "source.java storage.type.primitive" - ], - "settings": { - "foreground": "#5CCFE6" - } - }, - { - "scope": [ - "entity.name.function" - ], - "settings": { - "foreground": "#FFD580" - } - }, - { - "scope": [ - "variable.parameter", - "meta.parameter" - ], - "settings": { - "foreground": "#D4BFFF" - } - }, - { - "scope": [ - "variable.function", - "variable.annotation", - "meta.function-call.generic", - "support.function.go" - ], - "settings": { - "foreground": "#FFD580" - } - }, - { - "scope": [ - "support.function", - "support.macro" - ], - "settings": { - "foreground": "#F28779" - } - }, - { - "scope": [ - "entity.name.import", - "entity.name.package" - ], - "settings": { - "foreground": "#BAE67E" - } - }, - { - "scope": [ - "entity.name" - ], - "settings": { - "foreground": "#73D0FF" - } - }, - { - "scope": [ - "entity.name.tag", - "meta.tag.sgml" - ], - "settings": { - "foreground": "#5CCFE6" - } - }, - { - "scope": [ - "punctuation.definition.tag.end", - "punctuation.definition.tag.begin", - "punctuation.definition.tag" - ], - "settings": { - "foreground": "#5CCFE680" - } - }, - { - "scope": [ - "entity.other.attribute-name" - ], - "settings": { - "foreground": "#FFD580" - } - }, - { - "scope": [ - "support.constant" - ], - "settings": { - "foreground": "#F29E74", - "fontStyle": "italic" - } - }, - { - "scope": [ - "support.type", - "support.class", - "source.go storage.type" - ], - "settings": { - "foreground": "#5CCFE6" - } - }, - { - "scope": [ - "meta.decorator variable.other", - "meta.decorator punctuation.decorator", - "storage.type.annotation" - ], - "settings": { - "foreground": "#FFE6B3" - } - }, - { - "scope": [ - "invalid" - ], - "settings": { - "foreground": "#FF3333" - } - }, - { - "scope": [ - "meta.diff", - "meta.diff.header" - ], - "settings": { - "foreground": "#C594C5" - } - }, - { - "scope": [ - "source.ruby variable.other.readwrite" - ], - "settings": { - "foreground": "#FFD580" - } - }, - { - "scope": [ - "source.css entity.name.tag", - "source.sass entity.name.tag", - "source.scss entity.name.tag", - "source.less entity.name.tag", - "source.stylus entity.name.tag" - ], - "settings": { - "foreground": "#73D0FF" - } - }, - { - "scope": [ - "source.css support.type", - "source.sass support.type", - "source.scss support.type", - "source.less support.type", - "source.stylus support.type" - ], - "settings": { - "foreground": "#5C6773" - } - }, - { - "scope": [ - "support.type.property-name" - ], - "settings": { - "foreground": "#5CCFE6", - "fontStyle": "normal" - } - }, - { - "scope": [ - "constant.numeric.line-number.find-in-files - match" - ], - "settings": { - "foreground": "#5C6773" - } - }, - { - "scope": [ - "constant.numeric.line-number.match" - ], - "settings": { - "foreground": "#FFA759" - } - }, - { - "scope": [ - "entity.name.filename.find-in-files" - ], - "settings": { - "foreground": "#BAE67E" - } - }, - { - "scope": [ - "message.error" - ], - "settings": { - "foreground": "#FF3333" - } - }, - { - "scope": [ - "markup.heading", - "markup.heading entity.name" - ], - "settings": { - "foreground": "#BAE67E", - "fontStyle": "bold" - } - }, - { - "scope": [ - "markup.underline.link", - "string.other.link" - ], - "settings": { - "foreground": "#5CCFE6" - } - }, - { - "scope": [ - "markup.italic" - ], - "settings": { - "foreground": "#F28779", - "fontStyle": "italic" - } - }, - { - "scope": [ - "markup.bold" - ], - "settings": { - "foreground": "#F28779", - "fontStyle": "bold" - } - }, - { - "scope": [ - "markup.italic markup.bold", - "markup.bold markup.italic" - ], - "settings": { - "fontStyle": "bold italic" - } - }, - { - "scope": [ - "markup.raw" - ], - "settings": { - "background": "#CBCCC605" - } - }, - { - "scope": [ - "markup.raw.inline" - ], - "settings": { - "background": "#CBCCC60F" - } - }, - { - "scope": [ - "meta.separator" - ], - "settings": { - "foreground": "#5C6773", - "background": "#CBCCC60F", - "fontStyle": "bold" - } - }, - { - "scope": [ - "markup.quote" - ], - "settings": { - "foreground": "#95E6CB", - "fontStyle": "italic" - } - }, - { - "scope": [ - "markup.list punctuation.definition.list.begin" - ], - "settings": { - "foreground": "#FFD580" - } - }, - { - "scope": [ - "markup.inserted" - ], - "settings": { - "foreground": "#A6CC70" - } - }, - { - "scope": [ - "markup.changed" - ], - "settings": { - "foreground": "#77A8D9" - } - }, - { - "scope": [ - "markup.deleted" - ], - "settings": { - "foreground": "#F27983" - } - }, - { - "scope": [ - "markup.strike" - ], - "settings": { - "foreground": "#FFE6B3" - } - }, - { - "scope": [ - "markup.table" - ], - "settings": { - "foreground": "#5CCFE6", - "background": "#CBCCC60F" - } - }, - { - "scope": [ - "text.html.markdown markup.inline.raw" - ], - "settings": { - "foreground": "#F29E74" - } - }, - { - "scope": [ - "text.html.markdown meta.dummy.line-break" - ], - "settings": { - "foreground": "#5C6773", - "background": "#5C6773" - } - }, - { - "scope": [ - "punctuation.definition.markdown" - ], - "settings": { - "foreground": "#5C6773", - "background": "#CBCCC6" - } - }, - { - "scope": "token.info-token", - "settings": { - "foreground": "#6796E6" - } - }, - { - "scope": "token.warn-token", - "settings": { - "foreground": "#CD9731" - } - }, - { - "scope": "token.error-token", - "settings": { - "foreground": "#F44747" - } - }, - { - "scope": "token.debug-token", - "settings": { - "foreground": "#B267E6" - } - } - ] -} \ No newline at end of file diff --git a/src/monaco/theme/base.theme.light.json b/src/monaco/theme/base.theme.light.json deleted file mode 100644 index 152a9cac18..0000000000 --- a/src/monaco/theme/base.theme.light.json +++ /dev/null @@ -1,608 +0,0 @@ -{ - "$schema": "vscode://schemas/color-theme", - "type": "light", - "colors": { - "activityBarBadge.background": "#007acc", - "editor.background": "#ffffff", - "editor.foreground": "#000000", - "editor.inactiveSelectionBackground": "#e5ebf1", - "editor.selectionHighlightBackground": "#add6ff80", - "editorIndentGuide.activeBackground": "#939393", - "editorIndentGuide.background": "#d3d3d3", - "editorSuggestWidget.background": "#f3f3f3", - "input.placeholderForeground": "#767676", - "list.hoverBackground": "#e8e8e8", - "notebook.cellBorderColor": "#e8e8e8", - "notebook.selectedCellBackground": "#c8ddf150", - "searchEditor.textInputBorder": "#cecece", - "settings.numberInputBorder": "#cecece", - "settings.textInputBorder": "#cecece", - "sideBarSectionHeader.background": "#00000000", - "sideBarSectionHeader.border": "#61616130", - "sideBarTitle.foreground": "#6f6f6f", - "statusBarItem.errorBackground": "#c72e0f", - "statusBarItem.remoteBackground": "#16825d", - "statusBarItem.remoteForeground": "#ffffff", - "tab.lastPinnedBorder": "#61616130" - }, - "tokenColors": [ - { - "scope": [ - "meta.embedded", - "source.groovy.embedded" - ], - "settings": { - "foreground": "#000000" - } - }, - { - "scope": "emphasis", - "settings": { - "fontStyle": "italic" - } - }, - { - "scope": "strong", - "settings": { - "fontStyle": "bold" - } - }, - { - "scope": "meta.diff.header", - "settings": { - "foreground": "#000080" - } - }, - { - "scope": "comment", - "settings": { - "foreground": "#008000" - } - }, - { - "scope": "constant.language", - "settings": { - "foreground": "#0000FF" - } - }, - { - "scope": [ - "constant.numeric", - "variable.other.enummember", - "keyword.operator.plus.exponent", - "keyword.operator.minus.exponent" - ], - "settings": { - "foreground": "#098658" - } - }, - { - "scope": "constant.regexp", - "settings": { - "foreground": "#811F3F" - } - }, - { - "scope": "entity.name.tag", - "settings": { - "foreground": "#800000" - } - }, - { - "scope": "entity.name.selector", - "settings": { - "foreground": "#800000" - } - }, - { - "scope": "entity.other.attribute-name", - "settings": { - "foreground": "#FF0000" - } - }, - { - "scope": [ - "entity.other.attribute-name.class.css", - "entity.other.attribute-name.class.mixin.css", - "entity.other.attribute-name.id.css", - "entity.other.attribute-name.parent-selector.css", - "entity.other.attribute-name.pseudo-class.css", - "entity.other.attribute-name.pseudo-element.css", - "source.css.less entity.other.attribute-name.id", - "entity.other.attribute-name.scss" - ], - "settings": { - "foreground": "#800000" - } - }, - { - "scope": "invalid", - "settings": { - "foreground": "#CD3131" - } - }, - { - "scope": "markup.underline", - "settings": { - "fontStyle": "underline" - } - }, - { - "scope": "markup.bold", - "settings": { - "foreground": "#000080", - "fontStyle": "bold" - } - }, - { - "scope": "markup.heading", - "settings": { - "foreground": "#800000", - "fontStyle": "bold" - } - }, - { - "scope": "markup.italic", - "settings": { - "fontStyle": "italic" - } - }, - { - "scope": "markup.inserted", - "settings": { - "foreground": "#098658" - } - }, - { - "scope": "markup.deleted", - "settings": { - "foreground": "#A31515" - } - }, - { - "scope": "markup.changed", - "settings": { - "foreground": "#0451A5" - } - }, - { - "scope": [ - "punctuation.definition.quote.begin.markdown", - "punctuation.definition.list.begin.markdown" - ], - "settings": { - "foreground": "#0451A5" - } - }, - { - "scope": "markup.inline.raw", - "settings": { - "foreground": "#800000" - } - }, - { - "scope": "punctuation.definition.tag", - "settings": { - "foreground": "#800000" - } - }, - { - "scope": [ - "meta.preprocessor", - "entity.name.function.preprocessor" - ], - "settings": { - "foreground": "#0000FF" - } - }, - { - "scope": "meta.preprocessor.string", - "settings": { - "foreground": "#A31515" - } - }, - { - "scope": "meta.preprocessor.numeric", - "settings": { - "foreground": "#098658" - } - }, - { - "scope": "meta.structure.dictionary.key.python", - "settings": { - "foreground": "#0451A5" - } - }, - { - "scope": "storage", - "settings": { - "foreground": "#0000FF" - } - }, - { - "scope": "storage.type", - "settings": { - "foreground": "#0000FF" - } - }, - { - "scope": [ - "storage.modifier", - "keyword.operator.noexcept" - ], - "settings": { - "foreground": "#0000FF" - } - }, - { - "scope": [ - "string", - "meta.embedded.assembly" - ], - "settings": { - "foreground": "#A31515" - } - }, - { - "scope": [ - "string.comment.buffered.block.pug", - "string.quoted.pug", - "string.interpolated.pug", - "string.unquoted.plain.in.yaml", - "string.unquoted.plain.out.yaml", - "string.unquoted.block.yaml", - "string.quoted.single.yaml", - "string.quoted.double.xml", - "string.quoted.single.xml", - "string.unquoted.cdata.xml", - "string.quoted.double.html", - "string.quoted.single.html", - "string.unquoted.html", - "string.quoted.single.handlebars", - "string.quoted.double.handlebars" - ], - "settings": { - "foreground": "#0000FF" - } - }, - { - "scope": "string.regexp", - "settings": { - "foreground": "#811F3F" - } - }, - { - "scope": [ - "punctuation.definition.template-expression.begin", - "punctuation.definition.template-expression.end", - "punctuation.section.embedded" - ], - "settings": { - "foreground": "#0000FF" - } - }, - { - "scope": [ - "meta.template.expression" - ], - "settings": { - "foreground": "#000000" - } - }, - { - "scope": [ - "support.constant.property-value", - "support.constant.font-name", - "support.constant.media-type", - "support.constant.media", - "constant.other.color.rgb-value", - "constant.other.rgb-value", - "support.constant.color" - ], - "settings": { - "foreground": "#0451A5" - } - }, - { - "scope": [ - "support.type.vendored.property-name", - "support.type.property-name", - "variable.css", - "variable.scss", - "variable.other.less", - "source.coffee.embedded" - ], - "settings": { - "foreground": "#FF0000" - } - }, - { - "scope": [ - "support.type.property-name.json" - ], - "settings": { - "foreground": "#0451A5" - } - }, - { - "scope": "keyword", - "settings": { - "foreground": "#0000FF" - } - }, - { - "scope": "keyword.control", - "settings": { - "foreground": "#0000FF" - } - }, - { - "scope": "keyword.operator", - "settings": { - "foreground": "#000000" - } - }, - { - "scope": [ - "keyword.operator.new", - "keyword.operator.expression", - "keyword.operator.cast", - "keyword.operator.sizeof", - "keyword.operator.alignof", - "keyword.operator.typeid", - "keyword.operator.alignas", - "keyword.operator.instanceof", - "keyword.operator.logical.python", - "keyword.operator.wordlike" - ], - "settings": { - "foreground": "#0000FF" - } - }, - { - "scope": "keyword.other.unit", - "settings": { - "foreground": "#098658" - } - }, - { - "scope": [ - "punctuation.section.embedded.begin.php", - "punctuation.section.embedded.end.php" - ], - "settings": { - "foreground": "#800000" - } - }, - { - "scope": "support.function.git-rebase", - "settings": { - "foreground": "#0451A5" - } - }, - { - "scope": "constant.sha.git-rebase", - "settings": { - "foreground": "#098658" - } - }, - { - "scope": [ - "storage.modifier.import.java", - "variable.language.wildcard.java", - "storage.modifier.package.java" - ], - "settings": { - "foreground": "#000000" - } - }, - { - "scope": "variable.language", - "settings": { - "foreground": "#0000FF" - } - }, - { - "scope": [ - "entity.name.function", - "support.function", - "support.constant.handlebars", - "source.powershell variable.other.member", - "entity.name.operator.custom-literal" - ], - "settings": { - "foreground": "#795E26" - } - }, - { - "scope": [ - "meta.return-type", - "support.class", - "support.type", - "entity.name.type", - "entity.name.namespace", - "entity.other.attribute", - "entity.name.scope-resolution", - "entity.name.class", - "storage.type.numeric.go", - "storage.type.byte.go", - "storage.type.boolean.go", - "storage.type.string.go", - "storage.type.uintptr.go", - "storage.type.error.go", - "storage.type.rune.go", - "storage.type.cs", - "storage.type.generic.cs", - "storage.type.modifier.cs", - "storage.type.variable.cs", - "storage.type.annotation.java", - "storage.type.generic.java", - "storage.type.java", - "storage.type.object.array.java", - "storage.type.primitive.array.java", - "storage.type.primitive.java", - "storage.type.token.java", - "storage.type.groovy", - "storage.type.annotation.groovy", - "storage.type.parameters.groovy", - "storage.type.generic.groovy", - "storage.type.object.array.groovy", - "storage.type.primitive.array.groovy", - "storage.type.primitive.groovy" - ], - "settings": { - "foreground": "#267F99" - } - }, - { - "scope": [ - "meta.type.cast.expr", - "meta.type.new.expr", - "support.constant.math", - "support.constant.dom", - "support.constant.json", - "entity.other.inherited-class" - ], - "settings": { - "foreground": "#267F99" - } - }, - { - "scope": [ - "keyword.control", - "source.cpp keyword.operator.new", - "source.cpp keyword.operator.delete", - "keyword.other.using", - "keyword.other.operator", - "entity.name.operator" - ], - "settings": { - "foreground": "#AF00DB" - } - }, - { - "scope": [ - "variable", - "meta.definition.variable.name", - "support.variable", - "entity.name.variable" - ], - "settings": { - "foreground": "#001080" - } - }, - { - "scope": [ - "variable.other.constant", - "variable.other.enummember" - ], - "settings": { - "foreground": "#0070C1" - } - }, - { - "scope": [ - "meta.object-literal.key" - ], - "settings": { - "foreground": "#001080" - } - }, - { - "scope": [ - "support.constant.property-value", - "support.constant.font-name", - "support.constant.media-type", - "support.constant.media", - "constant.other.color.rgb-value", - "constant.other.rgb-value", - "support.constant.color" - ], - "settings": { - "foreground": "#0451A5" - } - }, - { - "scope": [ - "punctuation.definition.group.regexp", - "punctuation.definition.group.assertion.regexp", - "punctuation.definition.character-class.regexp", - "punctuation.character.set.begin.regexp", - "punctuation.character.set.end.regexp", - "keyword.operator.negation.regexp", - "support.other.parenthesis.regexp" - ], - "settings": { - "foreground": "#D16969" - } - }, - { - "scope": [ - "constant.character.character-class.regexp", - "constant.other.character-class.set.regexp", - "constant.other.character-class.regexp", - "constant.character.set.regexp" - ], - "settings": { - "foreground": "#811F3F" - } - }, - { - "scope": "keyword.operator.quantifier.regexp", - "settings": { - "foreground": "#000000" - } - }, - { - "scope": [ - "keyword.operator.or.regexp", - "keyword.control.anchor.regexp" - ], - "settings": { - "foreground": "#EE0000" - } - }, - { - "scope": "constant.character", - "settings": { - "foreground": "#0000FF" - } - }, - { - "scope": "constant.character.escape", - "settings": { - "foreground": "#EE0000" - } - }, - { - "scope": "entity.name.label", - "settings": { - "foreground": "#000000" - } - }, - { - "scope": "token.info-token", - "settings": { - "foreground": "#316BCD" - } - }, - { - "scope": "token.warn-token", - "settings": { - "foreground": "#CD9731" - } - }, - { - "scope": "token.error-token", - "settings": { - "foreground": "#CD3131" - } - }, - { - "scope": "token.debug-token", - "settings": { - "foreground": "#800080" - } - } - ] -} \ No newline at end of file diff --git a/src/monaco/theme/editor.dark.theme.json b/src/monaco/theme/editor.dark.theme.json deleted file mode 100644 index 36c33a9c7f..0000000000 --- a/src/monaco/theme/editor.dark.theme.json +++ /dev/null @@ -1 +0,0 @@ -{"inherit":true,"base":"vs-dark","colors":{"activityBar.background":"#1f2430","activityBar.border":"#1f2430","activityBar.foreground":"#707a8ccc","activityBar.inactiveForeground":"#707a8c99","activityBarBadge.background":"#ffcc66","activityBarBadge.foreground":"#1f2430","badge.background":"#ffcc6633","badge.foreground":"#ffcc66","button.background":"#ffcc66","button.foreground":"#1f2430","button.hoverBackground":"#fac761","debugExceptionWidget.background":"#232834","debugExceptionWidget.border":"#191e2a","debugToolBar.background":"#232834","descriptionForeground":"#707a8c","diffEditor.insertedTextBackground":"#bae67e26","diffEditor.removedTextBackground":"#f29e7426","dropdown.background":"#232834","dropdown.border":"#434957","dropdown.foreground":"#707a8c","editor.background":"#28282b","editor.findMatchBackground":"#ffcc660d","editor.findMatchBorder":"#ffcc66","editor.findMatchHighlightBackground":"#ffcc660d","editor.findMatchHighlightBorder":"#ffcc6659","editor.findRangeHighlightBackground":"#323a4c","editor.findRangeHighlightBorder":"#1f243000","editor.foreground":"#cbccc6","editor.inactiveSelectionBackground":"#323a4c","editor.lineHighlightBackground":"#3a3a3e","editor.rangeHighlightBackground":"#191e2a","editor.selectionBackground":"#33415e","editor.selectionHighlightBackground":"#323a4c","editor.selectionHighlightBorder":"#323a4c","editor.wordHighlightBackground":"#77a8d912","editor.wordHighlightBorder":"#77a8d980","editor.wordHighlightStrongBackground":"#a6cc7012","editor.wordHighlightStrongBorder":"#a6cc7080","editorBracketMatch.background":"#707a8c4d","editorBracketMatch.border":"#707a8c99","editorCodeLens.foreground":"#5c6773","editorCursor.foreground":"#ffcc66","editorError.foreground":"#ff3333","editorGroup.background":"#232834","editorGroup.border":"#191e2a","editorGroupHeader.noTabsBackground":"#1f2430","editorGroupHeader.tabsBackground":"#1f2430","editorGroupHeader.tabsBorder":"#1f2430","editorGutter.addedBackground":"#a6cc7099","editorGutter.deletedBackground":"#f2798399","editorGutter.modifiedBackground":"#77a8d999","editorHoverWidget.background":"#232834","editorHoverWidget.border":"#101521","editorIndentGuide.activeBackground":"#707a8cb3","editorIndentGuide.background":"#707a8c4d","editorLineNumber.activeForeground":"#707a8ccc","editorLineNumber.foreground":"#707a8c66","editorLink.activeForeground":"#ffcc66","editorMarkerNavigation.background":"#232834","editorOverviewRuler.addedForeground":"#a6cc7099","editorOverviewRuler.border":"#191e2a","editorOverviewRuler.deletedForeground":"#f2798399","editorOverviewRuler.errorForeground":"#ff3333","editorOverviewRuler.modifiedForeground":"#77a8d999","editorOverviewRuler.warningForeground":"#ffcc66","editorRuler.foreground":"#707a8c4d","editorSuggestWidget.background":"#232834","editorSuggestWidget.border":"#101521","editorSuggestWidget.highlightForeground":"#ffcc66","editorSuggestWidget.selectedBackground":"#191e2a","editorWarning.foreground":"#ffcc66","editorWhitespace.foreground":"#707a8c66","editorWidget.background":"#232834","errorForeground":"#ff3333","extensionButton.prominentBackground":"#ffcc66","extensionButton.prominentForeground":"#1f2430","extensionButton.prominentHoverBackground":"#fac761","focusBorder":"#596171","foreground":"#707a8c","gitDecoration.conflictingResourceForeground":"#ff0000","gitDecoration.deletedResourceForeground":"#f27983b3","gitDecoration.ignoredResourceForeground":"#525a69","gitDecoration.modifiedResourceForeground":"#77a8d9b3","gitDecoration.submoduleResourceForeground":"#d4bfffb3","gitDecoration.untrackedResourceForeground":"#a6cc70b3","icon.foreground":"#707a8c","input.background":"#1d222e","input.border":"#434957","input.foreground":"#cbccc6","input.placeholderForeground":"#5f6878","inputOption.activeBorder":"#ffcc66","inputValidation.errorBackground":"#1f2430","inputValidation.errorBorder":"#ff3333","inputValidation.infoBackground":"#1f2430","inputValidation.infoBorder":"#5ccfe6","inputValidation.warningBackground":"#1f2430","inputValidation.warningBorder":"#ffd580","list.activeSelectionBackground":"#191e2a","list.activeSelectionForeground":"#707a8c","list.errorForeground":"#f27983","list.filterMatchBackground":"#ffcc660d","list.filterMatchBorder":"#ffcc66","list.focusBackground":"#191e2a","list.focusForeground":"#707a8c","list.highlightForeground":"#ffcc66","list.hoverBackground":"#191e2a","list.hoverForeground":"#707a8c","list.inactiveSelectionBackground":"#191e2a","list.inactiveSelectionForeground":"#707a8c","list.invalidItemForeground":"#5f6878","listFilterWidget.background":"#232834","listFilterWidget.noMatchesOutline":"#ff3333","listFilterWidget.outline":"#ffcc66","panel.background":"#1f2430","panel.border":"#191e2a","panelTitle.activeBorder":"#ffcc66","panelTitle.activeForeground":"#cbccc6","panelTitle.inactiveForeground":"#707a8c","peekView.border":"#191e2a","peekViewEditor.background":"#232834","peekViewEditor.matchHighlightBackground":"#ffcc6633","peekViewResult.background":"#232834","peekViewResult.fileForeground":"#707a8c","peekViewResult.matchHighlightBackground":"#ffcc6633","peekViewTitle.background":"#232834","peekViewTitleDescription.foreground":"#707a8c","peekViewTitleLabel.foreground":"#707a8c","pickerGroup.border":"#191e2a","pickerGroup.foreground":"#525a69","progressBar.background":"#ffcc66","scrollbar.shadow":"#191e2a","scrollbarSlider.activeBackground":"#707a8cb3","scrollbarSlider.background":"#707a8c66","scrollbarSlider.hoverBackground":"#707a8c99","selection.background":"#33415efd","settings.headerForeground":"#cbccc6","settings.modifiedItemIndicator":"#77a8d9","sideBar.background":"#1f2430","sideBar.border":"#1f2430","sideBarSectionHeader.background":"#1f2430","sideBarSectionHeader.border":"#1f2430","sideBarSectionHeader.foreground":"#707a8c","sideBarTitle.foreground":"#707a8c","statusBar.background":"#1f2430","statusBar.border":"#1f2430","statusBar.debuggingBackground":"#f29e74","statusBar.debuggingForeground":"#1f2430","statusBar.foreground":"#707a8c","statusBar.noFolderBackground":"#232834","statusBarItem.activeBackground":"#191e2a","statusBarItem.hoverBackground":"#191e2a","statusBarItem.prominentBackground":"#191e2a","statusBarItem.prominentHoverBackground":"#00000030","tab.activeBackground":"#1f2430","tab.activeBorder":"#ffcc66","tab.activeForeground":"#cbccc6","tab.border":"#1f2430","tab.inactiveBackground":"#1f2430","tab.inactiveForeground":"#707a8c","tab.unfocusedActiveBorder":"#707a8c","tab.unfocusedActiveForeground":"#707a8c","tab.unfocusedInactiveForeground":"#707a8c","terminal.ansiBlack":"#191e2a","terminal.ansiBlue":"#6dcbfa","terminal.ansiBrightBlack":"#686868","terminal.ansiBrightBlue":"#73d0ff","terminal.ansiBrightCyan":"#95e6cb","terminal.ansiBrightGreen":"#bae67e","terminal.ansiBrightMagenta":"#d4bfff","terminal.ansiBrightRed":"#f28779","terminal.ansiBrightWhite":"#ffffff","terminal.ansiBrightYellow":"#ffd580","terminal.ansiCyan":"#90e1c6","terminal.ansiGreen":"#a6cc70","terminal.ansiMagenta":"#cfbafa","terminal.ansiRed":"#ed8274","terminal.ansiWhite":"#c7c7c7","terminal.ansiYellow":"#fad07b","terminal.background":"#1f2430","terminal.foreground":"#cbccc6","textBlockQuote.background":"#232834","textLink.activeForeground":"#ffcc66","textLink.foreground":"#ffcc66","textPreformat.foreground":"#cbccc6","titleBar.activeBackground":"#1f2430","titleBar.activeForeground":"#cbccc6","titleBar.border":"#1f2430","titleBar.inactiveBackground":"#1f2430","titleBar.inactiveForeground":"#707a8c","tree.indentGuidesStroke":"#707a8cb3","walkThrough.embeddedEditorBackground":"#232834","widget.shadow":"#141925","minimap.background":"#28282b"},"rules":[{"foreground":"#6C7886","fontStyle":"italic","token":"comment"},{"foreground":"#BAE67E","token":"string"},{"foreground":"#BAE67E","token":"constant.other.symbol"},{"foreground":"#95E6CB","token":"string.regexp"},{"foreground":"#95E6CB","token":"constant.character"},{"foreground":"#95E6CB","token":"constant.other"},{"foreground":"#FFCC66","token":"constant.numeric"},{"foreground":"#FFCC66","token":"constant.language"},{"foreground":"#CBCCC6","token":"variable"},{"foreground":"#F28779","token":"variable.member"},{"foreground":"#5CCFE6","fontStyle":"italic","token":"variable.language"},{"foreground":"#FFA759","token":"storage"},{"foreground":"#FFA759","token":"keyword"},{"foreground":"#F29E74","token":"keyword.operator"},{"foreground":"#CBCCC6B3","token":"punctuation.separator"},{"foreground":"#CBCCC6B3","token":"punctuation.terminator"},{"foreground":"#CBCCC6","token":"punctuation.section"},{"foreground":"#F29E74","token":"punctuation.accessor"},{"foreground":"#73D0FF","token":"source.java storage.type"},{"foreground":"#73D0FF","token":"source.haskell storage.type"},{"foreground":"#73D0FF","token":"source.c storage.type"},{"foreground":"#5CCFE6","token":"entity.other.inherited-class"},{"foreground":"#FFA759","token":"storage.type.function"},{"foreground":"#5CCFE6","token":"source.java storage.type.primitive"},{"foreground":"#FFD580","token":"entity.name.function"},{"foreground":"#D4BFFF","token":"variable.parameter"},{"foreground":"#D4BFFF","token":"meta.parameter"},{"foreground":"#FFD580","token":"variable.function"},{"foreground":"#FFD580","token":"variable.annotation"},{"foreground":"#FFD580","token":"meta.function-call.generic"},{"foreground":"#FFD580","token":"support.function.go"},{"foreground":"#F28779","token":"support.function"},{"foreground":"#F28779","token":"support.macro"},{"foreground":"#BAE67E","token":"entity.name.import"},{"foreground":"#BAE67E","token":"entity.name.package"},{"foreground":"#73D0FF","token":"entity.name"},{"foreground":"#5CCFE6","token":"entity.name.tag"},{"foreground":"#5CCFE6","token":"meta.tag.sgml"},{"foreground":"#5CCFE680","token":"punctuation.definition.tag.end"},{"foreground":"#5CCFE680","token":"punctuation.definition.tag.begin"},{"foreground":"#5CCFE680","token":"punctuation.definition.tag"},{"foreground":"#FFD580","token":"entity.other.attribute-name"},{"foreground":"#F29E74","fontStyle":"italic","token":"support.constant"},{"foreground":"#5CCFE6","token":"support.type"},{"foreground":"#5CCFE6","token":"support.class"},{"foreground":"#5CCFE6","token":"source.go storage.type"},{"foreground":"#FFE6B3","token":"meta.decorator variable.other"},{"foreground":"#FFE6B3","token":"meta.decorator punctuation.decorator"},{"foreground":"#FFE6B3","token":"storage.type.annotation"},{"foreground":"#FF3333","token":"invalid"},{"foreground":"#C594C5","token":"meta.diff"},{"foreground":"#C594C5","token":"meta.diff.header"},{"foreground":"#FFD580","token":"source.ruby variable.other.readwrite"},{"foreground":"#73D0FF","token":"source.css entity.name.tag"},{"foreground":"#73D0FF","token":"source.sass entity.name.tag"},{"foreground":"#73D0FF","token":"source.scss entity.name.tag"},{"foreground":"#73D0FF","token":"source.less entity.name.tag"},{"foreground":"#73D0FF","token":"source.stylus entity.name.tag"},{"foreground":"#6C7886","token":"source.css support.type"},{"foreground":"#6C7886","token":"source.sass support.type"},{"foreground":"#6C7886","token":"source.scss support.type"},{"foreground":"#6C7886","token":"source.less support.type"},{"foreground":"#6C7886","token":"source.stylus support.type"},{"foreground":"#5CCFE6","fontStyle":"normal","token":"support.type.property-name"},{"foreground":"#6C7886","token":"constant.numeric.line-number.find-in-files - match"},{"foreground":"#FFA759","token":"constant.numeric.line-number.match"},{"foreground":"#BAE67E","token":"entity.name.filename.find-in-files"},{"foreground":"#FF3333","token":"message.error"},{"foreground":"#BAE67E","fontStyle":"bold","token":"markup.heading"},{"foreground":"#BAE67E","fontStyle":"bold","token":"markup.heading entity.name"},{"foreground":"#5CCFE6","token":"markup.underline.link"},{"foreground":"#5CCFE6","token":"string.other.link"},{"foreground":"#F28779","fontStyle":"italic","token":"markup.italic"},{"foreground":"#F28779","fontStyle":"bold","token":"markup.bold"},{"fontStyle":"bold italic","token":"markup.italic markup.bold"},{"fontStyle":"bold italic","token":"markup.bold markup.italic"},{"background":"#CBCCC605","token":"markup.raw"},{"background":"#CBCCC60F","token":"markup.raw.inline"},{"foreground":"#6C7886","background":"#CBCCC60F","fontStyle":"bold","token":"meta.separator"},{"foreground":"#95E6CB","fontStyle":"italic","token":"markup.quote"},{"foreground":"#FFD580","token":"markup.list punctuation.definition.list.begin"},{"foreground":"#A6CC70","token":"markup.inserted"},{"foreground":"#77A8D9","token":"markup.changed"},{"foreground":"#F27983","token":"markup.deleted"},{"foreground":"#FFE6B3","token":"markup.strike"},{"foreground":"#5CCFE6","background":"#CBCCC60F","token":"markup.table"},{"foreground":"#F29E74","token":"text.html.markdown markup.inline.raw"},{"foreground":"#6C7886","background":"#5C6773","token":"text.html.markdown meta.dummy.line-break"},{"foreground":"#6C7886","background":"#CBCCC6","token":"punctuation.definition.markdown"},{"foreground":"#6796E6","token":"token.info-token"},{"foreground":"#CD9731","token":"token.warn-token"},{"foreground":"#F44747","token":"token.error-token"},{"foreground":"#B267E6","token":"token.debug-token"}],"encodedTokensColors":[]} \ No newline at end of file diff --git a/src/monaco/theme/editor.light.theme.json b/src/monaco/theme/editor.light.theme.json deleted file mode 100644 index 605cb85909..0000000000 --- a/src/monaco/theme/editor.light.theme.json +++ /dev/null @@ -1 +0,0 @@ -{"inherit":false,"base":"vs-dark","colors":{"activityBarBadge.background":"#007acc","editor.background":"#ffffff","editor.foreground":"#000000","editor.inactiveSelectionBackground":"#e5ebf1","editor.selectionHighlightBackground":"#add6ff80","editorIndentGuide.activeBackground":"#939393","editorIndentGuide.background":"#d3d3d3","editorSuggestWidget.background":"#f3f3f3","input.placeholderForeground":"#767676","list.hoverBackground":"#e8e8e8","notebook.cellBorderColor":"#e8e8e8","notebook.selectedCellBackground":"#c8ddf150","searchEditor.textInputBorder":"#cecece","settings.numberInputBorder":"#cecece","settings.textInputBorder":"#cecece","sideBarSectionHeader.background":"#00000000","sideBarSectionHeader.border":"#61616130","sideBarTitle.foreground":"#6f6f6f","statusBarItem.errorBackground":"#c72e0f","statusBarItem.remoteBackground":"#16825d","statusBarItem.remoteForeground":"#ffffff","tab.lastPinnedBorder":"#61616130","minimap.background":"#ffffff"},"rules":[{"foreground":"#000000","token":"meta.embedded"},{"foreground":"#000000","token":"source.groovy.embedded"},{"fontStyle":"italic","token":"emphasis"},{"fontStyle":"bold","token":"strong"},{"foreground":"#000080","token":"meta.diff.header"},{"foreground":"#008000","token":"comment"},{"foreground":"#0000FF","token":"constant.language"},{"foreground":"#098658","token":"constant.numeric"},{"foreground":"#098658","token":"variable.other.enummember"},{"foreground":"#098658","token":"keyword.operator.plus.exponent"},{"foreground":"#098658","token":"keyword.operator.minus.exponent"},{"foreground":"#811F3F","token":"constant.regexp"},{"foreground":"#800000","token":"entity.name.tag"},{"foreground":"#800000","token":"entity.name.selector"},{"foreground":"#FF0000","token":"entity.other.attribute-name"},{"foreground":"#800000","token":"entity.other.attribute-name.class.css"},{"foreground":"#800000","token":"entity.other.attribute-name.class.mixin.css"},{"foreground":"#800000","token":"entity.other.attribute-name.id.css"},{"foreground":"#800000","token":"entity.other.attribute-name.parent-selector.css"},{"foreground":"#800000","token":"entity.other.attribute-name.pseudo-class.css"},{"foreground":"#800000","token":"entity.other.attribute-name.pseudo-element.css"},{"foreground":"#800000","token":"source.css.less entity.other.attribute-name.id"},{"foreground":"#800000","token":"entity.other.attribute-name.scss"},{"foreground":"#CD3131","token":"invalid"},{"fontStyle":"underline","token":"markup.underline"},{"foreground":"#000080","fontStyle":"bold","token":"markup.bold"},{"foreground":"#800000","fontStyle":"bold","token":"markup.heading"},{"fontStyle":"italic","token":"markup.italic"},{"foreground":"#098658","token":"markup.inserted"},{"foreground":"#A31515","token":"markup.deleted"},{"foreground":"#0451A5","token":"markup.changed"},{"foreground":"#0451A5","token":"punctuation.definition.quote.begin.markdown"},{"foreground":"#0451A5","token":"punctuation.definition.list.begin.markdown"},{"foreground":"#800000","token":"markup.inline.raw"},{"foreground":"#800000","token":"punctuation.definition.tag"},{"foreground":"#0000FF","token":"meta.preprocessor"},{"foreground":"#0000FF","token":"entity.name.function.preprocessor"},{"foreground":"#A31515","token":"meta.preprocessor.string"},{"foreground":"#098658","token":"meta.preprocessor.numeric"},{"foreground":"#0451A5","token":"meta.structure.dictionary.key.python"},{"foreground":"#0000FF","token":"storage"},{"foreground":"#0000FF","token":"storage.type"},{"foreground":"#0000FF","token":"storage.modifier"},{"foreground":"#0000FF","token":"keyword.operator.noexcept"},{"foreground":"#A31515","token":"string"},{"foreground":"#A31515","token":"meta.embedded.assembly"},{"foreground":"#0000FF","token":"string.comment.buffered.block.pug"},{"foreground":"#0000FF","token":"string.quoted.pug"},{"foreground":"#0000FF","token":"string.interpolated.pug"},{"foreground":"#0000FF","token":"string.unquoted.plain.in.yaml"},{"foreground":"#0000FF","token":"string.unquoted.plain.out.yaml"},{"foreground":"#0000FF","token":"string.unquoted.block.yaml"},{"foreground":"#0000FF","token":"string.quoted.single.yaml"},{"foreground":"#0000FF","token":"string.quoted.double.xml"},{"foreground":"#0000FF","token":"string.quoted.single.xml"},{"foreground":"#0000FF","token":"string.unquoted.cdata.xml"},{"foreground":"#0000FF","token":"string.quoted.double.html"},{"foreground":"#0000FF","token":"string.quoted.single.html"},{"foreground":"#0000FF","token":"string.unquoted.html"},{"foreground":"#0000FF","token":"string.quoted.single.handlebars"},{"foreground":"#0000FF","token":"string.quoted.double.handlebars"},{"foreground":"#811F3F","token":"string.regexp"},{"foreground":"#0000FF","token":"punctuation.definition.template-expression.begin"},{"foreground":"#0000FF","token":"punctuation.definition.template-expression.end"},{"foreground":"#0000FF","token":"punctuation.section.embedded"},{"foreground":"#000000","token":"meta.template.expression"},{"foreground":"#0451A5","token":"support.constant.property-value"},{"foreground":"#0451A5","token":"support.constant.font-name"},{"foreground":"#0451A5","token":"support.constant.media-type"},{"foreground":"#0451A5","token":"support.constant.media"},{"foreground":"#0451A5","token":"constant.other.color.rgb-value"},{"foreground":"#0451A5","token":"constant.other.rgb-value"},{"foreground":"#0451A5","token":"support.constant.color"},{"foreground":"#FF0000","token":"support.type.vendored.property-name"},{"foreground":"#FF0000","token":"support.type.property-name"},{"foreground":"#FF0000","token":"variable.css"},{"foreground":"#FF0000","token":"variable.scss"},{"foreground":"#FF0000","token":"variable.other.less"},{"foreground":"#FF0000","token":"source.coffee.embedded"},{"foreground":"#0451A5","token":"support.type.property-name.json"},{"foreground":"#0000FF","token":"keyword"},{"foreground":"#0000FF","token":"keyword.control"},{"foreground":"#000000","token":"keyword.operator"},{"foreground":"#0000FF","token":"keyword.operator.new"},{"foreground":"#0000FF","token":"keyword.operator.expression"},{"foreground":"#0000FF","token":"keyword.operator.cast"},{"foreground":"#0000FF","token":"keyword.operator.sizeof"},{"foreground":"#0000FF","token":"keyword.operator.alignof"},{"foreground":"#0000FF","token":"keyword.operator.typeid"},{"foreground":"#0000FF","token":"keyword.operator.alignas"},{"foreground":"#0000FF","token":"keyword.operator.instanceof"},{"foreground":"#0000FF","token":"keyword.operator.logical.python"},{"foreground":"#0000FF","token":"keyword.operator.wordlike"},{"foreground":"#098658","token":"keyword.other.unit"},{"foreground":"#800000","token":"punctuation.section.embedded.begin.php"},{"foreground":"#800000","token":"punctuation.section.embedded.end.php"},{"foreground":"#0451A5","token":"support.function.git-rebase"},{"foreground":"#098658","token":"constant.sha.git-rebase"},{"foreground":"#000000","token":"storage.modifier.import.java"},{"foreground":"#000000","token":"variable.language.wildcard.java"},{"foreground":"#000000","token":"storage.modifier.package.java"},{"foreground":"#0000FF","token":"variable.language"},{"foreground":"#795E26","token":"entity.name.function"},{"foreground":"#795E26","token":"support.function"},{"foreground":"#795E26","token":"support.constant.handlebars"},{"foreground":"#795E26","token":"source.powershell variable.other.member"},{"foreground":"#795E26","token":"entity.name.operator.custom-literal"},{"foreground":"#267F99","token":"meta.return-type"},{"foreground":"#267F99","token":"support.class"},{"foreground":"#267F99","token":"support.type"},{"foreground":"#267F99","token":"entity.name.type"},{"foreground":"#267F99","token":"entity.name.namespace"},{"foreground":"#267F99","token":"entity.other.attribute"},{"foreground":"#267F99","token":"entity.name.scope-resolution"},{"foreground":"#267F99","token":"entity.name.class"},{"foreground":"#267F99","token":"storage.type.numeric.go"},{"foreground":"#267F99","token":"storage.type.byte.go"},{"foreground":"#267F99","token":"storage.type.boolean.go"},{"foreground":"#267F99","token":"storage.type.string.go"},{"foreground":"#267F99","token":"storage.type.uintptr.go"},{"foreground":"#267F99","token":"storage.type.error.go"},{"foreground":"#267F99","token":"storage.type.rune.go"},{"foreground":"#267F99","token":"storage.type.cs"},{"foreground":"#267F99","token":"storage.type.generic.cs"},{"foreground":"#267F99","token":"storage.type.modifier.cs"},{"foreground":"#267F99","token":"storage.type.variable.cs"},{"foreground":"#267F99","token":"storage.type.annotation.java"},{"foreground":"#267F99","token":"storage.type.generic.java"},{"foreground":"#267F99","token":"storage.type.java"},{"foreground":"#267F99","token":"storage.type.object.array.java"},{"foreground":"#267F99","token":"storage.type.primitive.array.java"},{"foreground":"#267F99","token":"storage.type.primitive.java"},{"foreground":"#267F99","token":"storage.type.token.java"},{"foreground":"#267F99","token":"storage.type.groovy"},{"foreground":"#267F99","token":"storage.type.annotation.groovy"},{"foreground":"#267F99","token":"storage.type.parameters.groovy"},{"foreground":"#267F99","token":"storage.type.generic.groovy"},{"foreground":"#267F99","token":"storage.type.object.array.groovy"},{"foreground":"#267F99","token":"storage.type.primitive.array.groovy"},{"foreground":"#267F99","token":"storage.type.primitive.groovy"},{"foreground":"#267F99","token":"meta.type.cast.expr"},{"foreground":"#267F99","token":"meta.type.new.expr"},{"foreground":"#267F99","token":"support.constant.math"},{"foreground":"#267F99","token":"support.constant.dom"},{"foreground":"#267F99","token":"support.constant.json"},{"foreground":"#267F99","token":"entity.other.inherited-class"},{"foreground":"#AF00DB","token":"keyword.control"},{"foreground":"#AF00DB","token":"source.cpp keyword.operator.new"},{"foreground":"#AF00DB","token":"source.cpp keyword.operator.delete"},{"foreground":"#AF00DB","token":"keyword.other.using"},{"foreground":"#AF00DB","token":"keyword.other.operator"},{"foreground":"#AF00DB","token":"entity.name.operator"},{"foreground":"#001080","token":"variable"},{"foreground":"#001080","token":"meta.definition.variable.name"},{"foreground":"#001080","token":"support.variable"},{"foreground":"#001080","token":"entity.name.variable"},{"foreground":"#0070C1","token":"variable.other.constant"},{"foreground":"#0070C1","token":"variable.other.enummember"},{"foreground":"#001080","token":"meta.object-literal.key"},{"foreground":"#0451A5","token":"support.constant.property-value"},{"foreground":"#0451A5","token":"support.constant.font-name"},{"foreground":"#0451A5","token":"support.constant.media-type"},{"foreground":"#0451A5","token":"support.constant.media"},{"foreground":"#0451A5","token":"constant.other.color.rgb-value"},{"foreground":"#0451A5","token":"constant.other.rgb-value"},{"foreground":"#0451A5","token":"support.constant.color"},{"foreground":"#D16969","token":"punctuation.definition.group.regexp"},{"foreground":"#D16969","token":"punctuation.definition.group.assertion.regexp"},{"foreground":"#D16969","token":"punctuation.definition.character-class.regexp"},{"foreground":"#D16969","token":"punctuation.character.set.begin.regexp"},{"foreground":"#D16969","token":"punctuation.character.set.end.regexp"},{"foreground":"#D16969","token":"keyword.operator.negation.regexp"},{"foreground":"#D16969","token":"support.other.parenthesis.regexp"},{"foreground":"#811F3F","token":"constant.character.character-class.regexp"},{"foreground":"#811F3F","token":"constant.other.character-class.set.regexp"},{"foreground":"#811F3F","token":"constant.other.character-class.regexp"},{"foreground":"#811F3F","token":"constant.character.set.regexp"},{"foreground":"#000000","token":"keyword.operator.quantifier.regexp"},{"foreground":"#EE0000","token":"keyword.operator.or.regexp"},{"foreground":"#EE0000","token":"keyword.control.anchor.regexp"},{"foreground":"#0000FF","token":"constant.character"},{"foreground":"#EE0000","token":"constant.character.escape"},{"foreground":"#000000","token":"entity.name.label"},{"foreground":"#316BCD","token":"token.info-token"},{"foreground":"#CD9731","token":"token.warn-token"},{"foreground":"#CD3131","token":"token.error-token"},{"foreground":"#800080","token":"token.debug-token"}],"encodedTokensColors":[]} \ No newline at end of file diff --git a/src/monaco/theme/editor.theme.json b/src/monaco/theme/editor.theme.json deleted file mode 100644 index 3d9ec8e0d1..0000000000 --- a/src/monaco/theme/editor.theme.json +++ /dev/null @@ -1 +0,0 @@ -{"inherit":true,"base":"vs-dark","colors":{"activityBar.background":"#1f2430","activityBar.border":"#1f2430","activityBar.foreground":"#707a8ccc","activityBar.inactiveForeground":"#707a8c99","activityBarBadge.background":"#ffcc66","activityBarBadge.foreground":"#1f2430","badge.background":"#ffcc6633","badge.foreground":"#ffcc66","button.background":"#ffcc66","button.foreground":"#1f2430","button.hoverBackground":"#fac761","debugExceptionWidget.background":"#232834","debugExceptionWidget.border":"#191e2a","debugToolBar.background":"#232834","descriptionForeground":"#707a8c","diffEditor.insertedTextBackground":"#bae67e26","diffEditor.removedTextBackground":"#f29e7426","dropdown.background":"#232834","dropdown.border":"#434957","dropdown.foreground":"#707a8c","editor.background":"#28282b","editor.findMatchBackground":"#ffcc660d","editor.findMatchBorder":"#ffcc66","editor.findMatchHighlightBackground":"#ffcc660d","editor.findMatchHighlightBorder":"#ffcc6659","editor.findRangeHighlightBackground":"#323a4c","editor.findRangeHighlightBorder":"#1f243000","editor.foreground":"#cbccc6","editor.inactiveSelectionBackground":"#323a4c","editor.lineHighlightBackground":"#3a3a3e","editor.rangeHighlightBackground":"#191e2a","editor.selectionBackground":"#33415e","editor.selectionHighlightBackground":"#323a4c","editor.selectionHighlightBorder":"#323a4c","editor.wordHighlightBackground":"#77a8d912","editor.wordHighlightBorder":"#77a8d980","editor.wordHighlightStrongBackground":"#a6cc7012","editor.wordHighlightStrongBorder":"#a6cc7080","editorBracketMatch.background":"#707a8c4d","editorBracketMatch.border":"#707a8c99","editorCodeLens.foreground":"#5c6773","editorCursor.foreground":"#ffcc66","editorError.foreground":"#ff3333","editorGroup.background":"#232834","editorGroup.border":"#191e2a","editorGroupHeader.noTabsBackground":"#1f2430","editorGroupHeader.tabsBackground":"#1f2430","editorGroupHeader.tabsBorder":"#1f2430","editorGutter.addedBackground":"#a6cc7099","editorGutter.deletedBackground":"#f2798399","editorGutter.modifiedBackground":"#77a8d999","editorHoverWidget.background":"#232834","editorHoverWidget.border":"#101521","editorIndentGuide.activeBackground":"#707a8cb3","editorIndentGuide.background":"#707a8c4d","editorLineNumber.activeForeground":"#707a8ccc","editorLineNumber.foreground":"#707a8c66","editorLink.activeForeground":"#ffcc66","editorMarkerNavigation.background":"#232834","editorOverviewRuler.addedForeground":"#a6cc7099","editorOverviewRuler.border":"#191e2a","editorOverviewRuler.deletedForeground":"#f2798399","editorOverviewRuler.errorForeground":"#ff3333","editorOverviewRuler.modifiedForeground":"#77a8d999","editorOverviewRuler.warningForeground":"#ffcc66","editorRuler.foreground":"#707a8c4d","editorSuggestWidget.background":"#232834","editorSuggestWidget.border":"#101521","editorSuggestWidget.highlightForeground":"#ffcc66","editorSuggestWidget.selectedBackground":"#191e2a","editorWarning.foreground":"#ffcc66","editorWhitespace.foreground":"#707a8c66","editorWidget.background":"#232834","errorForeground":"#ff3333","extensionButton.prominentBackground":"#ffcc66","extensionButton.prominentForeground":"#1f2430","extensionButton.prominentHoverBackground":"#fac761","focusBorder":"#596171","foreground":"#707a8c","gitDecoration.conflictingResourceForeground":"#ff0000","gitDecoration.deletedResourceForeground":"#f27983b3","gitDecoration.ignoredResourceForeground":"#525a69","gitDecoration.modifiedResourceForeground":"#77a8d9b3","gitDecoration.submoduleResourceForeground":"#d4bfffb3","gitDecoration.untrackedResourceForeground":"#a6cc70b3","icon.foreground":"#707a8c","input.background":"#1d222e","input.border":"#434957","input.foreground":"#cbccc6","input.placeholderForeground":"#5f6878","inputOption.activeBorder":"#ffcc66","inputValidation.errorBackground":"#1f2430","inputValidation.errorBorder":"#ff3333","inputValidation.infoBackground":"#1f2430","inputValidation.infoBorder":"#5ccfe6","inputValidation.warningBackground":"#1f2430","inputValidation.warningBorder":"#ffd580","list.activeSelectionBackground":"#191e2a","list.activeSelectionForeground":"#707a8c","list.errorForeground":"#f27983","list.filterMatchBackground":"#ffcc660d","list.filterMatchBorder":"#ffcc66","list.focusBackground":"#191e2a","list.focusForeground":"#707a8c","list.highlightForeground":"#ffcc66","list.hoverBackground":"#191e2a","list.hoverForeground":"#707a8c","list.inactiveSelectionBackground":"#191e2a","list.inactiveSelectionForeground":"#707a8c","list.invalidItemForeground":"#5f6878","listFilterWidget.background":"#232834","listFilterWidget.noMatchesOutline":"#ff3333","listFilterWidget.outline":"#ffcc66","panel.background":"#1f2430","panel.border":"#191e2a","panelTitle.activeBorder":"#ffcc66","panelTitle.activeForeground":"#cbccc6","panelTitle.inactiveForeground":"#707a8c","peekView.border":"#191e2a","peekViewEditor.background":"#232834","peekViewEditor.matchHighlightBackground":"#ffcc6633","peekViewResult.background":"#232834","peekViewResult.fileForeground":"#707a8c","peekViewResult.matchHighlightBackground":"#ffcc6633","peekViewTitle.background":"#232834","peekViewTitleDescription.foreground":"#707a8c","peekViewTitleLabel.foreground":"#707a8c","pickerGroup.border":"#191e2a","pickerGroup.foreground":"#525a69","progressBar.background":"#ffcc66","scrollbar.shadow":"#191e2a","scrollbarSlider.activeBackground":"#707a8cb3","scrollbarSlider.background":"#707a8c66","scrollbarSlider.hoverBackground":"#707a8c99","selection.background":"#33415efd","settings.headerForeground":"#cbccc6","settings.modifiedItemIndicator":"#77a8d9","sideBar.background":"#1f2430","sideBar.border":"#1f2430","sideBarSectionHeader.background":"#1f2430","sideBarSectionHeader.border":"#1f2430","sideBarSectionHeader.foreground":"#707a8c","sideBarTitle.foreground":"#707a8c","statusBar.background":"#1f2430","statusBar.border":"#1f2430","statusBar.debuggingBackground":"#f29e74","statusBar.debuggingForeground":"#1f2430","statusBar.foreground":"#707a8c","statusBar.noFolderBackground":"#232834","statusBarItem.activeBackground":"#191e2a","statusBarItem.hoverBackground":"#191e2a","statusBarItem.prominentBackground":"#191e2a","statusBarItem.prominentHoverBackground":"#00000030","tab.activeBackground":"#1f2430","tab.activeBorder":"#ffcc66","tab.activeForeground":"#cbccc6","tab.border":"#1f2430","tab.inactiveBackground":"#1f2430","tab.inactiveForeground":"#707a8c","tab.unfocusedActiveBorder":"#707a8c","tab.unfocusedActiveForeground":"#707a8c","tab.unfocusedInactiveForeground":"#707a8c","terminal.ansiBlack":"#191e2a","terminal.ansiBlue":"#6dcbfa","terminal.ansiBrightBlack":"#686868","terminal.ansiBrightBlue":"#73d0ff","terminal.ansiBrightCyan":"#95e6cb","terminal.ansiBrightGreen":"#bae67e","terminal.ansiBrightMagenta":"#d4bfff","terminal.ansiBrightRed":"#f28779","terminal.ansiBrightWhite":"#ffffff","terminal.ansiBrightYellow":"#ffd580","terminal.ansiCyan":"#90e1c6","terminal.ansiGreen":"#a6cc70","terminal.ansiMagenta":"#cfbafa","terminal.ansiRed":"#ed8274","terminal.ansiWhite":"#c7c7c7","terminal.ansiYellow":"#fad07b","terminal.background":"#1f2430","terminal.foreground":"#cbccc6","textBlockQuote.background":"#232834","textLink.activeForeground":"#ffcc66","textLink.foreground":"#ffcc66","textPreformat.foreground":"#cbccc6","titleBar.activeBackground":"#1f2430","titleBar.activeForeground":"#cbccc6","titleBar.border":"#1f2430","titleBar.inactiveBackground":"#1f2430","titleBar.inactiveForeground":"#707a8c","tree.indentGuidesStroke":"#707a8cb3","walkThrough.embeddedEditorBackground":"#232834","widget.shadow":"#141925","minimap.background":"#28282b"},"rules":[{"foreground":"#5C6773","fontStyle":"italic","token":"comment"},{"foreground":"#BAE67E","token":"string"},{"foreground":"#BAE67E","token":"constant.other.symbol"},{"foreground":"#95E6CB","token":"string.regexp"},{"foreground":"#95E6CB","token":"constant.character"},{"foreground":"#95E6CB","token":"constant.other"},{"foreground":"#FFCC66","token":"constant.numeric"},{"foreground":"#FFCC66","token":"constant.language"},{"foreground":"#CBCCC6","token":"variable"},{"foreground":"#F28779","token":"variable.member"},{"foreground":"#5CCFE6","fontStyle":"italic","token":"variable.language"},{"foreground":"#FFA759","token":"storage"},{"foreground":"#FFA759","token":"keyword"},{"foreground":"#F29E74","token":"keyword.operator"},{"foreground":"#CBCCC6B3","token":"punctuation.separator"},{"foreground":"#CBCCC6B3","token":"punctuation.terminator"},{"foreground":"#CBCCC6","token":"punctuation.section"},{"foreground":"#F29E74","token":"punctuation.accessor"},{"foreground":"#73D0FF","token":"source.java storage.type"},{"foreground":"#73D0FF","token":"source.haskell storage.type"},{"foreground":"#73D0FF","token":"source.c storage.type"},{"foreground":"#5CCFE6","token":"entity.other.inherited-class"},{"foreground":"#FFA759","token":"storage.type.function"},{"foreground":"#5CCFE6","token":"source.java storage.type.primitive"},{"foreground":"#FFD580","token":"entity.name.function"},{"foreground":"#D4BFFF","token":"variable.parameter"},{"foreground":"#D4BFFF","token":"meta.parameter"},{"foreground":"#FFD580","token":"variable.function"},{"foreground":"#FFD580","token":"variable.annotation"},{"foreground":"#FFD580","token":"meta.function-call.generic"},{"foreground":"#FFD580","token":"support.function.go"},{"foreground":"#F28779","token":"support.function"},{"foreground":"#F28779","token":"support.macro"},{"foreground":"#BAE67E","token":"entity.name.import"},{"foreground":"#BAE67E","token":"entity.name.package"},{"foreground":"#73D0FF","token":"entity.name"},{"foreground":"#5CCFE6","token":"entity.name.tag"},{"foreground":"#5CCFE6","token":"meta.tag.sgml"},{"foreground":"#5CCFE680","token":"punctuation.definition.tag.end"},{"foreground":"#5CCFE680","token":"punctuation.definition.tag.begin"},{"foreground":"#5CCFE680","token":"punctuation.definition.tag"},{"foreground":"#FFD580","token":"entity.other.attribute-name"},{"foreground":"#F29E74","fontStyle":"italic","token":"support.constant"},{"foreground":"#5CCFE6","token":"support.type"},{"foreground":"#5CCFE6","token":"support.class"},{"foreground":"#5CCFE6","token":"source.go storage.type"},{"foreground":"#FFE6B3","token":"meta.decorator variable.other"},{"foreground":"#FFE6B3","token":"meta.decorator punctuation.decorator"},{"foreground":"#FFE6B3","token":"storage.type.annotation"},{"foreground":"#FF3333","token":"invalid"},{"foreground":"#C594C5","token":"meta.diff"},{"foreground":"#C594C5","token":"meta.diff.header"},{"foreground":"#FFD580","token":"source.ruby variable.other.readwrite"},{"foreground":"#73D0FF","token":"source.css entity.name.tag"},{"foreground":"#73D0FF","token":"source.sass entity.name.tag"},{"foreground":"#73D0FF","token":"source.scss entity.name.tag"},{"foreground":"#73D0FF","token":"source.less entity.name.tag"},{"foreground":"#73D0FF","token":"source.stylus entity.name.tag"},{"foreground":"#5C6773","token":"source.css support.type"},{"foreground":"#5C6773","token":"source.sass support.type"},{"foreground":"#5C6773","token":"source.scss support.type"},{"foreground":"#5C6773","token":"source.less support.type"},{"foreground":"#5C6773","token":"source.stylus support.type"},{"foreground":"#5CCFE6","fontStyle":"normal","token":"support.type.property-name"},{"foreground":"#5C6773","token":"constant.numeric.line-number.find-in-files - match"},{"foreground":"#FFA759","token":"constant.numeric.line-number.match"},{"foreground":"#BAE67E","token":"entity.name.filename.find-in-files"},{"foreground":"#FF3333","token":"message.error"},{"foreground":"#BAE67E","fontStyle":"bold","token":"markup.heading"},{"foreground":"#BAE67E","fontStyle":"bold","token":"markup.heading entity.name"},{"foreground":"#5CCFE6","token":"markup.underline.link"},{"foreground":"#5CCFE6","token":"string.other.link"},{"foreground":"#F28779","fontStyle":"italic","token":"markup.italic"},{"foreground":"#F28779","fontStyle":"bold","token":"markup.bold"},{"fontStyle":"bold italic","token":"markup.italic markup.bold"},{"fontStyle":"bold italic","token":"markup.bold markup.italic"},{"background":"#CBCCC605","token":"markup.raw"},{"background":"#CBCCC60F","token":"markup.raw.inline"},{"foreground":"#5C6773","background":"#CBCCC60F","fontStyle":"bold","token":"meta.separator"},{"foreground":"#95E6CB","fontStyle":"italic","token":"markup.quote"},{"foreground":"#FFD580","token":"markup.list punctuation.definition.list.begin"},{"foreground":"#A6CC70","token":"markup.inserted"},{"foreground":"#77A8D9","token":"markup.changed"},{"foreground":"#F27983","token":"markup.deleted"},{"foreground":"#FFE6B3","token":"markup.strike"},{"foreground":"#5CCFE6","background":"#CBCCC60F","token":"markup.table"},{"foreground":"#F29E74","token":"text.html.markdown markup.inline.raw"},{"foreground":"#5C6773","background":"#5C6773","token":"text.html.markdown meta.dummy.line-break"},{"foreground":"#5C6773","background":"#CBCCC6","token":"punctuation.definition.markdown"},{"foreground":"#6796E6","token":"token.info-token"},{"foreground":"#CD9731","token":"token.warn-token"},{"foreground":"#F44747","token":"token.error-token"},{"foreground":"#B267E6","token":"token.debug-token"}],"encodedTokensColors":[]} \ No newline at end of file diff --git a/src/workers/monacoCodeLensWorker.ts b/src/workers/monacoCodeLensWorker.ts index 2b1bfa45e5..0a13030b6f 100644 --- a/src/workers/monacoCodeLensWorker.ts +++ b/src/workers/monacoCodeLensWorker.ts @@ -12,7 +12,7 @@ export type MonacoCodeLens = { const klipperConfigCodeLens = (lines: string[]): MonacoCodeLens[] => { return lines .reduce>((state, lineContent, index) => { - const section = /^\[([^\]]+)\]/.exec(lineContent) + const section = /^\s*\[([^\]]+)\]/.exec(lineContent) if (section) { const lineNumber = index + 1 @@ -68,6 +68,7 @@ self.onmessage = (event: MessageEvent) => { const lines = message.content.split('\n') switch (message.language) { + case 'moonraker-config': case 'klipper-config': { const codeLens = klipperConfigCodeLens(lines) diff --git a/src/workers/monacoDocumentSymbolsWorker.ts b/src/workers/monacoDocumentSymbolsWorker.ts index b7f847e36e..6c46d1e566 100644 --- a/src/workers/monacoDocumentSymbolsWorker.ts +++ b/src/workers/monacoDocumentSymbolsWorker.ts @@ -18,7 +18,7 @@ export type MonacoSymbolChild = { const klipperConfigDocumentSymbols = (lines: string[]): MonacoSymbol[] => { return lines .reduce, range: IRange }>>((state, lineContent, index) => { - const section = /^\[[^\]]+\]/.exec(lineContent) + const section = /^\s*\[[^\]]+\]/.exec(lineContent) if (section) { state.result.push(state.current = { @@ -35,7 +35,7 @@ const klipperConfigDocumentSymbols = (lines: string[]): MonacoSymbol[] => { const isNotComment = /^\s*[^#;]/.test(lineContent) if (isNotComment && state.current) { - const property = /^(\S+)\s*[:=]/.exec(lineContent) + const property = /^\s*([^=:\s#;](?:[^=:]*[^=:\s])?)\s*[=:]/.exec(lineContent) if (property) { state.current.children.result.push(state.current.children.current = { @@ -98,6 +98,7 @@ self.onmessage = (event: MessageEvent) => { const lines = message.content.split('\n') switch (message.language) { + case 'moonraker-config': case 'klipper-config': { const documentSymbols = klipperConfigDocumentSymbols(lines) diff --git a/src/workers/monacoFoldingRangesWorker.ts b/src/workers/monacoFoldingRangesWorker.ts index 5d616794a2..ebaf7f0ade 100644 --- a/src/workers/monacoFoldingRangesWorker.ts +++ b/src/workers/monacoFoldingRangesWorker.ts @@ -129,7 +129,7 @@ const gcodeFoldingRanges = (lines: string[]): MonacoFoldingRange[] => { const klipperConfigFoldingRanges = (lines: string[]): MonacoFoldingRange[] => { const sectionBlocks = lines .reduce>((state, lineContent, index) => { - const isSection = /^\[[^\]]+\]/.test(lineContent) + const isSection = /^\s*\[[^\]]+\]/.test(lineContent) if (isSection) { state.result.push(state.current = { @@ -154,12 +154,12 @@ const klipperConfigFoldingRanges = (lines: string[]): MonacoFoldingRange[] => { lineContent = lineContent.trim() if (lineContent.length > 0) { - const isRegion = /^#region\b/.test(lineContent) + const isRegion = /^\s*#region\b/.test(lineContent) if (isRegion) { state.stack.push(index + 1) } else { - const isEndRegion = /^#endregion\b/.test(lineContent) + const isEndRegion = /^\s*#endregion\b/.test(lineContent) if (isEndRegion && state.stack.length > 0) { state.result.push({ @@ -175,12 +175,38 @@ const klipperConfigFoldingRanges = (lines: string[]): MonacoFoldingRange[] => { }, { stack: [], result: [] }) .result + const saveConfigBlocks = lines + .reduce>((state, lineContent, index) => { + lineContent = lineContent.trim() + + if (lineContent.length > 0) { + const isSaveConfigComment = /^\s*#\*#/.test(lineContent) + + if (isSaveConfigComment) { + if (state.current) { + state.current.end = index + 1 + } else { + state.result.push(state.current = { + kind: 'comment', + start: index + 1, + end: index + 1 + }) + } + } else { + state.current = undefined + } + } + + return state + }, { result: [] }) + .result + const commentBlocks = lines .reduce>((state, lineContent, index) => { lineContent = lineContent.trim() if (lineContent.length > 0) { - const isComment = /^;|#(?!(?:region|endregion)\b)/.test(lineContent) + const isComment = /^\s*(?:;|#(?!region\b|endregion\b|\*#))/.test(lineContent) if (isComment) { if (state.current) { @@ -204,6 +230,7 @@ const klipperConfigFoldingRanges = (lines: string[]): MonacoFoldingRange[] => { return [ ...sectionBlocks, ...regionBlocks, + ...saveConfigBlocks, ...commentBlocks ] } @@ -241,6 +268,7 @@ self.onmessage = (event: MessageEvent) => { break } + case 'moonraker-config': case 'klipper-config': { const foldingRanges = klipperConfigFoldingRanges(lines) diff --git a/tools/convertTheme.mjs b/tools/convertTheme.mjs deleted file mode 100644 index aa412179d0..0000000000 --- a/tools/convertTheme.mjs +++ /dev/null @@ -1,61 +0,0 @@ -/** - * This automates theme conversion from VSCode -> a textmate theme which is - * usable by Fluidd's monaco implementation. - * - * The base dark theme is Ayu Mirage - * The base light theme is VSCode's Light+ - * - * Both the klipper-config and gcode extensions must be installed before - * generating the base themes, otherwise the correct token colors won't be - * generated. - * - * You can create the base theme by using VSCodes command pallette and using - * the following command; - * Developer: Generate Color Theme From Current Settings - * - * This is all otherwise pretty horrid, and we should think about automating - * this further in the future. - * - * You can invoke this script using npm; - * npm run theme.convert - * - * which will write the appropriate theme files in their intended location. - */ -import converter from 'monaco-vscode-textmate-theme-converter' -import fs from 'fs' - -// Load the themes. -const dark = fs.readFileSync('../src/monaco/theme/base.theme.dark.json', 'utf8') -const baseDarkTheme = JSON.parse(dark) - -const light = fs.readFileSync('../src/monaco/theme/base.theme.light.json', 'utf8') -const baseLightTheme = JSON.parse(light) - -// Convert it. -const themeDark = converter.convertTheme(baseDarkTheme) -const themeLight = converter.convertTheme(baseLightTheme) - -// Our themes should have some base colors applied to match Fluidd. -themeDark.inherit = true -themeDark.colors['editor.background'] = '#28282b' -themeDark.colors['editor.lineHighlightBackground'] = '#3a3a3e' -themeDark.colors['minimap.background'] = themeDark.colors['editor.background'] -themeDark.rules.forEach(rule => { - if (rule.foreground === '#5C6773') rule.foreground = '#7C8A99' -}) - -themeLight.inherit = false -themeLight.colors['minimap.background'] = themeLight.colors['editor.background'] - -// ..and write it to the file system. -fs.writeFile('../src/monaco/theme/editor.dark.theme.json', JSON.stringify(themeDark), (err) => { - if (err) { - throw err - } -}) - -fs.writeFile('../src/monaco/theme/editor.light.theme.json', JSON.stringify(themeLight), (err) => { - if (err) { - throw err - } -})