Commit Graph

778 Commits

Author SHA1 Message Date
Matt Bierner
7060fb81dd Shorten markdown link button titles (#164764)
Fixes #164556
2022-10-27 00:39:30 +02:00
Matt Bierner
f5cbe7e391 Use dirname as default uri for md links (#164641)
Fixes #164612
2022-10-25 21:59:20 +02:00
Matt Bierner
882cdc0a17 Use newlines to separate inserted images (#164632)
Fixes #164610
2022-10-25 12:21:36 -07:00
Matt Bierner
21431fce38 Disable canSelectFolders in markdown link inserter (#164636)
Fixes #164549
2022-10-25 12:01:08 -07:00
Matt Bierner
504c5a768a Avoid extra html write on first markdown preview update (#164201) 2022-10-20 19:40:19 -07:00
Matt Bierner
bad3dcca69 Fix insert image/link for untitled files (#163897) 2022-10-17 16:14:16 -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
6cf68a1f23 Remove .only and fix tests (#163376)
Fixes #162159
2022-10-11 17:41:13 -07:00
Matt Bierner
bfb1a738d1 Fix markdown open preview opening duplicate preview (#162793)
This fixes the markdown 'open preview' command when used with `vscode.ViewColumn.Active` or `vscode.ViewColumn.Beside`
2022-10-06 09:50:10 +02: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
b8a7485526 Fix markdown preview refresh from disk (#161800)
Fixes #149974
2022-09-26 09:49: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
Matt Bierner
f4bf1f30a2 Skip ul and ol when highlighting selected markdown element (#161139)
Fixes #155552

For lists, the outer ul/ol always has the same source line as the first element in the list. We should prefer using the first element in the list when highlighting the active line

This also fixes a bug where scroll sync would stop working if you added lines to the doc. This was caused by `lineCount` getting out of sync as the document is being updated. I've removed this state and made the reveal logic more robust instead
2022-09-19 07:16:06 +02:00
Matt Bierner
a10bdfb49b Allow underscores in rendered md headers (#161149)
Follow up from https://github.com/microsoft/vscode-markdown-languageservice/pull/49
2022-09-16 20:52:50 -04: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
fa1fee3b21 Pick up latest Markdown language service (#160831) 2022-09-14 09:20:52 -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
2d27f8db6a Use MD LS for resolving all document links (#160238)
* Use MD LS for resolving all document links

This switches the markdown extension to use the markdown language service when resolving the link. This lets us delete a lot of code that was duplicated between the extension and the LS

* Pick up new ls version
2022-09-07 20:55:14 -07:00
Matt Bierner
077f5865da Support latest md ls (#160228)
- Update `looksLikeMarkdownPath` to look at open documents and notebooks, not just the uri
- Register custom command  for document links
2022-09-07 07:17:41 +02: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
01ea9c11ea Update extension enabled tsconfig libs (#159631)
Matches what we set for `src/`
2022-08-31 07:57:15 +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
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
720a61fc28 Fix markdown link diagnostics not updated when directories are renamed / deleted (#157956)
Fix markdown link diagnostics not updated when directories are renamed/deleted

Turns our that `createFileSystemWatcher` will not fire if a parent dir is renamed / deleted. See #60813

To fix this, I believe we have to create watchers for all parent directories too (or watch everything in the entire workspace)
2022-08-12 13:48:40 -04: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
389938998f Show error when markdown preview restore fails (#157566)
Fixes #155493
2022-08-09 09:55:40 +02:00
Matt Bierner
b012216211 Fix markdown images having duplicate ids (#157177)
Fixes #153144
2022-08-05 06:31:42 +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
Matt Bierner
b2daf1af82 Add MD server tracing and update diagnostics on files changes (#155797) 2022-07-21 10:07:06 -07:00
Matt Bierner
924dde5c1e Documenting markdown LS (#155789) 2022-07-21 11:48:30 +02: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
394eaa9fa3 Fix md document links for untitled files (#155248) 2022-07-14 18:15:13 -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
Matt Bierner
2b3912fa29 Fix markdown extension path (#154656)
Fixes #154645
Fixes #154653
2022-07-10 14:25:45 +02:00
Matt Bierner
2fb56e9d62 Move smart select and folding to md language server (#154334)
* Move smart select and folding to md language server

Also fixes a few minor issues:

- Don't log to web console
- Remove convert code since it is no longer needed
- Use correct extension id

* bump cache

* Bump package version

Co-authored-by: João Moreno <joao.moreno@microsoft.com>
2022-07-07 07:30:03 -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
f6271dd82e Fix angle bracket path completions for link defs (#154182)
Fixes #153866
2022-07-05 11:55:20 -07:00