mirror of
https://github.com/microsoft/PowerToys
synced 2025-08-31 06:25:20 +00:00
Add information about how to add new languages to monaco (#24906)
* Add information about how to add new languages to monaco * Update expect.txt * Update doc/devdocs/modules/FileExplorer/monaco/readme.md Co-authored-by: Jay <65828559+Jay-o-Way@users.noreply.github.com> * Adress PR feedback * fix spelling errors * Update doc/devdocs/modules/FileExplorer/monaco/readme.md Co-authored-by: Heiko <61519853+htcfreek@users.noreply.github.com> * Update readme.md * Update readme.md * Address PR comments * Fix spelling * address PR comments * address PR comments and move files * Update expect.txt * Update doc/devdocs/common/readme.md Co-authored-by: Heiko <61519853+htcfreek@users.noreply.github.com> * Update doc/devdocs/common/FilePreviewCommon.md Co-authored-by: Heiko <61519853+htcfreek@users.noreply.github.com> * Update doc/devdocs/common/FilePreviewCommon.md Co-authored-by: Heiko <61519853+htcfreek@users.noreply.github.com> * Update doc/devdocs/common/FilePreviewCommon.md Co-authored-by: Heiko <61519853+htcfreek@users.noreply.github.com> * Update doc/devdocs/common/FilePreviewCommon.md Co-authored-by: Heiko <61519853+htcfreek@users.noreply.github.com> * Update doc/devdocs/common/FilePreviewCommon.md Co-authored-by: Stefan Markovic <57057282+stefansjfw@users.noreply.github.com> * Apply suggestions from code review Co-authored-by: Stefan Markovic <57057282+stefansjfw@users.noreply.github.com> * Adress PR comments * Fix spelling * Adress PR comments * Add peek stub documentation * Update doc/devdocs/common/FilePreviewCommon.md Co-authored-by: Stefan Markovic <57057282+stefansjfw@users.noreply.github.com> * Update doc/devdocs/common/FilePreviewCommon.md * Fix spelling --------- Co-authored-by: Jay <65828559+Jay-o-Way@users.noreply.github.com> Co-authored-by: Heiko <61519853+htcfreek@users.noreply.github.com> Co-authored-by: Stefan Markovic <57057282+stefansjfw@users.noreply.github.com>
This commit is contained in:
committed by
GitHub
parent
93a422ca9b
commit
a4260d7cbd
7
doc/devdocs/modules/peek/readme.md
Normal file
7
doc/devdocs/modules/peek/readme.md
Normal file
@@ -0,0 +1,7 @@
|
||||
# PowerToys Peek
|
||||
|
||||
> Documentation is currently under construction
|
||||
|
||||
## Dev file previewer
|
||||
|
||||
The previewer for developer files uses the project in [FileExplorerCommon] common project to render monaco. You can find its documentation here: [/doc/devdocs/common/FilePreviewCommon.md](/doc/devdocs/common/FilePreviewCommon.md).
|
@@ -1,24 +0,0 @@
|
||||
# Developer Preview (Monaco)
|
||||
|
||||
Developer preview is based on [Microsoft's Monaco Editor](https://microsoft.github.io/monaco-editor/) which is maintained by the Visual Studio Code team.
|
||||
|
||||
## Update monaco editor
|
||||
|
||||
1. Download Monaco editor with npm: `npm i monaco-editor`.
|
||||
2. Delete everything except the `min` folder (the minimised code).
|
||||
3. Copy the `min` folder inside the [`monacoSRC`](/src/modules/previewpane/MonacoPreviewHandler/monacoSRC) folder.
|
||||
4. Generate the JSON file (see section below)
|
||||
|
||||
## monaco_languages.json
|
||||
|
||||
[`monaco_languages.json`](/src/modules/previewpane/MonacoPreviewHandler/monaco_languages.json) contains all extensions and Id's for the supported languages of Monaco. The [`FileHandler`](/src/modules/previewpane/MonacoPreviewHandler/FileHandler.cs) class and the installer are using this file.
|
||||
|
||||
### Generate monaco_languages.json file
|
||||
|
||||
After you updated monaco editor or adding a new language you should update the [`monaco_languages.json`](/src/modules/previewpane/MonacoPreviewHandler/monaco_languages.json) file.
|
||||
|
||||
You have to run the file on a local webserver!
|
||||
|
||||
1. Build monaco in debug mode.
|
||||
2. Open [generateLanguagesJson.html](/src/modules/previewpane/MonacoPreviewHandler/generateLanguagesJson.html) in a browser.
|
||||
3. Replace the old JSON file.
|
Reference in New Issue
Block a user