Commit Graph
18 Commits
Author SHA1 Message Date
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 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 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 3b549009fe Markdown path completions tests use mocked out fs (#153045)
* Markdown path completions tests use mocked out fs

This updates the path completion tests to stop depending on the actual fs and instead use `IMdWorkspace`

* Update remaining tests
2022-06-24 23:01:24 +00:00
Matt Bierner 07144d22c4 Rename types in the markdown extension (#152905)
Renames in the markdown extension

This renames some types and splits up some files as part of an exploration towards a proper LSP. Changes:

- `SkinnyTextDocument` -> `ITextDocument`
- Moved `ITextDocument` to own file
- `MdWorkspaceContents` -> `IMdWorkspace`
2022-06-22 14:12:48 -07:00
Matt Bierner d5a75f2ceb Add logging for MD language features (#152792)
This verbose logging will help track down inefficient calling patterns (such as recomputing stuff)
2022-06-21 14:18:36 -07:00
Matt Bierner fa53aa6fec Cleanup pass for md extension (#152760)
Clean up names in md extension
2022-06-21 15:36:32 -04:00
Matt Bierner 2249b171f4 Reduce number of times MD docs are re-tokenized (#152674)
This change reduces the number of times we retokenize a markdown file by doing the following:

- Use `MdTableOfContentsProvider` in more places
- Introduce a `IMarkdownParser` interface that lets us drop in a caching version of the tokenizer
2022-06-21 08:43:01 +02:00
Matt Bierner 1327d1eb50 Adopt ResourceMap in more places (#151475)
This changes switches to use the new `ResourceMap` type in more places in the markdown extension where we need to have a map/set with uris as the key
2022-06-08 08:34:06 +02:00
Matt Bierner 993c36c920 Fix markdown ext errors accessing disposed webview (#149960)
When reloading windows that need to restore a markdown preview, sometimes I'll see an error when the markdown preview tries accessing a disposed of webview. This seems to be cause caused by `provideTextDocumentContent`, where we end up disposing of the webview before an `await` resumes execution
2022-05-20 09:17:57 -07:00
Matt Bierner 590a9bf8a3 Make sure double click in md preview always reveals target line
Fixes #146333
2022-03-30 15:49:56 -07:00
Matt Bierner 4949f13d13 Organize imports 2022-03-29 13:25:40 -07:00
Matt Bierner 252515e59d 💄 2022-03-29 13:25:40 -07:00
Matt Bierner a2d9157a9a Extract markdown scrolling code to own file 2022-03-29 13:25:39 -07:00
Matt Bierner d49fc3ca8d Move files to better folders and add better name 2022-03-29 13:25:38 -07:00
Matt Bierner 7736c87cb0 Move markdown preview files to own folder 2022-03-29 13:25:35 -07:00