185 Commits

Author SHA1 Message Date
Matt Bierner
7a7d45793b
Allow external copying files into the workspace on markdown drop / paste (#182572)
Allow copying files in the workspace on markdown drop / paste

Fixes #157043

Also:

- Renames the markdown paste settings and makes them no longer experimental
- Makes the copyFiles setting no longer experimental
- Adds a `markdown.copyFiles.overwriteBehavior` which lets you control if/how existing files are overwritten
2023-05-15 20:17:52 -07:00
Matt Bierner
4d38422afe
Add priority to paste / drop apis (#182109)
* Add priority to paste / drop apis

Fixes #181886

Replacement for #181453

* Make notebooks prefer text over creating attachments
2023-05-10 14:18:05 -07:00
Matt Bierner
ca51a4b04c
Add paste as command (#181959)
For #30066

This command shows a quick pick that lets you select how to paste content
2023-05-10 06:17:42 -07:00
Matt Bierner
83c12a2da2
Allow creating multiple files or attachments on paste (#181975) 2023-05-09 17:20:37 -07:00
Matt Bierner
ab0a574bb9
Don't enable paste to create files in untitled files (#181929) 2023-05-09 20:45:19 +02:00
Michael Lively
2a6b42a71c
enable paste widget for notebook cells 2023-05-03 09:51:29 -07:00
Matt Bierner
11ca8d75a1
Add widget to change how content is pasted (#181290)
* Add widget to change how content is pasted

For #30066

This adds a widget that lets you change how content is pasted if there are multiple ways it could be pasted

To do this, I've made the post drop widget generic and reused it for pasting too

* Update types

* More code deduplication
2023-05-02 09:40:04 +02:00
Matt Bierner
3273501a5a
Address drop UX feedback (#180343)
- Reduce margin on button
- Change icon to insert
- Try to align styling to match other editor widgets
- Use capital casing on entries
2023-04-19 19:05:56 +02:00
Matt Bierner
f6de066b4c
Improve labels when dropping resources into markdown files (#180260) 2023-04-18 15:11:38 -07:00
Matt Bierner
739b93cce8
Update drop metadata proposal (#179918)
- Makes `dropMimeTypes` required
- Prefix the actual `id` used internally with the extension id
- Allow wildcard mime types, such as `image/*`
2023-04-14 07:59:38 +10:00
Matt Bierner
830d534e27
Allow passing in a DataTransferFile to workspace edit (#175809)
* Allow passing in a `DataTransferItem` to workspace edit

Fixes #175800

Allows you to pass a file `DataTransferItem` to `WorkspaceEdit.createFile`. This lets us avoid transferring the data back and forth to the extension host, and also avoid having to base64 encode and decode it, significantly improving performance for large files

* Take data transfer file instead of data transfer item
2023-04-13 14:08:08 -07:00
Matt Bierner
e9262678fa
Add drop feedback UX (#179434)
For #179430

Adds two new UX components:

- An inline progress icon shown when a drop operation takes over 500ms. This replaces the notification. You can click on it to cancel the drop

- Post drop, a drop feedback icon that lets you drop the file in a different way. This lets you drop the file as plain text for instance instead of as a markdown link
2023-04-11 13:48:24 -07:00
Joyce Er
812f3f5fc4
Insert <video> tag for shift+mp4 into .md (#179489)
* Insert `<video>` tag for `shift`+mp4 into .md

* Simpler drop text
2023-04-10 15:30:34 -07:00
Matt Bierner
7570fadcce
Split uri-lists on \r\n for markdown drop (#175552)
Fixes #175547
2023-02-27 17:55:04 +01:00
Matt Bierner
fc763d98df
Re-apply markdown copy files setting (#169661)
* Revert "Revert "Add experimental setting to define where files should be copied for markdown (#169454)" (#169615)"

This reverts commit b2121c2dbe23e4808c86722bc3ee50942de69da7.

* Fix tests

These paths should always use `/`
2022-12-20 11:04:51 -08:00
Christof Marti
b2121c2dbe
Revert "Add experimental setting to define where files should be copied for markdown (#169454)" (#169615)
This reverts commit 1d6b47a005f6597a82c18587718eee99f7d5acda.
2022-12-20 10:03:12 +01:00
Matt Bierner
1d6b47a005
Revert 1d0a9f9e63593f5ee19b9282c9ed2f0b928b862e (#169578)
Resubmits the original PR with test fixes for windows
2022-12-19 14:25:37 -08:00
Benjamin Pasero
1d0a9f9e63
Revert "Add experimental setting to define where files should be copied for markdown" (#169492)
Revert "Add experimental setting to define where files should be copied for markdown (#169454)"

This reverts commit 09c0b1f799d75edf284bc89c824bdd724c5b0fa7.
2022-12-18 14:11:45 -08:00
Matt Bierner
09c0b1f799
Add experimental setting to define where files should be copied for markdown (#169454)
For #157043
2022-12-16 16:23:59 -08:00
Matt Bierner
9b3371e6e3
Fix path sep for markdown drop on windows (#167862)
Fixes #167824
2022-12-01 19:27:21 +01:00
Matt Bierner
a62879bb46
Try computing windows paths correctly on markdown drop (#166077)
Fixes #165352
2022-11-13 15:03:05 -08:00
Matt Bierner
cd29f751eb
Adopt l10n for markdown extension (#165448)
For #164438

Also makes our eslint rules understand `vscode.l10n.t(`
2022-11-04 09:49:49 +01:00
Matt Bierner
33867c55f3
Adopt prefix private with _ in markdown extension (#165088) 2022-10-31 14:22:39 -07:00
Matt Bierner
0570a7678d
Use posix path for markdown links (#164822)
Fixes #164782
2022-10-27 19:21:03 +02:00
Matt Bierner
1316bf789f
Rework markdown update link glob (#164766)
* Rework markdown update link glob

Fixes #164587

This changes the `externalFileGlobs` setting to instead be a include array of globs that should trigger link updates. I've split the globs into markdown files and image/video files

This also makes it easier for users to add their own new globs to the list

* Fix scopes
2022-10-27 01:45:45 +02:00
Matt Bierner
7060fb81dd
Shorten markdown link button titles (#164764)
Fixes #164556
2022-10-27 00:39:30 +02:00
Matt Bierner
882cdc0a17
Use newlines to separate inserted images (#164632)
Fixes #164610
2022-10-25 12:21:36 -07:00
Matt Bierner
641046a11d
Add commands to insert images/links in markdown (#163706)
* Add commands to insert images/links in markdown

Fixes #162809

* Rename commands and allow passing in uris

* Support selecting many images/files
2022-10-14 16:05:36 -07:00
Matt Bierner
186d3415a3
Use ??= in more places (#163594) 2022-10-13 14:59:35 -07:00
Matt Bierner
e1a373defd
Finalize markdown link updating on file move (#163378)
Fixes #148146
2022-10-11 17:42:10 -07:00
Matt Bierner
3ee9749b35
Remove extra enums (#162686)
`showMessage` returns the selected item, so we don't need to create an enum here and can instead used the returned items directly
2022-10-04 10:46:53 -07:00
Matt Bierner
023930e3dc
Fix extra dot in pasted file names (#161434) 2022-09-21 23:29:21 +02:00
Matt Bierner
17bb582b85
Finalize markdown diagnostics (#161427)
Fixes #146303

This moves the markdown diagnostic support out of `experimental` and to an official feature (however it remains off by default)
2022-09-21 12:20:25 -07:00
Matt Bierner
333754f29b
Better handle moves of multiple markdown links (#161354)
This makes the markdown language service handle moving/renaming multiple files instead of making multiple calls into the language service
2022-09-20 21:53:58 -07:00
Matt Bierner
d03f015931
Clean up structure of markdown extension (#161148)
- Move things related to the client under `client`
- Remove extra abstractions that are no longer used
- Add MdLanguageClient type
2022-09-19 07:16:45 +02:00
Peng Lyu
0f05c6dd4f
Fix #160729. Disable workspace md paste handler for notebook. (#160833)
Co-authored-by: Matt Bierner <matb@microsoft.com>
2022-09-15 09:48:21 -07:00
Matt Bierner
3729f509b5
Support creating image in workspace when pasting image data into markdown (#160554)
For #157043
2022-09-10 08:56:18 -07:00
Matt Bierner
c4722f1bb2
Write markdown link setting change to correct scope (#159816)
Fixes #159084

Also fixes the same issue for JS/TS
2022-09-02 13:38:41 +10:00
Matt Bierner
d9fd208c29
Default to workspace root when dropping into untitled md files (#159814)
Fixes #159812
2022-09-01 16:03:40 -07:00
Matt Bierner
940abc9c11
Fix workspace edit format for update md paths on move (#158965)
Unblocks testing #158416
2022-08-23 16:33:00 -07:00
Matt Bierner
b731beeef4
Use notebook document uri for drop / copy paste (#157939)
Fixes #157938
2022-08-11 19:52:55 +01:00
Matt Bierner
38ea5c22a6
Pick up new markdown LS version (#157843) 2022-08-10 18:16:24 -07:00
Matt Bierner
8bf82819fc
Add experimental support for update markdown links on file moves/renames (#157209)
* Add experimental support for update markdown links on file moves/renames

Fixes #148146

This adds a new experimental setting that automatically updates markdown

Note that this needs a new version of the vscode-markdown-languageservice so the build is expected to break for now

* Pick up new LS version
2022-08-09 08:31:40 -07:00
Matt Bierner
32f5e49082
Move MD diagnostics to language server (#155653)
* Move MD diagnostics to language server

This switches us to using the LSP pull diagnostic model with a new version of the language service

* Bump package version

* Delete unused file
2022-07-19 16:34:09 -07:00
Matt Bierner
9ee8961347
Move MD references, rename, and definition support to md LS (#155127) 2022-07-14 08:32:27 +02:00
Matt Bierner
bec36ce756
Move md path completions and document links to language server (#155100) 2022-07-13 12:49:37 -07:00
Matt Bierner
75e231ad82
Clean up document link resolve (#154959)
- Move vscode scheme normalization to the DocumentLinkProvider
- Remove extra function since we already recognize uri-like links
2022-07-12 15:55:21 -07:00
Matt Bierner
eeb8d49317
Move md workspace symbol search to language service (#154874)
* Move md workspace symbol search to language service

Also implements more of IWorkspace for the server

* Revert extra change
2022-07-12 10:04:25 -04:00
Matt Bierner
c9bf4393d5
Rename drop API interface (#154876)
Makes the names more consistent
2022-07-12 11:33:13 +02:00
Matt Bierner
e02c71e3c6
Fix range of reference links (#154819)
Fixes #150921
2022-07-11 17:46:15 +02:00