* 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
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`)
* 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
* 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
* 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
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
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`)
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
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
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
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)
* 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
- 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