Commit Graph

353 Commits

Author SHA1 Message Date
Matt Bierner
b95968eafb Don't include inline source maps in markdown preview scripts 2020-06-17 15:24:16 -07:00
Miguel Solorio
fe70e8e27b Update markdown extension to use codicons (fixes #99976) 2020-06-12 11:30:53 -07:00
Martin Aeschlimann
917064c80c move polyfills to build/polyfills 2020-06-11 21:54:43 +02:00
Martin Aeschlimann
0a5e259993 web: turn off markdown performance hints 2020-06-11 11:37:58 +02:00
Martin Aeschlimann
e9c7969f93 add polyfills/** to vscodeignore 2020-06-11 10:18:39 +02:00
Matt Bierner
1275b918be Use joinPath in a few more places 2020-06-10 16:44:10 -07:00
Matt Bierner
b5ba760623 Adopt Uri.joinPath
For #99717
2020-06-09 16:08:42 -07:00
Matt Bierner
a51205f59d Fix markdown preview in serverless
For #99717
2020-06-09 16:04:47 -07:00
Matt Bierner
b42086b6eb Enable markdown language features for web/serverless 2020-06-09 15:32:18 -07:00
Benjamin Pasero
588097171c Refactor our font stack (#99429)
* fonts - adopt monaco-monospace-font in more places and make it consistent

* font - use platform specific fonts in more places

* font - move system-ui before Ubuntu font in places where we cannot control platform

* font - only use system-ui on Linux

* fonts - adjust font stack for other windows
2020-06-05 10:56:07 +02:00
Matt Bierner
3e9b7f5072 Fix markdown fontsize
Fixes #98178
2020-05-20 15:40:27 -07:00
Matt Bierner
4da345ea2b Clairify breaks setting effect
Fixes #97382
2020-05-11 17:33:28 -07:00
Matt Bierner
df88d8a7ef Use vscode editor font variable in markdown preview
Fixes #97374
2020-05-11 14:23:16 -07:00
Danny Lin
ff118340b5 Use system-ui alias for UI fonts (fixes #10144) (#96948)
Commit 45d93e9325 applied this change in
some areas, but it was reverted to fix #28619. The underlying cause of
the regression was Chromium bug 733219 [1], which has now been fixed, so
this change should be safe to apply now.

The old font stacks have been kept with lower priorities to work around
Chromium bug 724393 [2].

[1] https://bugs.chromium.org/p/chromium/issues/detail?id=733219
[2] https://bugs.chromium.org/p/chromium/issues/detail?id=724393
2020-05-08 08:21:40 +02:00
Matt Bierner
41ca01f942 Remove console log
Fixes #96915
2020-05-04 17:28:33 -07:00
Matt Bierner
7d238f4281 Add 'open with' to the explorer context menu (#95805)
This change primarly adds a new `Open with...` entry to the explorer context menu. To do this however, I had to make a few other changes:

- Add a new explorer context key for availible editors
- Moved the editor select prompt into a new function called `openEditorWith`
- Use `openEditorWith` for the new `open with` explorer command as well as for the `reopen with` command
2020-04-23 14:16:36 -07:00
Thomas Weingartner
b5136c0c79 Fix to 'Markdown Preview of relative links drops 'host' from path' (#95092)
* Fix #93691

* Fix #93961
2020-04-13 14:43:00 -07:00
Matt Bierner
e7bc301be6 When clicking on a link to a folder in markdown, reveal the folder
Fixes #91336
2020-04-13 13:02:14 -07:00
Matt Bierner
9cfd597153 Rework markdown preview code to better support markdown preview editors
Splits the preview part of the markdown preview from the dynamic preview management part of things. Static preview swap to preview the active markdown file and don't scroll sync with any other markdown files
2020-04-11 17:30:12 -07:00
Ilia Pozdnyakov
f3a31a4eeb fix uri fragment slugification #94508 (#94655) 2020-04-09 14:21:18 -07:00
Matt Bierner
d4ce7148dd New custom editor API proposal
For #77131

Fixes #93963
Fixes #94515
Fixes #94517
Fixes #94527
Fixes #94509
Fixes #94514
Fixes #93996
Fixes #93913

This removes explicit edits from the API and reshapes the API to more closely match VS Code's internal API. The change also tries to better express the lifecycle of backups
2020-04-08 17:53:39 -07:00
Matt Bierner
d41997790c Remove CustomDocument.viewType
Fixes #93867
For #77131

This property is no longer needed (or very helpful) with the current api design
2020-03-31 12:00:17 -07:00
Matt Bierner
579dab3196 Update custom editor api
For #77131

- Use a class for `CustomDocument` instead of an interface. Extensions can now add their own data to a `CustomDocument` by sublassing

- Renamed `resolveCustomDocument` to `openCustomDocument` and require that extensions return a `CustomDocument`

- Exposed edits on `CustomDocument`

- Made the third parameter of `registerCustomEditorProvider` a generic options bag that takes a `webviewOptions`
2020-03-23 13:10:49 -07:00
Huachao Mao
9abd38f362 Fix typo of word extension (#93178) 2020-03-23 12:32:32 -07:00
dependabot[bot]
83c5b1c9bd Bump acorn from 6.3.0 to 6.4.1 in /extensions/markdown-language-features (#92742)
Bumps [acorn](https://github.com/acornjs/acorn) from 6.3.0 to 6.4.1.
- [Release notes](https://github.com/acornjs/acorn/releases)
- [Commits](https://github.com/acornjs/acorn/compare/6.3.0...6.4.1)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2020-03-16 10:16:40 -07:00
Matt Bierner
9dae408dc3 Switch webview api back to use delegate model
For #77131

Going back the the delegate based model for a few reasons:

- It gives us a better approach to add additional API hooks in the future (such as for rename)

- In practive, the capabilities were almost always the same as the `userData` on the document. It is rather confusing to have both `userData` and the capabilities 'on' the document
2020-03-12 16:54:48 -07:00
Benno
0b3e54edb1 update #91296 allow multiple workspace roots (#92082)
* update #91296 allow multiple workspace roots

* update #92082
2020-03-09 12:56:54 -07:00
Pine Wu
2362584a62 Revert "Fix #73803"
This reverts commit 67e6aef0c8.
2020-03-06 00:30:14 -08:00
Pine Wu
4857a9a746 Revert "Fix integration test"
This reverts commit 5a0ab960f0.
2020-03-06 00:29:57 -08:00
Pine Wu
5a0ab960f0 Fix integration test 2020-03-05 12:41:06 -08:00
Pine Wu
67e6aef0c8 Fix #73803 2020-03-05 11:34:58 -08:00
Matt Bierner
022b6c6d23 Use customtexteditor for markdown editor 2020-03-04 14:14:31 -08:00
Matt Bierner
6e30cf38a7 Mark markdown comment folding regions as comments
Fixes #91271
2020-03-02 11:26:29 -08:00
Matt Bierner
dc68e6578e rename custom editor activation event
For #77131

Renames the activation event from `onWebviewEditor` to `onCustomEditor` to be consistent with the reset of the API
2020-02-26 10:59:36 -08:00
Matt Bierner
dc1e7871b8 Rename custom editor contribution point
Renaming to match new API proposal
2020-02-25 10:55:41 -08:00
Matt Bierner
8291f8c152 Polishing of custom editor api proposal for 1.43 release
For #77131
2020-02-25 10:55:41 -08:00
Matt Bierner
99d5733e5f New iteration of webview editor API proposal
For #77131

**Motivation**
While our existing webview editor API proposal more or less works, building an editable webview editor is fairly tricky using it! This is especially true for simple text based editors.

It'd also be nice if we could get bi-directional live editing for text files. For example, if I open the same file in a webview editor and in VS Code's normal editor, edits on either side should be reflected in the other. While this can sort of be implemented using the existing API, it has some big limitations

**Overview of changes**
To address these problems, we've decided have two types of webview editors:

- Text based webview editors. These editors used a `TextDocument` as their data model, which considerably simplifies implementing an editable webview. In almost all cases, this should be what you use for text files

- Complex webview editors. This is basically the existing proposed API. This gives extension hooks into all the VS Code events, such as `save`, `undo`, and so on. These should be used for binary files or in very complex text editor cases.

Both editor types now have an explicit model layer based on documents. Text editor use `TextDocument` for this, while custom editors use `WebviewEditorCustomDocument`. This replaces the delegate based approach previously used.
2020-02-21 16:26:01 -08:00
태재영
a03df2d635 update markdown-it-front-matter version (#90122) 2020-02-10 14:45:13 -08:00
Benjamin Pasero
c2444b42af tests - proper text fixtures dir 2020-02-10 15:33:04 +01:00
Matt Bierner
b1c5e2f19b Don't include dom typings in extensions (#89942)
**Problem**
All of our extensions currently are built using the dom typings. This can lead to runtime errors if you mistakenly use `window` or similar

**Fix**
Exclude the dom typings from compile. Then explicitly import the node types for `URL` and `TextEncoder`
2020-02-04 11:08:22 -08:00
Johannes Rieken
856d085279 run "eslint --fix" to get some changes for free 2020-01-02 20:14:09 +01:00
Jonathan Carter
780d875d6f Remove scheme restriction for Markdown/Emmet language features (#87541)
* Remove scheme restriction for Markdown/Emmet

* Explicitly marking scheme support
2019-12-29 17:11:38 -07:00
Matt Bierner
8e475f9b24 Implement draft 2 from #86802 (#87117) 2019-12-16 14:18:58 -08:00
Matt Bierner
007b3032ad Update to TS 3.7.3 for building VS Code 2019-12-11 15:58:59 -08:00
Martin Aeschlimann
eeee6244d9 [josn] fix wrong schema-schema reference, use draft-07 everywhere 2019-12-05 11:15:39 +01:00
Matt Bierner
97855786a0 Fix absolute paths in markdown preview on windows
Fixes #84728

We should use `.fsPath` for both parts of the uri in this case.
2019-12-02 19:45:44 -08:00
Andrew Liu
37eeb3755a quick fix (#85506) 2019-11-25 11:30:04 -08:00
Matt Bierner
0e5a5f6524 Better time logging for js + markdown
We don't need full date, only times
2019-11-19 11:22:08 -08:00
Matt Bierner
5b428d2ec1 Don't use locale strings
For #84803

These can cause issues on node 12
2019-11-18 09:35:35 -08:00
Matt Bierner
40b8c9d073 Allow _ in markdown word definitions 2019-11-14 15:35:46 -08:00