Commit graph

993 commits

Author SHA1 Message Date
Rahul Kadyan 47c54f0e32
feat: use configNamespace for registering language providers of other extensions (#95621)
fixes #75890
2020-05-11 15:22:42 -07:00
Matt Bierner e4e1099f8c Configure optional chain completions at the file level instead of per-request
Fixes #97398
2020-05-11 14:52:20 -07:00
Matt Bierner b1e9155139
Use generic for providers with resolve methods (#96955)
* Use generic for providers with resolve

Fixes #95852

Some of our providers have two phases: provide and resolve. This change updates the typings to make it clearer that the values returned by provider are passed into resolve.

* Remove duplicate vscode.d.ts in search-result extension

* Also use generic type in result of resolve
2020-05-11 13:06:03 -07:00
Matt Bierner 986a9c8bc9 Don't save files on JS/TS server start
Fixes #96503

This workaround no longer seems needed
2020-05-04 17:36:34 -07:00
Matt Bierner 996b5be2ed Update built-in JS/TS version to 3.9 2020-05-04 16:34:31 -07:00
Andrew Casey 13d3a9358b
Update npm script compile-extension:typescript-language-features (#96320) 2020-04-27 18:38:08 -07:00
Andrew Casey 3ecefe6d7a
Make char position optional in TS stack (#96321) 2020-04-27 18:37:50 -07:00
kieferrm 3aa931c67d fix GDPR annotation 2020-04-28 00:49:18 +00:00
Matt Bierner 686ad17217 Clean up onTypesInstallerInitializationFailed
- Convert to async
- don't require using inline type with id
2020-04-27 16:42:45 -07:00
Andrew Casey 27e2e92a54
Clean up CallstackOrException telemetry in typescript-language-features (#96108)
One was actually SystemMetaData, all others were either dropped or
replaced with sanitized versions classifiable as SystemMetaData.
2020-04-27 12:13:00 -07:00
Matt Bierner a4597e1905 Enable JS/TS workspace symbol search for all projects
Fixes #11026

Adds a new `typescript.workspaceSymbols.scope` setting that enables searching all known projects when using TS 3.9+
2020-04-24 00:42:55 -07:00
Matt Bierner 0d5ed6bfde Add logging of service state
For #95122
2020-04-22 14:01:30 -07:00
Duncan Walter c7c2301bc2
TS: Add setting to prompt users about workspace tsdk (#95566)
* add a setting to prompt users to switch to tsdk version

* version manager in control

Co-authored-by: Duncan Walter <dwalter@hubspot.com>
2020-04-22 10:57:22 -07:00
Johannes Rieken d1dfa5e91b iterate over suggestions only once, #95324 2020-04-17 09:06:34 +02:00
Matt Bierner c189b2bb05 Remove use of memoize
Fixes #95324
2020-04-16 10:17:01 -07:00
Matt Bierner b89738c83b Scope prepareRename to TS 3.1+
Fixes #95399
2020-04-16 10:17:01 -07:00
Matt Bierner 1c542d50be More improvements to TS completion computation
For #95324

- Get word range before we make the TS request
- Reuse the context
2020-04-15 14:14:20 -07:00
Matt Bierner 564c619d73 💄 2020-04-15 14:14:20 -07:00
Matt Bierner a51f8c4626 Fix missing property description string 2020-04-15 12:46:40 -07:00
Matt Bierner 605d2cfadb 💄 2020-04-15 12:46:40 -07:00
Matt Bierner 948aa4a214 Make TS completion item more efficent to compute
For #95324

- Removes repeated calls to `getWordRangeAtPosition`
- Only use our fuzzy string logic when using TS 3.8 or older
2020-04-15 10:02:47 -07:00
Josh Smith 3f9e68436b
Issue #93589: Rename 'renameShorthandProperties' setting to 'useAliasesForRenames' (#94480)
* Issue #93589: Rename 'renameShorthandProperties' setting to 'useAliasesForRenames'

* Issue 93589: Added deprecation message to 'renameShorthandProperties' preference

* Issue 93589: Old and new setting value added for mitigtion

Co-authored-by: joshuahs <joshuahs@umich.edu>
2020-04-14 14:53:19 -07:00
Matt Bierner b6c2ea092d Add experimental trigger reason to ts server protocol
For https://github.com/microsoft/TypeScript/issues/35096
2020-04-14 13:55:08 -07:00
Matt Bierner a8f8a2dca0 Only re-request diagnostics if the file has actually been opened
Fixes #95027

Hovers cause VS Code to quickly open and the close the target file. We never actually sync the file with the TypeScript server when this happens. However on file close, we always re-request diagnostics for the project.

This fix makes it so that we only re-request diagnostics if the file has actually been opened on the TSServer
2020-04-11 17:30:12 -07:00
Matt Bierner f3ceb33c5c Hook up experimental TS refactor error
For https://github.com/microsoft/TypeScript/pull/37871
2020-04-10 17:07:09 -07:00
Matt Bierner 8b46fd0645 Try preserving selected signature better in js/ts
Fixes #94834
2020-04-09 15:06:46 -07:00
Martin Aeschlimann ef715cf8c5 TypeScript semantic tokens: use range provider 2020-04-09 18:25:20 +02:00
Martin Aeschlimann 8ef9a03b52 typescript: update typescript-vscode-sh-plugin 2020-04-09 17:24:48 +02:00
Matt Bierner 7ae7343973 Fix some strict null errors revealed by change to emitter 2020-04-08 18:06:24 -07:00
Matt Bierner 32929fbbb8 Always prefer the extract constant refactoring with the lowest scope
Fixes #94717

Previously we hardcoded a check to scope_0
2020-04-08 13:48:03 -07:00
Matt Bierner 74b4540bd1 Prioritize implement interface over remove unused in JS/ts
Fixes #94212

If both `implement interface` and `remove unused` are possible, only mark `implement interface` as prefered.

Also changes our core code action sorting logic to prioritize autofixes
2020-04-08 13:05:44 -07:00
Git-Lior ce57f8ad58
bugfix - typescript code completion doesn't recognize property modifiers when more than one exists (#94165)
* fix microsoft/TypeScript#37117 - code completion in typescript fails to recognize property modifiers

* split kindModifiers by comma or spaces
2020-04-07 13:22:28 -07:00
Martin Aeschlimann 72df4fc229 update typescript-vscode-sh-plugin 2020-04-07 09:46:21 +02:00
Martin Aeschlimann 677b3cfa4b Disable semantic highlighting in large JS/TS files. Fixes #94321 2020-04-03 14:53:07 +02:00
Alex Dima 65309e1d7c
Have SemanticTokensBuilder.build() return SemanticTokens (for #93614) 2020-03-30 15:52:25 +02:00
Matt Bierner 6bdf50706f Enable resolveJsonModule for implicit JS/TS projects
For #93500
2020-03-27 15:11:12 -07:00
Martin Aeschlimann f04dce33a1 Throttle the number of semantic token requests #92583 2020-03-27 16:46:15 +01:00
Martin Aeschlimann 40077f5ea9 [typescript][semantic] add library modifier. Fixes #91090 2020-03-27 14:35:22 +01:00
Martin Aeschlimann c65ea4300d update typescript-vscode-sh-plugin 2020-03-13 00:42:20 +01:00
Matt Bierner 8c596fbf90 Mark arrays readonly 2020-03-10 16:38:34 -07:00
Matt Bierner 9d25faad7f Show better symbolKinds for workspace symbols 2020-03-10 16:38:34 -07:00
Matt Bierner 89fe6d2bfe Fix bad filter
Fixes #92338
2020-03-10 12:31:37 -07:00
Matt Bierner f20250c965 Move version check into provideCompletionItems
Handle TS version changes
2020-03-09 14:45:43 -07:00
Josh Goldberg 72c700cf54
Added completion entry for @ts-expect-error directive (#92093)
* Added completion entry for @ts-expect-error directive

* Limited to relevant TS versions

* You know what, it's more complicated, I'll just go with everything vs 3.9
2020-03-09 12:56:23 -07:00
Pine Wu 2362584a62 Revert "Fix #73803"
This reverts commit 67e6aef0c8.
2020-03-06 00:30:14 -08:00
Pine Wu 4857a9a746 Revert "Fix integration test"
This reverts commit 5a0ab960f0.
2020-03-06 00:29:57 -08:00
Matt Bierner be9c791caa Extract toSymbolInformation 2020-03-05 13:30:52 -08:00
Matt Bierner f062556992 Limit number of pulled in workspace symbols
Fixes #11432
2020-03-05 13:30:52 -08:00
Matt Bierner 9cc4da7503 💄 2020-03-05 12:52:18 -08:00
Pine Wu 5a0ab960f0 Fix integration test 2020-03-05 12:41:06 -08:00