Matt Bierner
1eee7ae230
Switch monaco to off of moduleResolution: classic
...
Fixes #270408
Trying to move some of the monaco related checks/tconfigs off of `moduleResolution: classic`. This legacy config is causing a lot of pain while trying to update the trusted-types typings, which is itself blocking picking up the latest dompurify
I initially tried a more scoped change but just could not get it working. So instead I ended up trying to rework our `LanguageServiceHost` to be more standard
2025-10-10 16:02:03 -07:00
Henning Dieterichs
8b01ac01a7
Fixes https://github.com/microsoft/vscode-internalbacklog/issues/5894
2025-10-01 13:29:55 +02:00
Alexandru Dima
e83d239a0a
Extract more types for reuse ( #264032 )
2025-08-29 09:07:09 -07:00
Remco Haszing
c2f435a9bb
Fix global access of MonacoEnvironment ( #248075 )
...
Fix global access of MonacoEnvironment
There are 3 ways to declare global variables in TypeScript.
1. A global `declare let`.
2. A global `declare var`.
3. Augmenting the global `Window`.
There are 4 ways to access global variables in the browser.
1. Using a global identifier.
2. Using the `globalThis` object.
3. Using the `window` object.
4. Using the `self` object.
Not all 3 types of global declarations work for all methods to access a
global.
| | `let` | `var` | `Window` |
| ------------ | ----- | ----- | -------- |
| global | ✓ | ✓ | |
| `globalThis` | | ✓ | |
| `window` | | ✓ | ✓ |
| `self` | | ✓ | ✓ |
So the proper way to declare the global `MonacoEnvironment`, is:
```ts
declare global var MonacoEnvironment: Environment | undefined
```
https://www.typescriptlang.org/play/?#code/PQgEB4CcFMDNpgOwMbVAGwJYCMC8AiAEwHsBbfUYAPgFgAoew6ZdAQxlAHN1jtX1QAb3qhRGaABdQAGUkAuUAGcJkTIk4ixAN3agAauwXLV6+ptFqJCWK1SgA6mpIB3IebGjHiIyrUa6HgC+9MEMdGDcvPygtqiKivSyEvQGkPReZuHAoM5OxK6ckvS5iC4AdEnFec5lqVWl+WUZYWAlLkpFdG2NSaC4oADkA-XlqX2Dw13VTWrjQ5kRPHzoACoAFpiKXJ2Ry+ubFTtL-PuKtez0uycbZ830i1GrNx3JdFdPB73982-HH2djb6Td6nGaIOaTe7ZRTQdCwbavGFww6I2Gwc5pOhI9F3LIdOEvejYlEQolojGkrHkryU+jQAAeAAdiJApIJAkA
---------
Co-authored-by: Henning Dieterichs <hdieterichs@microsoft.com >
2025-08-04 13:23:01 +00:00
Henning Dieterichs
b2860b1398
Fixes ci
2025-05-07 12:40:34 +02:00
Alex Dima
c36caf1bf7
EditorSimpleWorker -> EditorWebWorker
2025-03-21 10:13:39 +01:00
Alex Dima
46035d0296
Split up the editor's worker and the editor worker helper scripts, remove AMD support
2025-03-20 18:37:55 +01:00
Henning Dieterichs
855102691b
Implements https://github.com/microsoft/vscode-copilot/issues/11599
2025-02-11 18:38:31 +01:00
Henning Dieterichs
094e96a2ea
Introduces IObservableWithChange so that typescript does not show the default type for TChange in hovers. ( #236629 )
...
* Introduces IObservableWithChange so that typescript does not show the default type for TChange in hovers.
This should make it easier to understand types when observables (potentially nested) are involved.
* Fixes monaco editor
2024-12-20 19:55:45 +01:00
Alexandru Dima
4e0de3a8f4
Move workbench workers off EditorWorker ( #225796 )
...
* Add support for having channels in SimpleWorker
* Extract text model syncing code to a separate file
* Use a channel to do text model syncing for the language detection worker
* Simplify code
* Remove unused method
* Move OutputLinkComputer worker off editor worker
* Move TextMateTokenizationWorker off editor worker
* Simplify code
* Adopt channels for the host object
* More adopting channels for the host object
* More adopting channels for the host object
* More adopting channels for the host object
* Remove host object support from SimpleWorker
* Use the IEditorWorkerService, avoid starting a separate worker
* Bring the amd module id, the esm location and the worker label in a single type
* Improve typings
* SImplify worker creation pattern
* Enforce that all proxied methods start with `$` or `on`
* Adopt native proxy support
* Simplify code
* Simplify code
* Reintroduce a different standalone / workbench editor worker service
2024-08-20 14:00:18 +02:00
Henning Dieterichs
f26376f1f5
Removes unneeded monaco-editor-esm-bundle
2023-11-15 19:41:53 +01:00
Alexandru Dima
8513a34ce4
Add IEditorAction.metadata ( #197442 )
2023-11-04 14:26:47 +01:00
Henning Dieterichs
e0e970f76b
Removes legacy diff editor. ( #191989 )
...
* Removes legacy diff editor.
* Fixes CI
* Fixes CI
2023-09-04 22:45:27 +02:00
Henning Dieterichs
65e921c5b8
Removes support to pass in diff algorithm via option in favor of a service.
...
Fixes https://github.com/microsoft/monaco-editor/issues/3558
2023-09-04 17:52:54 +02:00
Henning Dieterichs
fe25a72de8
Fixes CI
2023-09-01 14:43:31 +02:00
Henning Dieterichs
4d53e0a136
Fixes CI
2023-09-01 14:43:31 +02:00
Henning Dieterichs
905931a868
Fixes CI
2023-08-24 15:44:33 +02:00
Alpha Romer Coma
7ef754c2f6
Fix supported markdown-lint violations in markdown files ( #190750 )
...
docs: fix supported markdownlint violations
2023-08-24 08:37:25 +00:00
Max Schmitt
9e0f5fb2dd
chore(monaco): make createTrustedTypesPolicy optional ( #185454 )
2023-06-22 07:23:20 +00:00
Henning Dieterichs
aa88e727da
Implements initial version of moved code detection. ( #184336 )
...
* Implements initial version of moved code detection.
* Fixes monaco.d.ts
* Fixes tests.
2023-06-05 08:50:55 -07:00
Alex Dima
1331522372
Avoid using types defined in @types/trusted-types
2023-06-02 12:32:46 +02:00
Alexandru Dima
828118d55e
Allow embedders to intercept trustedTypes.createPolicy calls ( #184093 )
2023-06-01 15:20:10 -07:00
Henning Dieterichs
b816a3ffaf
Fixes CI
2023-04-26 23:31:20 +02:00
Sebastian Pahnke
107a4809df
Expose EditorZoom in the monaco API
2023-03-14 10:02:19 +01:00
Henning Dieterichs
2a290b6a72
Move lineRange to editor/common/core and adds editor.experimental.asyncTokenizationLogging ( #176408 )
...
* Move lineRange to editor/common/core and adds editor.experimental.asyncTokenizationLogging
* Fixes CI
2023-03-07 18:00:08 +01:00
Martin Aeschlimann
d4237bd8d5
merge ThemeIcon and CSSIcon ( #171279 )
2023-01-13 20:15:16 +01:00
Henning Dieterichs
3e19ba91ff
Allows to pass in a custom diffing algorithm when instantiating the monaco diff editor. ( #165179 )
...
* Allows to pass in a custom diffing algorithm when instantiating the monaco diff editor.
* Undo launch.json change
2022-11-16 08:48:39 +01:00
Matt Bierner
0c6cc3a886
Let markdown strings specify a list of commands that they allow ( #163915 )
...
* Let markdown strings specify a list of commands that they allow
Fixes #163913
* Fix name
2022-10-24 14:15:44 -07:00
Henning Dieterichs
516f0d1246
Introduces diffing infrastructure & experimental diffing algorithm. ( #157646 )
...
* Introduces diffing infrastructure & experimental diffing algorithm.
* Fixes CI
* Fixes unit test
* Fixes CI tests.
2022-08-09 18:03:26 +02:00
Johannes
b9cbee9fac
only allow primitive values in context keys
2022-04-22 16:20:43 +02:00
Alexandru Dima
071578a215
Merge pull request #143610 from CodinGame/replace-languageid-by-languageselector
2022-02-22 15:20:34 +01:00
Loïc Mangeonjean
ea15f61429
Allow getWorker function to return a promise
2022-02-22 13:52:41 +01:00
Loïc Mangeonjean
7a0a128dfc
Replace languageId by languageSelector in all language feature registration functions
2022-02-22 13:40:30 +01:00
Matt Bierner
356d29fbf1
Remove most SyncDescriptorN forms ( #141976 )
...
* Remove most SyncDescriptorX forms
From what I can tell, `SyncDescriptor0` is the only one of these types still being used. In order to speed up TS's type checking around `createInstance`, I think it makes sense to remove the unused forms
* Remove `SyncDescriptorN` from tree shaker usages
Co-authored-by: Alex Dima <alexdima@microsoft.com >
2022-02-02 13:45:05 -08:00
Alex Dima
67f1f74cd2
Fix monaco.d.ts.recipe
2022-01-31 12:40:35 +01:00
Alex Dima
7a0a293b38
Move more interfaces up to editor/common/ ( #141174 )
2022-01-31 11:33:58 +01:00
Alex Dima
6ef782af54
Remove dependencies to /languages/ in languages.ts ( #141174 )
2022-01-21 23:32:44 +01:00
Alex Dima
d2fb5e2364
Fix recipe file
2022-01-21 23:06:19 +01:00
Alex Dima
d48b3d3360
Extract IDimension to /core/ ( #141174 )
2022-01-21 22:30:58 +01:00
Alex Dima
298441a007
Move wordHelper.ts and extract EDITOR_MODEL_DEFAULTS to /core/ ( #141174 )
2022-01-21 22:10:48 +01:00
Alex Dima
bf1e923356
Move IEditorConstructionOptions to /config/ ( #141174 )
2022-01-21 21:52:42 +01:00
Alex Dima
d60d6bb136
Move editor base api to /services/ ( #141174 )
2022-01-21 20:57:00 +01:00
Alex Dima
01f9704460
Rename editor/common/controller to editor/common/cursor ( #141174 )
2022-01-21 20:35:36 +01:00
Alex Dima
2661e7a3ad
Move token.ts to /languages/ ( #141174 )
2022-01-21 20:35:36 +01:00
Alex Dima
d8ca757f2b
Move ISingleEditOperation to /core/ ( #141174 )
2022-01-21 20:35:35 +01:00
Alex Dima
df551b856e
Move change interfaces to diffComputer ( #141174 )
2022-01-21 19:58:00 +01:00
Alex Dima
d018132104
Move defaultWorkerFactory.ts to /browser/ ( #140857 )
2022-01-17 17:23:31 +01:00
Raymond Zhao
e794a5444b
Remove some "here" links to be more descriptive
...
Ref #140059
2022-01-03 15:03:38 -08:00
Alex Dima
973684056e
Rename modes to languages
2021-12-30 18:52:15 +01:00
Alex Dima
c8e2fd7bae
Renames
2021-12-29 00:37:35 +01:00