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
Matt Bierner
629a08ed62
When generating a tsconfig with checkJs, make sure we also set allowJs
...
For #87972
2020-01-06 15:35:41 -08:00
Matt Bierner
f105af6007
Set sourceMap: true in default tsconfig
...
For #87972
2020-01-06 15:35:41 -08:00
Andrew Liu
81fb34c445
fix parsed JSDoc author tag ( #80898 )
...
* fix parsed JSDoc author tag
* fix author tag
2020-01-06 11:53:13 -08:00
Johannes Rieken
09ee89ca87
remove more unused tslint directives
2020-01-03 08:14:23 +01:00
Johannes Rieken
f80a6f9b96
update rule-disablements (eslint-disable for tslint-disable)
2020-01-02 20:28:59 +01:00
Johannes Rieken
f01f7ebe93
fix some (future) linting issues
2019-12-31 09:54:04 +01:00
Matt Bierner
c0c4eb6a51
Always use same range for jsdoc completions
...
For #87091
JSdoc completions do not have different behavior for replace vs insert
2019-12-20 11:55:46 -08:00
Matt Bierner
4636be2b71
Remove grep for ts tests
2019-12-17 16:50:36 -08:00
Simon Siefke
043da28dda
fix: typescript completion item kind for local function ( #87182 )
2019-12-17 11:03:00 -08:00
Alex Ross
7a374c3d13
Handle stat.type correctly in typescript features extension
...
#85753
2019-12-17 11:58:28 +00:00
Matt Bierner
c645eeee69
Remove extra check
2019-12-12 10:31:55 -08:00
Matt Bierner
faf453c1c4
Prefer startsWith
2019-12-12 10:31:55 -08:00
Matt Bierner
1dd79d573c
Use more explicit names
2019-12-12 10:31:55 -08:00
Matt Bierner
a4177f50c4
Use object for refactor.disabled
...
For #85160
Using an object is more explict with property names and will let us introduce additional properties in the future if needed
2019-12-11 20:15:30 -08:00
Matt Bierner
58d954737f
Don't show references code lens on const members
...
Fixes #86495
2019-12-09 17:28:32 -08:00
Matt Bierner
35587bec93
Also log error when a fatal error happens
2019-12-09 17:28:32 -08:00
Matt Bierner
9bdb4a2f70
Handle normalized windows paths in resource map
...
Fixes #86433
During path normalization, we convert `\` in windows paths to `/`. This causes the isWindowsPath check to fail
I think it is generally safe to assume that file paths that start with a drive letter and then any type of slash should be treated as windows paths
2019-12-05 15:08:13 -08:00
Martin Aeschlimann
eeee6244d9
[josn] fix wrong schema-schema reference, use draft-07 everywhere
2019-12-05 11:15:39 +01:00
Matt Bierner
57455124b5
Make sure we also log the typescript error properties on fatal error telemetry events
...
Fixes #86205
We already log error metadata for failed requests. However we don't include this on the fatalError event. This makes investigation of these errors difficult
2019-12-04 10:59:15 -08:00
Martin Aeschlimann
3bef2000a8
Merge branch 'master' into patch-2
2019-11-26 14:28:00 +01:00
Matt Bierner
a63d88ec55
Make sure we normalize paths before sending them to tsserver
...
Fixes #84826
2019-11-25 20:58:47 -08:00
Matt Bierner
16fffb122b
Mark parameter suggestions as variables
...
For #85430
2019-11-25 20:09:10 -08:00
Matt Bierner
dd300e4fe7
Show constants as normal variables
...
Fixes #85429
2019-11-25 19:50:32 -08:00
Matt Bierner
4116c9411b
Use enum member completion type
2019-11-25 19:50:32 -08:00
Samuel Bronson
96479b86f3
Allow trailing commas in jsconfig.json, too
...
This is a followup to commit bcf67c867f
"allow trailing commas in tsconfig.json (for #80419 )".
2019-11-23 21:36:10 -05:00
okmttdhr
0db887a1a3
Show JS/TS References Code Lens for Inner Functions ( #84689 )
...
* Show code lens for inner functions
* Create typescript.referencesCodeLens.showOnAllFunctions setting
* Create javascript.referencesCodeLens.showOnAllFunctions setting
* Add a new setting in a existing class
* Avoid unnecessary fallthrough
2019-11-22 18:06:23 -08:00
Matt Bierner
827e94edef
Hook up basic alert of why a code action could not be applied
...
For #85160
2019-11-20 17:10:00 -08:00
Alex Ross
e82dd213dd
Make typescript problem match watch patterns less locale specific
...
Improves #46373
2019-11-20 09:33:32 +00:00
Matt Bierner
0e5a5f6524
Better time logging for js + markdown
...
We don't need full date, only times
2019-11-19 11:22:08 -08:00
Alexandru Dima
cf624b01fc
Fix memory leak caused by listeners to nulToken ( #84940 )
2019-11-19 11:13:38 +01:00
Matt Bierner
942287eb44
Fix report issue command
...
For #85021
2019-11-18 11:00:47 -08:00
Matt Bierner
5b428d2ec1
Don't use locale strings
...
For #84803
These can cause issues on node 12
2019-11-18 09:35:35 -08:00
Johannes Rieken
95a7255725
fix more compilos
2019-11-18 15:26:44 +01:00
Alexandru Dima
e7f8a94eb2
Split TS changes to separate PR
2019-11-18 12:17:23 +01:00
Alexandru Dima
41be9a6142
Merge remote-tracking branch 'origin/master' into alex/semantic-exploration
2019-11-18 08:59:14 +01:00
Matt Bierner
91200b1202
Use const enum for types
2019-11-15 14:55:14 -08:00
Matt Bierner
fa72810c77
Don't send TS Server open requests if we open then quickly close a resource
...
Fixes #84875
2019-11-15 14:02:46 -08:00
Alexandru Dima
cbb231754f
Merge remote-tracking branch 'origin/master' into alex/semantic-exploration
2019-11-15 10:10:39 +01:00
Matt Bierner
738d85a51e
Don't return js/ts fix all for empty edits
2019-11-14 15:35:46 -08:00
Matt Bierner
88c2100793
Make sure we always reset bufferSyncSupport when the TS server is started
...
Splits `reset` from `reinitialize` and makes sure we always `resset` buffer sync support when the service starts
2019-11-14 11:30:41 -08:00
Matt Bierner
4e8ef4cf4d
Remove gating for inMemoryResourcePrefix
...
Some users are setting weird errors related to untitled TS files. In some of these cases (such as https://github.com/microsoft/TypeScript/issues/35091 ) we see a untitled file being sent to the tsserver without the `inMemoryResourcePrefix`.
I can't figure out how to get into this state but am removing the gating that *could* perhaps cause use not to set `inMemoryResourcePrefix`. This gating targets TS 2.7 or older, which telemetry shows very, very few users are still enabling in their workspaces
2019-11-14 00:17:57 -08:00
Alex Dima
15beb36ccf
Merge remote-tracking branch 'origin/master' into alex/semantic-exploration
2019-11-14 09:16:10 +01:00
Johannes Rieken
27eafea04a
Merge pull request #84578 from microsoft/joh/outlineNav
...
Symbol navigation
2019-11-13 12:33:36 +01:00
Matt Bierner
cf197953d7
Prefer using vscode.workspace.fs over node fs
2019-11-12 21:59:36 -08:00
Matt Bierner
0749b7aca8
Timebox the TSServer request used in the JS/TS task provider
...
Fixes #84278
2019-11-12 21:59:36 -08:00
Matt Bierner
1f3642a07d
Add explicit type on experimental fixAll provider
...
For #84602
2019-11-12 14:28:43 -08:00
Matt Bierner
a170916295
Highlight a few other types in jsdoc comments
...
Fixes #84622
2019-11-12 13:31:09 -08:00
Greg Van Liew
8ae2921645
Nits in settings comments
2019-11-12 10:55:04 -08:00
Johannes Rieken
7e333135dd
often set selection range for TS document symbols, #84576
2019-11-12 11:28:48 +01:00
Matt Bierner
2ec3bc4fd0
Removed undocumented setting usage
2019-11-11 16:12:52 -08:00
Matt Bierner
8904a3cbce
💄
2019-11-11 16:12:52 -08:00
Matt Bierner
6118d2713e
Make sure synchronized buffers are reset when tsserver restarts
2019-11-11 16:12:52 -08:00
Matt Bierner
21fd94b70c
Make sure buffer sync reset clears pending diagnostics
2019-11-08 14:47:06 -08:00
Matt Bierner
7218d47251
Make sure we don't try calling a cached getErr
on a closed resources that are in the getErr queue
2019-11-08 14:47:06 -08:00
kieferrm
59ba1190b4
fix GDPR annotation
2019-11-08 22:36:55 +00:00
Alex Dima
c9a2de2d9c
Improve integration test output on Windows ( #84239 )
2019-11-08 17:21:35 +01:00
Matt Bierner
fdeb9aa9b8
Use 'as const' instead of readonly class object
2019-11-07 20:31:32 -08:00
Matt Bierner
a8ad448cb0
Aggressively cancel code lens requests when the resource changes
...
For #84185
2019-11-07 18:47:39 -08:00
Matt Bierner
d83f121f6d
Fix spelling
2019-11-07 07:57:04 -08:00
Alexandru Dima
c34e736195
Forward SemanticColoring disposals to the ext host
2019-11-07 16:06:46 +01:00
Alexandru Dima
bdbe2e3612
Clear semantic tokens in case of errors/empty results
2019-11-07 15:40:06 +01:00
Alexandru Dima
7761e75deb
API tweak from the standup discussion
2019-11-07 15:26:22 +01:00
Matt Bierner
bea911842a
Fix name and make sure tell VS Code about about specific code actions
2019-11-06 18:21:43 -08:00
Matt Bierner
5b63895862
Docment remaining known js/ts refactorings
2019-11-06 18:13:54 -08:00
Matt Bierner
26c4541c4a
Add coalease helper function
2019-11-06 17:47:43 -08:00
Matt Bierner
692630172a
Documenting more js/ts refactorings
2019-11-06 17:47:43 -08:00
Matt Bierner
42d53cf373
Document extract constant and extract type alias
2019-11-06 16:51:49 -08:00
Matt Bierner
c3983ca63b
Document extract interface for js/ts
...
Also re-organizes the code action kinds fo better encapsulate mapping of TS kinds to VS Code kinds
2019-11-06 16:51:49 -08:00
Matt Bierner
2510769bf9
Updat codeActions contribtions schema based on https://github.com/microsoft/vscode/issues/82718#issuecomment-550468267
...
- Adds a description
- Remove schama
- Moves the language to the top level so we don't need to duplicate so much info for each code action
2019-11-06 16:51:49 -08:00
Matt Bierner
c8d64b13e5
Add code actions contributon point
...
For #82718
Fixes #52846
This adds a newly proposed codeActions contribution point. For details, see #82718
This change also makes the intellisense for the `editor.codeActionsOnSave` property dynamic by using the new contribution point
2019-11-06 10:13:59 -08:00
Alexandru Dima
013433992a
Semantic tokenization
2019-11-05 17:17:28 +01:00
Alexandru Dima
308ff31f95
Merge remote-tracking branch 'origin/master' into alex/semantic-exploration
2019-11-05 09:44:55 +01:00
Andrii Dieiev
a188b905c6
Trigger completions on backticks in JS/TS ( #80234 )
2019-11-04 14:55:07 -08:00
Matt Bierner
c78edd8668
Pick up TS 3.7-rc
2019-11-04 08:49:47 -08:00
Johannes Rieken
073735c5e1
Merge branch 'master' into joh/willRename
2019-11-04 12:10:18 +01:00
Huáng Jùnliàng
c35b9ba236
add babel.config.json
to validation ( #83758 )
2019-11-01 11:23:04 -07:00
Johannes Rieken
5a4e23fb31
update names
2019-11-01 17:03:56 +01:00
Johannes Rieken
36c3e8756c
adjust API proposal to account for N files being created, moved, and deleted
2019-11-01 16:50:56 +01:00
Johannes Rieken
2d71cb4cdf
adopt proposed API changes in TS land
2019-11-01 12:38:46 +01:00
Johannes Rieken
14e2178b7f
fix #83762
2019-10-31 16:02:34 +01:00
Matt Bierner
c80fb1b771
Be more resilient when checking if we have an opened jts/ts buffer
...
Fixes #83338
`TextDocument` lifetime may not match that of the the user facing editors. However the JS/TS extension was assuming that it did. Introduce a `ensureHasBuffer` function that can open a buffer if vscode knows about a textdocument but no `onDidOpenTextDocument` has been fired for it yet
2019-10-29 14:26:20 -07:00
Benjamin Pasero
ca22de4b17
debt - bump node.d.ts dependency in extensions to 12.x (part of #82514 )
2019-10-28 08:11:47 +01:00
Matt Bierner
ba4a504ffe
Use a case-insensitive map for store pending buffer operations
...
Fixes #82634
2019-10-24 18:12:21 -07:00
Matt Bierner
951f891b23
Extend disposable
2019-10-24 16:58:12 -07:00
Matt Bierner
73fbb9da18
Use proper map
2019-10-24 16:58:12 -07:00
Matt Bierner
b66a2571fd
Use Disposable
2019-10-24 16:58:12 -07:00
Matt Bierner
73b3fc4348
Support performing a js/ts workspace symbol search when focused on the left side of a git view
...
Fixes #75107
2019-10-24 14:55:54 -07:00
Matt Bierner
c4868f4cc8
Use includes
2019-10-24 14:55:54 -07:00
Matt Bierner
520fafc07b
Use includes
2019-10-24 14:55:54 -07:00
Matt Bierner
8c0e291789
Make message for update imports better match vscode's message
...
For #76268
2019-10-23 18:04:22 -07:00
Matt Bierner
639ccb016f
Batch renames for js/ts
...
Fixes #76268
2019-10-23 17:57:41 -07:00
Matt Bierner
e4478d363d
Batch renames
2019-10-23 17:57:41 -07:00
Matt Bierner
6290c3ff0b
Use file name to determine if we are in a ts file or not
...
Using a textdocument to know if we are in a typescript vs a javascript document is ideal but comes at a performance cost. In most cases we can use the file name safely
2019-10-23 17:57:40 -07:00
Matt Bierner
645a178353
Use destructured paramters
2019-10-23 17:57:40 -07:00
Matt Bierner
01f429e8c9
Don't show progress indicator when we know for sure we are not doing a js/ts rename
2019-10-23 17:57:40 -07:00
Matt Bierner
46d2224d8b
Remove gating for TS versions < 2.4
...
Telemetry shows that these old TS versions have very low usage (in the tens across the many, many js/ts users). Given this, it now makes sense to remove the extra gating/checks required to support these old versions
2019-10-23 17:57:40 -07:00
Matt Bierner
0d0a574164
Normalizing names
2019-10-23 17:57:40 -07:00
Matt Bierner
45cd966a16
Use VS Code's fs instead of node
2019-10-23 17:57:40 -07:00
Matt Bierner
611fd60cd4
Make sure we update js/ts diagnostics when the visible editors change
...
Changes in one document may cause errors in other, not yet visible docs. Make sure we update the diagnostics when another file becomes visible to handle that case
2019-10-23 17:57:40 -07:00
Matt Bierner
587061a8fc
?. operator
2019-10-22 14:57:25 -07:00
Matt Bierner
07f1939ba2
Log where the typescript version is coming from
2019-10-22 11:25:14 -07:00
Matt Bierner
802d09f5f2
Use double quotes for user facing strings
2019-10-22 11:25:14 -07:00
Matt Bierner
de0cd31fa5
Rename versionString to displayName to make it clearer how this version is used
2019-10-22 11:25:14 -07:00
Matt Bierner
96a5151f7a
Workaround for TS not being able to handle interactive playground resource with query parameters in uri
...
Fixes #81059
Fixes #82419
The interactive playground generates uris that have query paramters. This causes the TS Server to crash. The workaround here is make sure the file paths we give to TS Server don't have query paramters but the ones we work with locally do
2019-10-21 18:26:40 -07:00
Matt Bierner
ed53e86205
Make sure the syntax and semantic servers don't get out of sync
...
If one server fails for a command but the other does not, we are in an inconsistent state. Treat this as a fatal error
2019-10-21 18:26:40 -07:00
Matt Bierner
ab4e86df8d
Fix time range for restart detection
2019-10-21 18:26:40 -07:00
Matt Bierner
82ca6ba87f
document that suggest.names
doesn't work with checkjs
...
Fixes #81895
2019-10-19 16:19:35 -07:00
Matt Bierner
bd200eafd1
Add configuration for includeAutomaticOptionalChainCompletions
...
For https://github.com/microsoft/TypeScript/pull/34552
2019-10-18 22:00:11 -07:00
Matt Bierner
693ffb4d57
Default maxTsServerMemory to 3GB
2019-10-18 16:14:48 -07:00
Matt Bierner
2a46387970
Use test instead of match
2019-10-18 16:14:48 -07:00
Matt Bierner
035963b1f1
Add basic pinning test for jsdoc completions
...
For #82874
2019-10-18 16:14:48 -07:00
Matt Bierner
5aec74ad3b
Treat errors on updateOpen
as non-recoverable
...
Any errors on `updateOpen` will cause the TS Server to become out of sync. This change alerts us to errors that happen in `updateOpen`. We then restart the ts server
2019-10-17 21:52:02 -07:00
Michael Loughry
89e4d3eddc
Add setting to configure the max memory for tsserver ( #82630 )
...
* Add setting to configure the max memory for tsserver
* Fix silly tpo from fixing formatting
* Add "MB" to setting description string
* Add validation to configuration value
* Add 128MB as a lower bound
2019-10-15 13:45:11 -07:00
Matt Bierner
a967c8ada3
Move js/ts json validation to js/ts language features extension
...
Fixes #73336
2019-10-04 15:31:21 -07:00
Alexandru Dima
45a92a4937
wip
2019-09-30 15:19:07 +02:00
Alexandru Dima
110b5acf0d
wip
2019-09-27 17:15:28 +02:00
Matt Bierner
e5efdb4b4b
Expand documentation for typescript.tsdk
...
Fixes #42243
2019-09-26 17:29:13 -07:00
Ron Buckton
340f7beef9
Fix to allow for optional chain token in completions ( #81402 )
2019-09-25 11:13:58 -07:00
Alexandru Dima
7e4991aa33
WIP
2019-09-25 17:49:27 +02:00
Rob Lourens
099485461d
Merge pull request #80801 from orta/capital_S
...
Fixes some capital S typoes with JS/TS
2019-09-15 14:55:34 -07:00
Andrew Branch
8774e0bb05
[typescript-language-features] Add formatter option for semicolons ( #80828 )
...
* Add formatter option for semicolons
* Add compatibility note
* Make it compile without TS 3.7
2019-09-13 13:40:41 -07:00
Matt Bierner
67e37803b7
Add telemtry property for local TS version
...
We are interested in understanding which TS versions user have enabled in their workspaces, and how widely these diverge from these the workspace version
2019-09-12 17:27:28 -07:00
Orta Therox
a89b72bf63
Fix hardcoded lower case S issues for JS/TS only for presentation-ish strinngs
2019-09-12 09:58:03 -04:00
Matt Bierner
22db92f71b
Add telemetry event when TS server is spawned
...
This is needed to help us better understand which TS versions users have enabled in their workspaces
2019-09-11 18:03:14 -07:00
Matt Bierner
f4524551e9
Remove gating for TS < 2.2.0 features
...
Based on telemetry, these versions have pretty much zero usage in the past 30 days. Removing the extra gating code since we can now assume users are on TS > 2.2.
2019-09-11 15:50:50 -07:00
Matt Bierner
7a00ddf9f8
Format files for 3.6
...
Fixes #80118
2019-09-02 21:29:05 -06:00
Matt Bierner
8891b85518
Fix caption parsing
...
For #79704
- Use regexp
- Handle unix line endings
- Don't highlight caption as part of code block
2019-08-27 14:49:19 -07:00
Andrew Liu
86723e74b6
fix for 79704 - support for @example <caption>
2019-08-26 17:19:36 -07:00
Matt Bierner
91e99652cd
Fix js/ts refactorings
2019-08-26 14:51:26 -07:00
Matt Bierner
e3b9b8eefc
Re-check opened files while executing refactoring
...
Fixes #79650
2019-08-23 23:06:01 -05:00
Matt Bierner
908ea77860
Revert "Use per-resource settings for js/ts validate.enable"
...
This reverts commit 8b61c15d3d
.
2019-08-21 17:20:03 -07:00
Matt Bierner
8b61c15d3d
Use per-resource settings for js/ts validate.enable
...
For #78549 but requires more work
2019-08-21 16:23:23 -07:00
Martin Aeschlimann
379623e369
update yarn.lock files
2019-08-21 18:04:55 +02:00
Martin Aeschlimann
be8f289fa9
update jsonc-parser
2019-08-21 16:55:59 +02:00
Matt Bierner
1429e8182f
Enable "restart ts server" command in js/tsconfig files
...
Fixes #79530
2019-08-20 11:22:24 -07:00
Matt Bierner
d9aba4fa7f
Use const enums
2019-08-15 18:03:55 -07:00
Matt Bierner
35c97ea91d
Mark readonly
2019-08-15 18:02:28 -07:00
Matt Bierner
46d0bd8100
Don't include closing ] in folded range
...
Fixes #79142
2019-08-14 17:05:13 -07:00
Matt Bierner
2c4edeb617
Make sure we compare fully normalized error codes when checking for fix all actions
2019-08-14 17:05:13 -07:00
Matt Bierner
c4733f91c8
Still show fix all actions for fix-all actions that can fix multiple errors with multple different diagnostics
2019-08-14 14:49:23 -07:00
TypeScript Tools
41414c2b5f
Strip a path list out of an error message
...
The error, which happens quite frequently, contains an excessively long path list. The message itself was cleaned up in https://github.com/microsoft/TypeScript/pull/32785 but we add some additional filtering to the editor since older server versions are still in use.
2019-08-12 15:10:29 -07:00
Alex Ross
2bf257c0c5
Implement resolveTask for typescript tasks
...
Fixes #76521
2019-08-06 09:59:09 +02:00
Alex Ross
8fda22e123
Improve typescript task slash warning
...
Part of #74995
2019-07-30 12:23:31 +02:00
Matt Bierner
049e4ca16d
Mark addMissingAwait
as a preferred fix
2019-07-24 23:09:36 -07:00
Matt Bierner
cf69f2f1af
Refactor code to use single state object instead of two
2019-07-19 18:35:42 -07:00
Matt Bierner
feef95c707
Make sure we update pending files properly
...
The previous logic failed to add anything to the pending files list
For #77665
2019-07-19 18:35:42 -07:00
Alex Ross
8b497a9019
Add slash type message to typescript tasks
...
Part of #74995
2019-07-11 11:16:30 +02:00
Matt Bierner
ae977ba1e0
Make sure we always kill the syntax server when the semantic server exists
2019-07-01 17:30:42 -07:00
Matt Bierner
35f77aab43
Enable useSeparateSyntaxServer by default and remove the experimental section from setting name
...
Fixes #76420
2019-07-01 15:10:21 -07:00
Alex Ross
01e7c59b1d
Force drive letter to lowercase in tsc tasks
...
Fixes #75084
2019-06-27 12:30:25 +02:00
Matt Bierner
cefbf36d1d
Add docCommentTemplate to syntax commands
2019-06-26 15:17:17 -07:00
Matt Bierner
9670060267
Make sure we never cancel a request to just one of the ts servers
...
Fixes #76143
2019-06-25 16:22:13 -07:00
Alex Ross
7f365d2ff2
Fix drive letter casing on typescript tasks
...
Occurs when opening by double clicking on workspace file. Fixes #75084
2019-06-25 16:36:45 +02:00
Matt Bierner
8c8f79dcef
Auto restart when changing typescript.experimental.useSeparateSyntaxServer
2019-06-24 17:07:07 -07:00
Matt Bierner
14bc8002eb
Use openExternal
2019-06-24 17:07:07 -07:00
Matt Bierner
e32e2a90c5
Make RelativeWorkspacePathResolver a static class
2019-06-24 17:07:07 -07:00
Matt Bierner
85ab838037
Add explicit win32 gheck for using user specific temp folder
2019-06-24 15:19:03 -07:00
Matt Bierner
e642a0a5db
Merge pull request #75547 from asztal/patch-1
...
Handle multiple users with /tmp/vscode-typescript
2019-06-24 12:54:45 -07:00
Matt Bierner
777010a734
Fix file name spelling
2019-06-24 11:54:45 -07:00
Matt Bierner
ffecce0476
Better encapsulate logic of spawning different server kinds
2019-06-20 18:25:12 -07:00
Matt Bierner
5fc7a8c5c0
Renames
2019-06-20 18:15:33 -07:00
Matt Bierner
fd245fcda0
Fix method name
2019-06-20 18:13:06 -07:00
Matt Bierner
362ca1d638
Also include format in the syntax commands
2019-06-20 18:01:49 -07:00
Matt Bierner
ec191a08f4
Make execute command a configuration object
2019-06-20 18:01:49 -07:00
Matt Bierner
1958209daf
Include server id in TS server errors
2019-06-20 18:01:49 -07:00
Matt Bierner
87b8402b59
Add experimental dual TS server
...
Fixes #75866
2019-06-20 17:11:20 -07:00
Matt Bierner
8ec2559029
Move getQueueingType into class
2019-06-20 17:11:20 -07:00
Matt Bierner
45ea4703c2
Renames
2019-06-20 17:11:20 -07:00
Matt Bierner
4a053c9d6d
Extract server spanwer to own file
2019-06-20 17:11:20 -07:00
Matt Bierner
ccf4a04d5a
extract server error to own file
2019-06-20 17:11:20 -07:00
Matt Bierner
7e1f8d4f1d
Extract ITypeScript server interface
2019-06-20 17:11:20 -07:00
Matt Bierner
8b93c01655
Re-queue canceled geterr requests before remaining buffers
...
We should give higher priority to files that have previously had geterr triggered on them but did not have their request completed
2019-06-20 10:27:36 -07:00
Matt Bierner
459939b905
Provide full TS symbol range when previewing definitions in VSCode
...
Fixes #72017
Has two fixes:
- Hooks up the JS/TS extension to consume the full symbol range provided by https://github.com/microsoft/TypeScript/pull/31587
- Makes the go the definition mouse implementation use the locationLink to compute the preview range. If a`targetSelectionRange` is provided, this means we use the normal `range` to get the preview range
2019-06-17 15:39:56 -07:00
Lee Houghton
fa4f870501
Handle multiple users with /tmp/vscode-typescript
...
This fixes an issue where the typescript language server fails to load if multiple users launch VS Code on the same Linux machine.
Steps to reproduce:
- Log in as user1
- Launch VS Code
- Log out
- Log in as user2
- Launch VS Code
- It tries to write to files in /tmp/vscode-typescript, but that directory is not writeable because it is owned by user1
- You cannot use TypeScript intellisense
This fix namespaces the directory with the current uid so that each user will get their own.
On Windows, this shouldn't be an issue anyway since each user gets their own temp directory.
2019-06-15 00:36:23 +01:00
Matt Bierner
e3294dc7b1
Fix exception if extension is not installed
2019-06-14 16:30:05 -07:00
Matt Bierner
c419355b5b
Merge pull request #75375 from microsoft/dev/mjbvz/vscode-api-readonly-events
...
Mark events as readonly in VS Code api
2019-06-14 11:59:57 -07:00
Benjamin Pasero
c6d9e8ea64
status - push proposed API for statusbar id/name and adopt
2019-06-14 11:52:39 +02:00
Andrius
2ac8fbb7d0
notify tsserver about changes in external files.
2019-06-13 19:20:33 +03:00
Matt Bierner
b4f6130fe4
Fix some compile errors resutling from readonly change
2019-06-12 16:54:16 -07:00
Matt Bierner
a6a376e933
Merge pull request #75092 from microsoft/dev/mjbvz/readonly-diagnostics-api
...
Use readonly arrays for the vscode.DiagnosticCollection api
2019-06-12 14:46:17 -07:00
Matt Bierner
1f4e2a21fc
Add support for loading contributed TS version
...
Fixes https://github.com/microsoft/vscode/issues/75222
Fixes https://github.com/microsoft/TypeScript/issues/31623
2019-06-10 15:42:35 -07:00
Matt Bierner
a1c33c6c12
Don't try creating untitled files in a refactoring
...
Fixes #75132
2019-06-10 11:11:12 -07:00
Matt Bierner
8448512143
Use readonly arrays for the vscode.DiagnosticCollection api
...
## Problem
The diagnostic collection object is set up so that it does not mutate the arrays of diagnostics you pass to it. It also does not expect or allow mutation of diagnostics that it returns.
However it it currently typed using normal arrays. This means that if an extension (such as JS/TS) wishes to use readonly diagnostics intnernally, it cannot do so without casting.
## Proposed Fix
Use `ReadonlyArray` in diagnostic collection. This should be a safe change for the `set` type methods. The changes to `get` and `forEach` have the risk of breaking the typing of some extensions, but `get` already returned a frozen array of diagnostic so trying to mutate the array itself would have resulted in runtime error.
2019-06-07 11:41:33 -07:00
Matt Bierner
dc2245f164
Use readonlyArray for diagnostics
2019-06-07 11:25:16 -07:00
Matt Bierner
dc8e21138f
Extend disposable
2019-06-07 11:23:14 -07:00
Matt Bierner
69a7b7ef24
Extract areLanguageDiagnosticSettingsEqual
2019-06-07 11:22:06 -07:00
Matt Bierner
a87c73527e
Remove extra work in DiagnosticSettings ctor
...
The langauges map is written so that it is lazy. We do not need to pre-populate it
2019-06-07 11:21:22 -07:00
Matt Bierner
5b01e094c2
Use includes instead of indexOf
2019-06-07 11:12:54 -07:00
Matt Bierner
809386b670
Working on getting ts server class in a testable state
2019-06-05 15:41:45 -07:00
Benjamin Pasero
d78a75973c
update @types/node ( #74881 )
2019-06-05 10:20:01 +02:00
Matt Bierner
76e774e4bd
Add arrays.empty
...
This helps with `a === b` checks in arrays.equals
2019-05-30 17:22:38 -07:00
Matt Bierner
015f1c7909
Use array prototype instead of creating instance
2019-05-30 17:13:10 -07:00
Matt Bierner
a8a0fa763f
Use every for equals
2019-05-30 17:01:10 -07:00
Matt Bierner
55d6317a4f
Don't update js/ts diagnostics if they have not changed
...
Fixes #74633
This was the indirect cause of #74633 . See that issue for an explaination of why it was problematic. In summary, updating diagnostics can retrigger code actions even if the user facing diagnostics have not actually changed
2019-05-30 16:59:32 -07:00
Matt Bierner
c62a6aa38a
Set extract kind for type alias refactoring
...
This lets you set up a single keybinding that applies to both extract constant and extract type
2019-05-29 14:22:45 -07:00
Matt Bierner
a9e31b19d7
Make sure we don't de-prioritize this. member suggestions
...
Fixes #74164
2019-05-23 16:06:34 -07:00
Matt Bierner
a4532de9af
Make sure we reset editors being iterations of test
2019-05-23 16:06:34 -07:00
Matt Bierner
1db653c59e
Simplify setting of preselect and sort text
2019-05-22 15:25:48 -07:00
Howard Hung
4582ec149c
Fix typo: assigments -> assignments
2019-05-22 01:23:12 +08:00
Khaja Nizamuddin
36e7f1871a
Normalize tsconfig path ( #73001 )
...
Fixes #68812
2019-05-21 04:01:54 -07:00
Matt Bierner
ada4bddb8e
Change documentation for TS importModuleSpecifier.auto
...
Fixes #52485
Based on code in d53efdf380/src/compiler/moduleSpecifiers.ts (L139)
2019-05-17 18:14:40 -07:00
Matt Bierner
b1aad4b755
Supress potential null errors related to updated @types/node
2019-05-17 16:14:49 -07:00
Matt Bierner
12cf3eb0f8
Pick up latest TS@next
2019-05-17 13:39:55 -07:00
Logan Ramos
ca9887459b
Delete vscode-typescript upon close of VS Code ( #73801 )
...
* Cleans up vs-typescript temp directoy upon VS code close
* Fixed typing errors preventing build from succeeding
* Moved deletion to the deactivate method. Added folders per extension host
* Removed yarn watch script used in testing
2019-05-17 18:55:31 +00:00
Matt Bierner
fd1ac7561b
Fix TS 3.5 compile errors
...
Fixing errors related to https://github.com/microsoft/TypeScript/issues/31380
2019-05-13 18:00:52 -07:00
Matt Bierner
60cd4bd73b
Merge pull request #73132 from hwhung0111/Fix
...
Fix two typos
2019-05-10 16:25:49 -07:00
kieferrm
c87ce98c9c
fix gdpr annotation
2019-05-01 17:24:00 +00:00
Howard Hung
778b92f459
Fix typo in functionCallSnippet.test.ts
2019-05-01 23:35:02 +08:00
Matt Bierner
017a497259
spell
2019-04-24 11:01:35 -07:00
Matt Bierner
24ff03f627
Pick up ts 3.4.5
2019-04-23 10:50:51 -07:00
Matt Bierner
f56b18a9f7
Pass validateDefaultNpmLocation to ts 3.4.4
...
https://github.com/Microsoft/TypeScript/pull/30910/
2019-04-22 11:44:16 -07:00
Matt Bierner
a538f095af
Organize imports should interupt geterr
...
UI operations like organize imports have higher priority than geterr
2019-04-22 11:44:16 -07:00
Matt Bierner
16944f3c4a
Merge pull request #72553 from tony-xia/makeRandomHexString
...
Update makeRandomHexString() to remove duplicate character
2019-04-22 10:57:16 -07:00
Tony Xia
697c8901a9
Update makeRandomHexString() to remove duplicate character
2019-04-18 23:20:45 +10:00
Tony Xia
941b4a9f79
Langauges -> Languages
2019-04-18 23:09:11 +10:00
Matt Bierner
e78a0ab37f
Open TS Server logs in editor if possible
...
In most cases, were are only interested in the tsserver.log file, not the additional typings installer logs
2019-04-12 17:24:22 -07:00
Matt Bierner
cad3862663
Also include returned result count in completions telemetry
2019-04-12 14:43:14 -07:00
Sandeep Somavarapu
1fd2993b54
Fix #72185
2019-04-12 07:44:56 +02:00
Matt Bierner
222e2798ff
Move min versions into jt/ts feature providers
2019-04-11 16:12:29 -07:00
Matt Bierner
9d43bdac05
Register features with Promise.all instead of sequentially
2019-04-11 16:00:46 -07:00
Matt Bierner
c6a9536ed7
Add telemetry for how long completions take in js/ts
...
We'd like to know the average time that it takes to return js/ts completions so that we can identify performance regressions. The time includes both the queuing time and the actual time spent executing the command against TS server
2019-04-11 16:00:46 -07:00
Matt Bierner
f635233740
Check in stubbed out smart select support for js/ts
...
For https://github.com/Microsoft/TypeScript/issues/29071
This require upstream TS support. Check in experimental support so that TS team can test the ux of this feature
2019-04-11 16:00:46 -07:00
Matt Bierner
d81145d3f0
Use proper documentHighlights api for html js intellisense
2019-04-10 15:21:53 -07:00
Matt Bierner
90c9650399
Handle invalid config file diagnostics from ts server
...
Fixes #72098
2019-04-10 15:21:53 -07:00
Matt Bierner
9d0a845b9e
Better comment
2019-04-10 15:21:53 -07:00
Matt Bierner
2689d1b8b9
Add some pinning tests for indent
2019-04-10 15:21:53 -07:00
Matt Bierner
5d9377b42e
Merge pull request #71944 from vitaliymaz/fix-ts-confix-extends-navigation
...
fix link navigation to extended config file in tsconfig
2019-04-09 11:26:17 -07:00
Vitaliy Mazurenko
ea2ad14dde
fix link navigation to extended config file in tsconfig
2019-04-09 10:15:14 +03:00
Matt Bierner
2538145dcd
Auto indent jsx tags with attributes
...
Fixes #65955
2019-04-08 19:09:03 -07:00
Matt Bierner
0cf20c9b6d
Better fix for #48735
...
Previous fix broke `reindent all lines` . New fix is only applied on enter and should handle bodies with multiple case better
2019-04-08 18:06:47 -07:00
Matt Bierner
88a6b2fb03
Auto indent case/default body for js/ts
...
Fixes #48735
2019-04-08 17:55:25 -07:00
Orta
3970010b52
Update README.md
2019-04-08 15:45:47 -04:00
Matt Bierner
80db6c43bd
Treat updateOpen as a fence command
2019-04-03 14:43:37 -07:00
Matt Bierner
e50c2572d4
Also treat all unused imports as a style error
...
Fixes #71067
2019-04-02 17:15:53 -07:00
Matt Bierner
42f6d4648c
Add trailing ... for command that opens a picker
2019-03-22 15:06:43 -07:00
Matt Bierner
f4921b0f20
Remove period from js/ts command title
...
Fixes #70961
2019-03-22 15:06:43 -07:00
Matt Bierner
1bccbd1cb6
Avoid sync stat call
2019-03-21 16:40:43 -07:00
Matt Bierner
4d81d14de0
Make updatePaths require TS 3.0+
...
Removes workarounds that were required to support this feature on TS 2.9.
2019-03-21 16:40:43 -07:00
Matt Bierner
25bfefce9e
Make sure update imports handles js/ts directory moves
...
Fixes #62018
2019-03-21 16:40:43 -07:00
Matt Bierner
9517c8c565
Don't include TS prefix in ts task's error code
field
...
Fixes #70572
2019-03-15 10:07:13 -07:00
Matt Bierner
e5463022e1
Show error if TS returns an empty refactoring
...
Fixes #70526
An empty refactoring response indicates that something went wrong
2019-03-14 17:58:07 -07:00
Matt Bierner
05efab0e4e
Treat diagnostics recieved as js/ts init complete
...
Fixes #68896
2019-03-11 11:08:28 -07:00
Matt Bierner
36fb7647d7
Flush buffer changes if we see the same file again
2019-03-11 10:14:07 -07:00
Matt Bierner
0e6496dff8
Don't add change if there are no changes
2019-03-11 10:14:07 -07:00
Matt Bierner
0aa886c72e
Add undocumented setting to disable batched sync
2019-03-11 10:14:07 -07:00
Matt Bierner
d597028001
Readonly
2019-03-11 10:14:07 -07:00
Matt Bierner
4b9c55d14e
Don't leak knowledge that updateOpen is special
2019-03-11 10:14:07 -07:00
Matt Bierner
2a5d86952a
Use TS's updateOpen api to batch file changes
...
For #64485
Batching file changes should be more efficent than sending requests one at a time.
2019-03-11 10:14:07 -07:00
Matt Bierner
2a2f817990
Use the updateOpen TS api to sync multiple changes in a single file
...
Fixes #69492
2019-03-06 14:54:40 -08:00
Matt Bierner
4bfec9c80f
Make sure we match whole file name for config file
2019-03-06 10:50:09 -08:00
Matt Bierner
c93f5e3560
Use regular expression to identify config file names instead of singe file name
2019-03-06 10:50:09 -08:00
Matt Bierner
38c3f4bede
Use config file diagnostics provided by TS Server
...
Fixes #69880
2019-03-05 17:07:14 -08:00
Matt Bierner
491dd0feb8
Add logging to see if TS buffers are in an invalid state
...
An example would be trying to change a file that is not opened
2019-03-01 16:06:51 -08:00
Matt Bierner
1cb65ce8e5
Extract and lift constant
2019-03-01 16:06:51 -08:00
Matt Bierner
29acd11312
Fix bad newline
2019-03-01 16:06:51 -08:00
Matt Bierner
553e6e4f79
Always clear diagnostics for a js/ts file when it closes
...
Fixes #59363
Fixes #58088
Reopens #47386
2019-02-21 10:45:43 -08:00
Matt Bierner
2e4d4a6bb1
Don't make extra reloadProjects call when a js/tsconfig files changes
...
The TypeScript Server should be watching these files already so we do not need to tell it to 'reloadProjects'. In the current case, 'reloadProjects' is causing a TS Server error
https://github.com/Microsoft/TypeScript/issues/30005
Fixes #68428
2019-02-20 16:59:35 -08:00
Matt Bierner
a2eee79774
Use 2018 as target for extensions since we are now running on node 10
2019-02-20 16:09:25 -08:00
Matt Bierner
ea995be36c
Make sure we send correctly normalized stacks on errors
2019-02-14 14:33:56 -08:00
Matt Bierner
ba19df41ff
Normalize stack
2019-02-14 14:33:56 -08:00
Matt Bierner
b819c7668e
Remove jsDocCompletion setting
...
This has been renamed to `javascript.suggest.completeJSDocs` and `typescript.suggest.completeJSDocs`
2019-02-13 17:47:12 -08:00
Matt Bierner
b4522997ac
Add preference to disable shorthand renaming
...
Fixes #68029
Use the `typescript.preferences.renameShorthandProperties` and `javascript.preferences.renameShorthandProperties` to disable shorthand property renames. Default to enabling renames
2019-02-13 17:44:08 -08:00
Matt Bierner
a8216d42a4
Make the typescript plugins contribution point dynamic
...
Part of #67575
2019-02-11 16:41:59 -08:00
Matt Bierner
1cb2f5500a
Support TypeScript's explicit "auto" quotePreference
...
Fixes #68185
2019-02-07 17:31:25 -08:00
Matt Bierner
9a766eaa38
Make sure we update tag closing registration when the document's language changes
...
Fixes #67613
2019-01-30 18:50:41 -08:00
Matt Bierner
10c3fcb4fc
Fixes #67430
2019-01-30 12:58:11 -08:00
Thai Pangsakulyanont
84424c84fd
Use jsonc parser to parse a config file
...
This fixes a problem where the `typescript` VSCode task runs `tsc` with `-p`
when it should run `-b` when `tsconfig.json` has the `"references"` property.
```js
{
"extends": "./tsconfig.app.json",
// meow
"references": [{ "path": "./tsconfig.lib.json" }]
}
```
This bug happens because while `tsconfig.json` file allows comment, the
parsing logic here uses vanilla `JSON.parse` which cannot parse comments.
This commit fixes it by using `jsonc.parse` instead.
2019-01-30 17:46:45 +07:00
Greg Van Liew
6f1cb19909
Fix jSDocCompletion deprecation message
2019-01-29 10:51:13 -08:00
Matt Bierner
c37d497f2b
Mark add missing async as auto fixable
2019-01-28 18:12:32 -08:00