Commit Graph

16 Commits

Author SHA1 Message Date
Matt Bierner
51fa4d0172 Fix more type assertions (#230156)
* Fix more type assertions

For #211878

* Fix type error
2024-09-30 14:17:06 -07:00
Matt Bierner
7a463ec271 Prefer reusing open tabs when opening md links in editors (#178628)
Fixes #81238
2023-03-29 15:21:31 -07:00
Matt Bierner
33867c55f3 Adopt prefix private with _ in markdown extension (#165088) 2022-10-31 14:22:39 -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
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
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
00ad6bc3d4 Markdown document links should reveal cell in notebook (#153147)
Fixes #141024
2022-06-24 15:49:15 -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
Johannes
0656d21d11 auto-fixed prefer-const violation 2022-06-08 17:49:21 +02:00
Matt Bierner
0c3a241171 💄 2022-03-29 18:19:50 -07: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
Matt Bierner
a2d7dfaf35 Simplify toc structure 2022-01-19 14:41:38 -08:00
Matt Bierner
a4e529c759 Add basic markdown link completions
For #140602

Only normal links for now. Will add reference links later. Should support the forms:

- `[](dir/file.md)`
- `[](./dir/file.md)`
- `[](/root-dir/file.md)`
- `[](#header)`
- `[](./dir/file.md#header)`
2022-01-12 18:13:21 -08:00
Matt Bierner
b7c340f119 Simplify import path 2021-10-14 09:32:35 -07:00
Matt Bierner
c986aef642 Remove .only and fix fragment used when opening file
Keeping the fragment causes a duplicated file to be opened
2021-10-13 19:33:56 -07:00
Matt Bierner
830987eac3 Refactor document link opening
- Extract out of command
- Try to preserve uri instead of converting to path
- Better handle case with absolute file path when there is no workspace
2021-10-13 19:27:35 -07:00