Commit Graph

12502 Commits

Author SHA1 Message Date
Ladislau Szomoru
b9484e8e16 SCM - Action button localization fix (#152903)
* Localization fix

* Fix typo in key
2022-06-22 19:27:27 +00:00
Miguel Solorio
901b2a0299 Add listActiveSelectionFocus color token (#152260)
* Add listActiveSelectionFocus color token (Refs #151577)

* Update colors

* Update color token name to `listFocusAndSelectionOutline` and re-order
2022-06-22 12:24:49 -07:00
Matt Bierner
be1ee5d9f1 Re-validate md files when a linked to file is created or deleted (#152520) 2022-06-22 19:02:46 +00:00
Sandeep Somavarapu
a1e1e307e3 introduce application config model (#152889)
* introduce application config model
- application configuration is active and used only in non default profiles
- read/write application scoped settings only from application layer and not from user layer
- extensions get application scoped values as global values
- settings editor does not show application scoped settings in non default profle
- added unit tests

* fix tests
2022-06-22 11:57:39 -07:00
Ladislau Szomoru
df0fc08407 Git - Fix configuration service warnings (#152867)
Fix configuration service warnings
2022-06-22 15:58:57 +02:00
Matt Bierner
321423db2b Standardize text/uri-list handling (#152756)
This creates a common set of functions for creating and parsing the `text/uri-list` mime type. As part of this, I also aligned us with the standard, which uses `\r\n` between lines instead of just `\n`
2022-06-22 13:53:37 +02:00
Ladislau Szomoru
08a46984d6 SCM - Add capability to disable the SCM action button (#152849)
Add capability to disable the SCM action button
2022-06-22 13:01:20 +02:00
Ladislau Szomoru
75362a6268 Git - add settings to control the branch protection indicator (#152469)
* Add settings to control the branch protection indicator

* Pull request feedback
2022-06-22 01:02:13 -07: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
Rich Chiodo
f361c5b71d Halve the number of executions to speed up test (#152768) 2022-06-22 06:24:21 +02:00
Matt Bierner
c84655d123 Reduce recomputation of state in markdown extension (#152804)
* Reduce recomputation of state in markdown extension

- Use `getForDocument` more often to avoid refetching documents
- Debounce `MdTableOfContentsWatcher`. We don't want this to trigger on every keystroke :)

* Cache LinkDefinitionSet

* Add test file change

* Fix toc watcher for tests
2022-06-21 16:25:10 -07:00
Matt Bierner
389aa8a935 Fix MdDocumentInfoCache computing values twice (#152799)
* Fix MdDocumentInfoCache computing values twice

Fixes a race where values could be computed twice before being cached

* Remove only
2022-06-21 16:22:07 -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
bbe7b54cf4 Remove custom editor tests (#152777)
These tests are not actively being run or maintained. Removing them for now
2022-06-21 15:37:19 -04:00
Matt Bierner
fa53aa6fec Cleanup pass for md extension (#152760)
Clean up names in md extension
2022-06-21 15:36:32 -04:00
Henning Dieterichs
467eef9270 Sets titles to yours and theirs in the git extension & swaps order. Fixes #150853 2022-06-21 17:23:21 +02:00
Henning Dieterichs
50255ca91e Merge pull request #152691 from microsoft/rzhao271/inline-completion-description 2022-06-21 14:24:40 +02: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
Raymond Zhao
9ef049b089 Add note to description 2022-06-20 17:15:07 -07:00
Matt Bierner
369252a027 Skip diagnostics for non-open md files (#152687)
Currently we only show diagnostics for opened tabs. This means we shouldn't waste time computing diagnostics for these non open files
2022-06-20 16:39:01 -07:00
Matt Bierner
0bc3109761 Don't try parsing non-markdown files (#152661)
This fixes our references and rename provider to not try parsing non-markdown files as if they were markdown
2022-06-20 10:44:50 -07:00
Matt Bierner
4c72dedb4a Optimize markdown workspace scanning (#152563)
* Optimize markdown workspace scanning

- Adds cache for markdown file
- Avoid reading non-markdown files from disk (when we expect markdown files)
- Use `range.contains(pos)` instead of `range.intersects(range)`

* Don't remove cached document on change

We only want to invalidate the cached document when it is first opened (since the cached version is the one from disk). Otherwise we can use the live version of the doc
2022-06-19 09:40:10 -07:00
Matt Bierner
5a175207de Improve markdown link regexp (#152533)
* Improve markdown link regexp

This makes the markdown link regexp more readable and also combines the two regular expressions we were running

* Fixed backtracking
2022-06-19 06:25:54 +02:00
Matt Bierner
78597fd026 Don't hardcode use of github slugifier (#152507)
Use `engine.slugifier` for this instead
2022-06-17 17:25:54 -04:00
Matt Bierner
dea813ff7c Add table of contents provider abstraction (#152504)
We currently re-compute the same table of contents for markdown files multiple times. This is because multiple language features all need table of contents

With this change, we introduce a new `TableOfContentsProvider` which maintains a cache of the table of contents per file. This provider is then passed into every caller that needs a toc
2022-06-17 18:20:02 +00:00
Martin Aeschlimann
083cf01e10 json indent pattern: handle escape characters (#152475) 2022-06-17 14:31:03 +00:00
Alex Ross
4e53b01452 Pull in cpp grammar fixes (#152449) 2022-06-17 11:17:09 +00:00
Martin Aeschlimann
630809a1ea html: observe insertFinalNewline (#152446) 2022-06-17 12:38:36 +02:00
Benjamin Pasero
0662ad271a tests - skip flake (#152145) (#152442) 2022-06-17 11:56:58 +02:00
Matt Bierner
623f55f437 Refactor markdown language features (#152402)
(sorry for the size of this PR)

This change cleans up the markdown language features by making the following changes:

- Use `registerXSupport` public functions to register these
- Expose the slugifier the `MarkdownEngine` uses. You never want to use a different one if you already have a markdown engine
- Sort of clean up names. I'd introduced a bunch of confusing names while iterating in this space. What I'm working towards:

    - `Computer` — Stateless thing that computer data
    - `Provider` — Potentially stateful thing that provides data (which may be cached)
    - `VsCodeProvider` — The actual implementation of the various vscode language features (which should only be used by VS Code and in tests, not shared with other features)
- Introduce `MdLinkProvider` to avoid recomputing links for a given document. Also use this to hide more internals of link computation
2022-06-17 10:25:52 +02:00
Matt Bierner
afe316c08c Add diagnostic manager enablement change tests (#152392)
* Add test for MD diagnostic manager config changes

Add a simple test the enabling/disable diagnostics should make the diagnostic manager recompute diagnostics

* Add `.get`
2022-06-16 15:53:19 -07:00
Matt Bierner
cb5fa75d11 Clean up markdown diagnostic tests (#152374)
* Clean up markdown diagnostic tests

This splits the diagnostic compute tests from the test for the diagnostic manager

* Mark internal field as private
2022-06-16 22:33:11 +02:00
Matt Bierner
3114ee690b Split out VS Code reference provider from markdown reference provider (#152369)
This change renames the main markdown reference provider class to `MdReferenceComputer` and then uses this to implement a `vscode.ReferenceProvider`

This more cleanly splits the VS Code part of the logic from the general reference calculation stuff other providers consume
2022-06-16 15:47:48 -04:00
Matt Bierner
6c252851f2 Revalidate linked files on header change (#152366)
Fixes #150945

With this change, when the headers in a file change, we should also try to revalidate all files that link to it
2022-06-16 18:14:01 +00:00
Ladislau Szomoru
88731bf6d6 Git - enable using the editor as the git commit input (#152158) 2022-06-16 16:27:35 +02:00
Ladislau Szomoru
46d9d7acda Git - branch protection (#152218)
Co-authored-by: João Moreno <joao.moreno@microsoft.com>
2022-06-16 16:25:03 +02:00
Matt Bierner
8559324b09 Use more optional chaining in TS extension (#152271)
Use optional chaining in TS extension

Also removes `prefer-const` since this is now enabled globally
2022-06-16 05:33:58 +02:00
Matt Bierner
4fc5d76213 Fix ranges and validation setting for MD own path + header links (#152270)
* Fix ranges and validation setting for MD own path + header links

Previously for a `file.md`, links to headers in that file that use paths, such as `[link](./file.md#some-header)` were validated using `markdown.experimental.validate.fragmentLinks.enabled`

This is confusing as that setting was only meant to be used for links such as`[link](#some-header`). It also resulted in the diagnostic having the incorrect range

This change instead makes these links be validated by `markdown.experimental.validate.fileLinks.markdownFragmentLinks`

* Fix compile
2022-06-15 20:02:41 -07:00
Matt Bierner
a765abcf07 Adopt ResourceMap for MD diagnostics (#152264)
Adopt ResourceMap

Switches to use `ResourceMap` instead of our own implementation
2022-06-15 15:43:09 -07:00
Matt Bierner
a289e64e09 Switch to finalized TS protocol types (#152259) 2022-06-15 15:37:21 -07:00
Matt Bierner
8fb977f2c1 Make jsx: react the default for implicit js/ts projects (#152256)
Make jsx: react the default

Fixes #152150

This fixes imports of `react` getting removed with TS 4.7 in implicit projects
2022-06-15 21:41:52 +00:00
Matt Bierner
f17b33faf2 Use .?method() in more places (#152112)
Switches simple patterns like:

```ts
if (some.thing) {
    some.thing.method();
}
```

to:

```ts
some.thing?.method()
```

This is more concise and avoids having to repeat the `some.thing` part
2022-06-15 16:28:31 +00:00
Johannes Rieken
dfc37187b0 rename ref-viewlet's publisher back to vscode (#152213) 2022-06-15 08:58:11 -07:00
Matt Bierner
354e1a0595 Finalize data file reading API (#152127)
Fixes #147481
Also reverts #150963 since the `kind` field is not being finalized
2022-06-15 07:56:02 -07:00
Johannes Rieken
9e21aff42e joh/ts transpile (#152199)
transpile-only tasks for client and extensions

* extract transpile into its own file
* add transpile-client task, polish transpiler
* add transpile-extensions, improve transpile logic
* move declaration of "const enum" above it usage so that it can be used with const-enum-inlining
* (ugly) make d.ts transpilation configurable because it is needed for extensions but a problem for client
* hack my way around so that `getOwnEmitOutputFilePath` is reusable by our transpile
* honor `noEmit` flag
2022-06-15 16:52:48 +02:00
Martin Aeschlimann
6bd36f5295 update seti (#152157) 2022-06-15 16:13:17 +02:00
Ladislau Szomoru
03be93691c SourceControlInputBox API finalization (#152171) 2022-06-15 15:14:28 +02:00
Benjamin Pasero
68433fb7fd tests - remote invalid proposed API (#152181) 2022-06-15 14:34:56 +02:00
Priyank Rastogi
9e1f017b8c Add latex to markdown embedded languages (#151732) 2022-06-15 00:01:37 +00:00
Matt Bierner
00273730e8 Split markdown linkComputer from linkProvider (#152124)
Instead of passing around a full `vscode.DocumentLinkProvider`, we should pass just the more minimal interface that consumers need
2022-06-14 15:34:05 -07:00