Commit graph

177 commits

Author SHA1 Message Date
Logan Ramos 73d882bcf7
Update telemetry package (#166292) 2022-11-14 09:30:33 -08:00
Matt Bierner ca15dea96b
Pick up latest dompurify and typings for vscode-markdown-languageservice (#166062)
Pick up latest typings from vscode-markdown-languageservice
2022-11-10 21:58:16 -08:00
Logan Ramos bf1697d98c
Consume proposed telemetry API (#165862)
* Consume proposed telemetry API

* Update webpack
2022-11-08 21:58:28 -05: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 12ada73bf9
Disable markdown insert link commands in readonly editors (#164820)
Disable insert link commands in readonly editors
2022-10-27 23:52:05 +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 babb2f9677
Remove experimental tag from markdown settings (#164509) 2022-10-24 14:44:43 -07:00
Matt Bierner b11bb04298
Add optional markdown occurrences highlighting (#164292)
Fixes #164290
2022-10-21 14:19:50 -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 e1a373defd
Finalize markdown link updating on file move (#163378)
Fixes #148146
2022-10-11 17:42:10 -07:00
Matt Bierner d05d85a78b
Move html rewriting for old webviews to (#163367)
The `asWebviewUri` methods was introduced in VS Code 1.38. It's silly that we still force every single webview to pay the cost of trying to rewrite the old style uris we supported in very old versions of VS Code

Instead I've moved this logic into the extension host and disabled it for all extensions that target VS Code 1.60+ or newer. This means it never applies to internal webviews, notebooks, webview views, or custom editors (these public apis were all introduced after the switch to `asWebviewUri`)
2022-10-11 16:08:17 -07:00
Matt Bierner d47ae7a2e7
Pick up latest markdown language service version (#162777)
Fixes #162776
Fixes #162775
2022-10-05 15:08:51 -07:00
Matt Bierner 5296b0faf3
Add explicit "inherit" setting for fragments links (#162231)
Fixes #162129
2022-09-28 14:08:03 -04:00
Tyler James Leonhardt 29e985eca0
rev vscode-nls to version that doesn't ask for vscode-nls-web-data (#161819)
ref #161297
2022-09-26 11:10:54 -07: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 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
Matt Bierner ea6cfdd2ef
Pick up 8.0.2 for MD language client (#159319)
Missed updating this when pulling in new server version

https://github.com/microsoft/vscode-languageserver-node/issues/1064
2022-08-26 11:13:37 -04: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
Tyler James Leonhardt d8453c0440
Rev built-in versions of vscode-nls to 5.1.0 (#157530)
* rev version of vscode-nls to 5.1.0

* and yarn lock
2022-08-08 18:43:45 +02:00
Matt Bierner 784de60319
Add activeWebviewPanelId context key (#156944)
Fixes #156942

This context tracks the id of the active webviewPanel
2022-08-03 07:03:33 +02:00
John Murray 7e400c7137
Provide valid markdown-specific default for editor.quickSuggestions setting (#156686) (#156689)
Co-authored-by: Matt Bierner <matb@microsoft.com>
2022-08-02 13:51:41 -07:00
Matt Bierner b2daf1af82
Add MD server tracing and update diagnostics on files changes (#155797) 2022-07-21 10:07:06 -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 867acc336f
Remove references to finalized drop api (#155128) 2022-07-14 08:27:25 +02:00
Matt Bierner 2b3912fa29
Fix markdown extension path (#154656)
Fixes #154645
Fixes #154653
2022-07-10 14:25:45 +02:00
Logan Ramos a20329d291
Switch extensions to 1DS (#154299)
* Move extensions to 1DS

* Switch extensions to 1DS
2022-07-06 17:18:41 -07:00
Matt Bierner ad9675f099
Scaffold out basic markdown language server (#154293)
* Scaffold out basic markdown lsp

This scaffolds out a new markdown language server and then uses it to implement document symbols. After the change, the markdown extension will have the following structure:

- languageService — Where all the LSP language stuff will eventually land
- server — The actual language server. Consumes ` languageService`
- src — The current extension that launches the server and implements VS Code specific functions

* Adding build scripts

* a

* Use language service from github

* Remove ls build scripts

* Bump versions

* Only build ext

* Enable for web

* Fixing for browser
2022-07-06 16:03:24 -07:00
Matt Bierner 0b3574dcef
Update id of markdown-it renderer (#153876)
Fixes #153873
2022-06-30 23:19:49 +00:00
Logan Ramos 4a7a6a597a
Update extension telemetry modules (#153057) 2022-06-24 00:53:23 +00:00
Matt Bierner 5437480941
Enable md paste actions by default (#152810)
Turns on pasting of links for easier testing. However `editor.experimental.pasteActions.enabled` is still off by default so this won't be enabled by default
2022-06-22 08:19:52 +02:00
Matt Bierner 1a07fd15d7
Clarify markdown validate settings (#151997)
Clairify markdown validate settings

Fixes #150949

- Rename headerLinks -> fragmentLinks
- Add new `fileLink.markdownFragmentsLinks` to validate the headers on fragment links (inherits the default setting value from `fragmentLinks`)
2022-06-13 17:06:28 -07:00
Matt Bierner e44f4ba886
Add experimental tag to experimental extension settings (#151031)
This makes a few more extension settings with the `experimental` tag so that show up if you search `@tag:experimental`
2022-06-01 16:32:58 -07:00
Matt Bierner e4f7f6a9da
Add PasteEditProvider (#107283)
For #30066

This adds a new `documentPaste` api proposal that lets extensions hook into copy and paste.

This can be used to do things such as:

- Create link when pasting an image
- Bring along imports when copy and pasting code
2022-05-25 12:27:58 +02:00
Matt Bierner 96cae45ba9
Rename skipPaths to ignoreLinks (#150064)
This change renames the experimental skipPaths setting to ignoreLinks. This setting applies to all types of links, and can also be used to ignore links to headers
2022-05-20 22:54:21 +00:00
Matt Bierner daf0d5e551
Add skipPaths option for markdown link validation (#149859)
The new `markdown.experimental.validate.fileLinks.skipPaths` setting lets you specify a list of paths (as globs) that should not be validation

This is useful since markdown is used in a range of environments, and sometimes you may need to link to paths that don't exist on disk but will exist on deployment

A few other changes here:

- Adds a quick fix that adds paths to `skipPaths`
- Rename existing settings to use the `.enabled` prefix
2022-05-18 14:37:08 -07:00
Matt Bierner d850919250
Adds cancellation to md diagnostic computer (#149122)
This tracks inflight diagnostic computation and tries to cancel them if a new request comes in for the same document (usually because the document has changed or has been closed)
2022-05-09 15:42:32 -07:00
Matt Bierner eba8ef0547
Add diagnostics for markdown links (#148578)
* Initial work on md link diagnostics

* Adding settings to enable/disable validation

* Add delay for recomputing diagnostics

* 💄

* Split test on diagnostics compute vs management

* Validate on file open

* Remove dianostics on file close

* Allow paths to folders

* Add validation configuration option
2022-05-02 16:06:00 -07:00
Matt Bierner 032ee47056
Add setting to enable/disable markdown drop into editor
For #142990
2022-04-05 15:42:56 -07:00
Matt Bierner 0496c2b3a7
Add basic file references provider for markdown
Fixes #146267
2022-04-05 11:56:40 -07:00
rebornix 024e40fb31
💄 2022-04-04 14:20:07 -07:00
rebornix ab2a987919
fix #146750. 2022-04-04 14:19:15 -07:00
Matt Bierner 8adb42079b
Fix slow positionAt impl for markdown references
- Use `vscode-languageserver-textdocument` instead of custom impl
- Reuse `InMemoryDocument`  across tests and working code
- Use `SkinnyTextDocument` in more places
- Fixes some test errors that seem to be caused by bad `InMemoryDocument` impl
2022-03-29 18:19:52 -07:00
Matt Bierner bfc026b97a
Drop into text editor api proposal (#143334)
* Add drop into editor api proposal

For #142990

* Use AsyncEmitter
2022-03-18 11:32:11 -07:00
Logan Ramos 9b7268acf9
Update telemetry module 2022-03-18 11:34:33 -04:00
Matt Bierner 78e1b3cca8
Bump highlight JS version 2022-03-08 16:27:42 -08:00
Matt Bierner 2f48496d2b
Switch the markdown preview script to use esbuild 2022-03-08 15:48:13 -08:00
Matt Bierner 79d381f1df
Use vscode-uri instead of node's path
This makes sure we handle other types of uris instead of assuming they are all file uris
2022-03-08 15:48:13 -08:00
rebornix a93f7e0b23
indentation. 2022-02-16 18:05:40 -08:00