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
Matt Bierner
eca0690ba0
Allow issue reporter to work on built-in extensions ( #92040 )
...
Fixes #91029
2020-03-05 12:15:23 -08:00
Pine Wu
67e6aef0c8
Fix #73803
2020-03-05 11:34:58 -08:00
Matt Bierner
81c95f2e5c
Prompt user to report issue after single fatal error on insiders
2020-03-04 19:25:15 -08:00
Matt Bierner
2057e931c8
Refactoring version picker
...
- Rename `versionPicker` -> `versionManager`
- Simplify running of picked items
- Cleaning up interfaces
- 💄
2020-03-03 17:12:40 -08:00
Matt Bierner
3f0aeab1ca
Display more information in the TS version status bar item
...
For #91510
Switching TS versions is fairly uncommon, so repurpose the status bar entry to have additional project commands in it (including the ability to switch TS versions)
2020-03-03 17:12:40 -08:00
Matt Bierner
d4dc9e09a2
Fix command
being set twice in object
2020-02-28 14:45:35 -08:00
Andrew Branch
23850c7990
[typescript-language-features] Add importModuleSpecifierEnding preference ( #90405 )
...
* Expose importModuleSpecifierEnding to typescript-language-features
* Add default `auto` setting
* Use string 'auto' for auto setting
* Work with TypeScript 3.8
2020-02-28 11:20:50 -08:00
Matt Bierner
e4beca6b31
Remove TS 3.7 protocol workaround
2020-02-26 16:04:27 -08:00
Matt Bierner
027da88563
Use constant
2020-02-26 16:03:10 -08:00
Matt Bierner
a10e4cb911
Make sure we set the correct replacement range for dot member completions
...
Fixes #91105
2020-02-24 15:53:13 -08:00
Matt Bierner
3c030d7014
Add extra guard on restarting TS server on fatal crash
2020-02-24 15:12:57 -08:00
Matt Bierner
6ff3d9c899
Auto restart TS Server on watch options change
2020-02-24 15:12:57 -08:00
Martin Aeschlimann
b2e0925ba1
update jsonc-parser
2020-02-21 15:03:33 +01:00
Matt Bierner
9c0899f286
Pick up TS 3.8.2
2020-02-20 21:38:14 -08:00
Matt Bierner
d17a017c0b
Fix formatting and version for TS Server issue report
2020-02-20 21:34:20 -08:00
Matt Bierner
0b3aa0a6ea
Let extensions prepopulate the issue reporter title and description ( #91039 )
...
* Let extensions prepopulate the issue reporter title and description
Fixes #91028
Adds two new optional arguments to the `vscode.openIssueReporter` command: `issueTitle` and `issueBody`. These are taken using an options object and are used to pre-populate the native issue reporter fields
Hooks up these fields for TypeScript's report issue prompt. We use this to post the most recent TS Server error stack
* Extract duplicate command id to constant
* Log version directly instead of prompting users for it
2020-02-20 10:31:09 -08:00
Martin Aeschlimann
12770d4fed
update typescript semantic highlighting
2020-02-20 15:35:50 +01:00
Martin Aeschlimann
66f525f435
[ts] enumMember missing in token legend
2020-02-20 10:31:14 +01:00
Matt Bierner
2aced89ae1
Show more clear TS Version picker when reinstalling a different TS version locally
...
- Make sure that `TypeScriptVersion` is immutable by getting and caching `apiVersion` on init
- Only show dot next to currently active version if both path and api versions match
2020-02-18 19:16:56 -08:00
Matt Bierner
8503705b11
Don't show reference code lens for both class and ctor in es5 classes
...
Fixes #90396
2020-02-14 16:57:47 -08:00
Matt Bierner
ea0880611f
Use non-deprecated version of registerTasksProvider
...
For #88391
2020-02-12 17:20:05 -08:00
Matt Bierner
43e268ad72
💄
2020-02-12 15:48:38 -08:00
Matt Bierner
fb622a8b83
Move code action documentation contribution point to come from metadata
...
For #86788
2020-02-11 11:36:23 -08:00
Matt Bierner
efb781e5be
Marking that documents/workspaces arrays cannot be mutated
2020-02-11 11:36:23 -08:00
Martin Aeschlimann
985840db96
update typescript-language-features
2020-02-10 03:27:46 +01:00
Martin Aeschlimann
12509673e9
update typescript-vscode-sh-plugin
2020-02-10 02:25:47 +01:00
Matt Bierner
718331d6f3
Allow configuring TS Server watch options through VS Code
...
Fixes #89381
Given that these are advanced options, we require editing them in the json file instead of using our settings UI
2020-02-07 18:14:38 -08:00
Matt Bierner
4d35421462
Remove version gating on for now enableProjectDiagnostics
...
None of the apis being users for this experimental setting require the latest TS version
2020-02-06 16:33:05 -08:00
Matt Bierner
f0942786b4
Add experimental setting to use separate server to compute project level diagnostics
...
For #13953
**Problem**
We'd like to show project wide diagnostics, however at the moment TS server is single threaded. This means that computing all these diagnostics would interrupt other user operations such as completions.
Right now, our advice is to use tasks to get around this limitation (since tasks always run as separate process) however few people actually use tasks.
**Change**
This change adds an experimental `tsserver.experimental.enableProjectDiagnostics` setting (default false) that makes VS Code spawn a separate TS Server that is only used for computing diagnostics. This should help keep the primary syntax server responsive while letting the diagnostics server churn away at project level diagnostics
**Why experimental?**
- We are comporting too many diagnostics. This is bad for larger projects. I don't think TS provides the right APIs to know which files we actually need to request diagnostics on when a file changes.
- This hasn't been fully extensively tested to make sure it plays nicely with feature such as automatic type acquisition or in complex workspace with multiple projects
2020-02-06 15:15:33 -08:00
Matt Bierner
aca46ac4a5
Take server arguments object
...
Makes it more difficult to mistaktenly reverse which server is which
2020-02-06 15:15:33 -08:00
Matt Bierner
c8516dd7e8
Marking arrays as readonly
2020-02-06 15:15:33 -08:00
Matt Bierner
5d3c86ad99
Remove VS Code project file change watchers
...
Updating projects should be handled by the `projectsUpdatedInBackground events` now
2020-02-06 15:15:33 -08:00
Matt Bierner
ae758e681d
Fix spelling in test name
2020-02-05 18:12:26 -08:00
Matt Bierner
5347c21ecf
Treat any non-whitespace character as jsdoc param names
...
Fixes #90108
2020-02-05 15:26:13 -08:00
Matt Bierner
87b6d03182
Add cursor position check to jsDocCompletionTest
2020-02-04 18:02:38 -08:00
Matt Bierner
2b7e6ab2fd
💄
2020-02-04 18:00:03 -08:00
Matt Bierner
e7451b12ce
Adding assertEditorContents helper function and fixing jsdoc completion tests
2020-02-04 17:52:11 -08:00
Matt Bierner
a32cb805a2
Adding some basic tests for auto insert of await on completions
2020-02-04 17:34:12 -08:00
Matt Bierner
58fe34bb77
Don't require strict prefix matches for private field completions
...
Fixxes #89556
2020-02-04 17:17:00 -08:00
Matt Bierner
b4a835f5b9
Fixing backet completion items not shown for cases such as this.xy|
2020-02-04 16:15:58 -08:00
Matt Bierner
7b754d7d95
Adding more pinning tests for JS/TS completions
2020-02-04 16:15:58 -08:00
Matt Bierner
9887559f17
Add basic JS/TS replace/insert completions
...
For #87091
Adds basic support for insert/replace mode for JS/TS completions. We're blocked on full support by https://github.com/microsoft/TypeScript/issues/35602 . I'll be adding some skipped tests that document current limitations
2020-02-04 16:15:58 -08:00
Matt Bierner
78465390bd
Run many of the JS/TS completion tests in both insert and replace completion mode
2020-02-04 16:15:58 -08:00
Matt Bierner
6205cf0fed
Add basic insert mode tests
2020-02-04 16:15:58 -08:00
Matt Bierner
6960e8c07b
Fixing TS completion tests
...
The current method of verifying when suggestions have been shown is not reliable so switch to use a delay instead :(
2020-02-04 16:15:58 -08:00
Matt Bierner
5b284c140c
Build TS extension against current vscode.d.ts directly
...
Currently extensions like TS have a dev dependency on the `"vscode"` package. This pulls in a copy of `vscode.d.ts` that we end up using instead of our local `vscode.d.ts`.
This change uses the `paths` `tsconig` option so that we use our local `vscode.d.ts` instead of the one from `node_modules`
2020-02-04 16:15:58 -08:00
Matt Bierner
45999fdb8f
Remove extra cast
...
Not required with TS 3.8
2020-02-04 16:15:58 -08:00
Matt Bierner
5623c36a40
Remove surveyor code
...
Not currently being used
2020-02-04 16:15:58 -08:00
Alex Ross
8066726b27
Allow both : an . as time separators in tsc problem pattern
...
Fixes https://github.com/microsoft/vscode/issues/89273
2020-02-04 15:01:09 +01:00
Matt Bierner
3f5fda1800
Redefine performanceData
2020-02-03 14:31:21 -08:00
Matt Bierner
7c502bbb6a
Fix compile error related to new TS version
2020-02-03 14:20:17 -08:00
Matt Bierner
55e72d8d02
Add support for rendering jsdoc inline @link
tags
...
Fixes #28624
2020-02-03 14:00:19 -08:00
Matt Bierner
8fd777f649
Remove extra not null checks
2020-02-03 14:00:19 -08:00
Ron Buckton
d837ddc72e
Fix off-by-one typo to improve display of file names in TS call hierarchy ( #89822 )
2020-01-31 15:35:49 -08:00
Matt Bierner
d92dedcd69
Allows for js and ts specific refactoring pages
2020-01-29 18:03:24 -08:00
Alex Dima
acf2931955
Fixes #89552 : Throw from the provider when semantic tokens cannot be computed and keep old semantic tokens if this happens
2020-01-29 16:22:08 +01:00
Matt Bierner
d99bbafe17
Pick up new TS version for building VS Code
2020-01-28 11:00:02 -08:00
Matt Bierner
c4b6a6b537
Send #
as a completion trigger character to TS 3.8.1+
...
https://github.com/microsoft/TypeScript/issues/36367 added support for `#` as a TS completion trigger
2020-01-27 19:06:05 -08:00
Matt Bierner
c0c9e0043c
Use type only imports for protocol
...
These imports should never result in a real import in the emitted code
2020-01-27 19:06:05 -08:00
kieferrm
ab1514ed77
fix GDPR annotation
2020-01-27 22:17:56 +00:00
Martin Aeschlimann
a6df4b39d9
update typescript-vscode-sh-plugin
2020-01-27 15:03:16 +01:00
Martin Aeschlimann
2b880f2b74
update typescript-vscode-sh-plugin
2020-01-23 17:08:49 +01:00
Martin Aeschlimann
3c930f9214
improve jsx semantic highlighting
2020-01-22 23:16:57 +01:00
Alex Dima
fbc1c189ff
Bring back version check to avoid flickering caused by coordinates conversion
2020-01-21 09:19:20 +01:00
Matt Bierner
74cc2f352a
Use more explit name for request start time
...
Note that this is the total time the request has been in the server queue, not the actual execution time
2020-01-19 20:14:25 -08:00
Matt Bierner
5359a9373a
Log the full version string for TS
...
Right now, if TS has an error before we get back the full version string in the TSServer `'telemetry'` event, we end up logging just the basic version info (such as 3.8.0). We also want to include the pre-release tags (3.8.0-tsversion20200101)
2020-01-19 20:14:25 -08:00
Matt Bierner
4a5890eabc
Add explict update methods intead of using spread
2020-01-19 20:14:25 -08:00
Matt Bierner
8714526077
💄
2020-01-19 20:14:25 -08:00
Matt Bierner
cb0cd66791
Make sure we only send TS trigger characters they know about
2020-01-19 20:14:25 -08:00
Matt Bierner
2fd0153d56
Remove extra no null check
...
This is already checked a few lines up
2020-01-19 20:14:25 -08:00
Martin Aeschlimann
b6e7eaa1bd
fix for typescript-vscode-sh-plugin not found
2020-01-17 16:09:44 +01:00
Martin Aeschlimann
844f49f2a8
typescript-vscode-sh-plugin is not bundled
2020-01-17 11:16:34 +01:00
Matt Bierner
b600d39061
Treat '#' as a VS Code trigger character
...
Fixes #88816
2020-01-16 17:22:04 -08:00
Matt Bierner
b57190f449
💄
2020-01-16 15:49:36 -08:00
Matt Bierner
e1373b367d
Use test instead of exec
2020-01-16 15:49:36 -08:00
Matt Bierner
b53a2f4b8a
💄
2020-01-16 15:49:36 -08:00
Matt Bierner
53682cf56d
Bump VS code version
2020-01-16 13:16:38 -08:00
Rob Lourens
8c0a573b9e
Merge pull request #88730 from mairaw/typo
...
fix typo
2020-01-16 10:00:15 -08:00
Alex Dima
9e1d730cf2
SemanticTokens - implement feedback received in API call:
...
- extract a separate DocumentRangeSemanticTokensProvider that deals with a document range
- extract a separate provideDocumentSemanticTokensEdits that deals with updating via SemanticTokensEdits a previous result
2020-01-16 18:02:02 +01:00
Johannes Rieken
430de16fef
fix compilos and adopt proposed api usage, #10266
2020-01-16 17:52:18 +01:00
Maira Wenzel
71ed221b0e
fix typo
2020-01-15 16:35:58 -08:00
Martin Aeschlimann
a2d46d4b68
ts semantic highlighting: support alias
2020-01-15 23:08:15 +01:00
Matt Bierner
95793304cc
Also show extract to function as disabled in js/ts
...
Currently we only show `extract constant`
2020-01-14 13:03:59 -08:00
Martin Aeschlimann
661bc5da41
define constants in typescript-vscode-sh-plugin
2020-01-14 17:35:58 +01:00
Martin Aeschlimann
5ee9f6646e
add constants
2020-01-14 10:07:40 +01:00
Martin Aeschlimann
fc57a1421d
update typescript-language-features
2020-01-13 21:09:37 +01:00
Martin Aeschlimann
18f0a5bd21
add reaonly support, update typescript-vscode-sh-plugin version
2020-01-13 19:57:17 +01:00
Martin Aeschlimann
0fe69bd529
TS semantic highlighting: check api version
2020-01-13 12:42:45 +01:00
Martin Aeschlimann
59e12621ae
polish
2020-01-10 16:15:08 +01:00
Martin Aeschlimann
703a2afcef
update typescript-vscode-sh-plugin
2020-01-10 16:05:16 +01:00
Martin Aeschlimann
fbad0c368e
Merge branch 'master' into aeschli/ts-sem
2020-01-10 15:40:03 +01:00
Martin Aeschlimann
4032ce7241
polish
2020-01-10 15:37:37 +01:00
Matt Bierner
ad97bd7493
Exclude tsconfig files under dot file directories
...
Fixes #88328
2020-01-09 14:25:39 -08:00
Martin Aeschlimann
900100b745
use typescript-vscode-sh-plugin
2020-01-09 23:23:55 +01:00
Martin Aeschlimann
a07286f7f9
use @aeschli/typescript-vscode-sh-plugin
2020-01-09 22:47:06 +01:00
Martin Aeschlimann
b8a7184825
use plugin
2020-01-09 17:36:45 +01:00
Martin Aeschlimann
741a8b2b2f
Merge branch 'master' into aeschli/ts-sem
2020-01-09 15:41:56 +01:00
Matt Bierner
fc65a7c41b
Update logging of updateGraph to match TS protocol changes
...
For #88313
Also log updateGraph on `completions.execute` instead of as its own event
2020-01-08 16:57:26 -08:00
Matt Bierner
ce5ffc76c0
Fix type
2020-01-08 16:47:10 -08:00
Matt Bierner
e7b44e70e9
Dont' use default export for TelemetryReporter
...
We are also exproting other values/types, so use a named export instead
2020-01-08 16:36:31 -08:00
Matt Bierner
7c6897aca0
Report updateGraph performance Telemetry from the TypeScript server
...
Fixes #88313
2020-01-08 16:34:21 -08:00
Ron Buckton
71b60d0d22
Add call hierarchy support for TypeScript 3.8 ( #88168 )
...
* Add call hierarchy support for TypeScript 3.8
* Add version dependent registration for call hierarchy provider
* Revert TS version, PR feedback
2020-01-08 14:35:44 -08:00
Martin Aeschlimann
ed4173796d
ts sem
2020-01-08 17:08:48 +01:00
Matt Bierner
80ccf6fd9d
Make sure we always explicitly reset pendingGetErr
...
#88209
2020-01-07 16:14:54 -08:00
Matt Bierner
f0336455ed
Adding documentation.refactor proposed contribution point
...
For #86788
2020-01-07 16:14:54 -08:00