Commit Graph

386 Commits

Author SHA1 Message Date
Matt Bierner
0cfe8a1d7e Fix potential TSC error 2018-10-08 15:24:11 -07:00
Matt Bierner
f516d17267 Add support for TS RenameTextSpan
Fixes #60204
2018-10-08 15:18:08 -07:00
Matt Bierner
2f51e97117 Add retrigger characters to SignatureHelpProvider
Introduces the concept of a re-trigger character to the signature help provider. This is a seperate set of characters that are registered with the provider. Typing a retrigger character fires a new signature help request if signature help is already showing.

#54972
2018-10-05 16:01:02 -07:00
Matt Bierner
000f027497 Formatting 2018-10-05 13:56:34 -07:00
Matt Bierner
696fc1b48e Make sure we close old resource on ts server for path updates
Fixes #53466
2018-10-05 13:55:11 -07:00
Matt Bierner
03ed0959ee Improve message on update imports prompt
Fixes #59151
2018-10-05 13:47:14 -07:00
Johannes Rieken
7d7c27cf3e less strict checking of rename locations, #58907 2018-10-03 16:49:09 +02:00
Matt Bierner
402106a699 Introduce a shared tsconfig for extensions
Setup a baseline tsconfig for extensions to extend. This will help make sure thatof our built-in extensions are using the recommended settings for target and so on. it also reduces duplicated code and will make updating tsconfig settings easier
2018-10-01 16:35:43 -07:00
Joao Moreno
707787c5b8 update yarn.lock files to use integrity 2018-09-30 16:34:43 +02:00
Matt Bierner
e20fdf9545 Signal that TS Server has loaded succesfully when any error event is received
A successful error computation more or less signals that the server is ready and is more reliable than waiting for the projectUpdatedInBackground signal
2018-09-27 11:59:58 -07:00
Matt Bierner
17cfeaf31e Add better error message about disallowed rename of directory in import path 2018-09-26 17:47:28 -07:00
Matt Bierner
29e8dcffcf Use rename cancellation token for file rename request to ts server 2018-09-26 17:47:27 -07:00
Matt Bierner
41c47d1b56 Don't rely on updatePathOnFileMove for path renames
Better fix for #51175
2018-09-26 17:32:20 -07:00
Matt Bierner
a2d3c87982 Fix file path rename for js/ts
Fixes #51175
2018-09-26 17:23:55 -07:00
Matt Bierner
f94cfe6677 Make sure javascript.updateImportsOnFileMove.enabled also has enum descriptions
Fixes #59509
2018-09-26 17:23:55 -07:00
Matt Bierner
2e95080816 Use markdownEnumDescription for all js/ts enums
Fixes #59508
2018-09-26 17:23:55 -07:00
Matt Bierner
9906ecc7a5 Disable path renames on TS 3.1
Outcome of #51175. Requires fixes upstream
2018-09-26 14:15:07 -07:00
Matt Bierner
6e9a02177a Fix fileToRename no preserving extension 2018-09-26 14:08:18 -07:00
Matt Bierner
d8ccc514f5 Remove unneeded any cast 2018-09-26 14:08:18 -07:00
Matt Bierner
f169056822 Use better name for insertParamtersForFunctionCall setting
Renamed to `completeFunctionCalls` to hopefully make it clear that this setting will also complete functions with no parameters

Fixes #59325
2018-09-26 11:53:54 -07:00
Ramya Achutha Rao
972ee3f948 Use latest applicationinsights in extensions too 2018-09-25 16:45:00 -07:00
Matt Bierner
7d359986ba Use less than for TS version checks instead of inverting greater than checks 2018-09-24 17:57:45 -07:00
Matt Bierner
484bf49abf Better fix for #58518 to avoid possible duplicated configure requests 2018-09-24 16:42:17 -07:00
Matt Bierner
58a72ab6cf Don't cache file config options until we succesfully complete a request
Fixes #58518
2018-09-24 16:42:17 -07:00
Matt Bierner
4861c344e2 Fixing tsc build tasks for project references
https://github.com/Microsoft/TypeScript/issues/27150
2018-09-24 16:18:58 -07:00
Matt Bierner
1369c6e595 Don't send @ as trigger character for ts 3.1
Fixes #59165

Workaround for https://github.com/Microsoft/TypeScript/issues/27321
2018-09-24 15:16:42 -07:00
Matt Bierner
97c753fa1f Don't treat cancellation as an error
**Problem**
In the ts server communication, canceling a request currently throws an exception. This is wrong because  cancellation is not an error. It also means that we need to wrap every server call in a generic try catch to handle cancellation. There are no checks in place to distinquish a cancellation from a rea
2018-09-20 10:59:01 -07:00
Matt Bierner
df411e9db3 Make js/ts quickfix-all action last item in group
fixes #55641
2018-09-20 10:59:01 -07:00
Johannes Rieken
5037516238 updated lock files 2018-09-20 12:06:55 +02:00
Johannes Rieken
6999ddbab7 update vscode-extension-telemetry 2018-09-20 12:06:55 +02:00
Matt Bierner
81562ab7b7 Tweak survey message 2018-09-19 17:39:30 -07:00
Matt Bierner
fd80f0de8a Don't potentially allow showing survey multiple times if user does not interact with a previously shown survey 2018-09-19 17:35:19 -07:00
Matt Bierner
f6b11178f7 Add check js survey
**Problem**
We'd like to understand the types of problems users are running into when using the checkJs feature in real world code. This is not something we can determine automatically

**Fix**
The TS team has put together a short survey that will hopefully help them understand how people are using checkJS and what problems they run into. This change adds client side logic to show the survey in the following case:

- A user as opened 10 projects that have checkJS set
- And they have not been prompted to complete the survey previously
- And they have not opted out of all js/ts surveys
2018-09-19 17:19:38 -07:00
Matt Bierner
a39679a8d0 Use results from _register directly 2018-09-19 17:19:38 -07:00
Matt Bierner
c785fc3c0b Remove use strict 2018-09-19 17:19:38 -07:00
Matt Bierner
cc9560c699 Make sure we trace events from tsserver 2018-09-19 17:19:38 -07:00
Matt Bierner
f20cd1aae1 Create uri from string correctly for ts server log
Fixes #58979
2018-09-19 17:19:37 -07:00
Matt Bierner
df8e43d8ef Trigger parameter hints when using insertParametersForFunctionCalls in js/ts
Fixes #58540
2018-09-19 17:19:37 -07:00
Alex Dima
34e7a220c8 Avoid shipping unnecessary files 2018-09-19 19:53:46 +02:00
Ramya Achutha Rao
d0a67178ca Update appinsights in built in extensions 2018-09-18 18:35:12 -07:00
Matt Bierner
565c88f4fd Use more reliable signal for ts project load complete
`telemetry` is not fired for implicit projects, while `projectsUpdatedInBackground` should always be fired. Gating this to 3.0 since I believe the event was only added recently
2018-09-18 16:51:01 -07:00
Matt Bierner
6ec7423464 Show loading indicator while js/ts language features are first being initialized
First suggested in #22614

Fixes #58916
2018-09-18 16:28:49 -07:00
Matt Bierner
1be59b4573 Support typescript's fileToRename
Fixes #51175

Allows triggering renames on import paths
2018-09-18 15:22:59 -07:00
Matt Bierner
0aaa7c9d46 Pick up support for TS's new triggerSpan property on rename 2018-09-18 15:22:59 -07:00
Matt Bierner
e6572ca1ea Make sure we don't log an exception for cancelled ts requests while server is still coming online
Fixes #58781
2018-09-17 13:59:29 -07:00
Matt Bierner
17e5e90742 Make we always complete canceled ts server requests properly
Fixes #58560

If the queued (but not sent) ts server request is canceled, we could previously fail to resolve its callbacks. This change makes sure we always resolve the callbacks for cancelled requests
2018-09-17 13:59:29 -07:00
Matt Bierner
b70c9308fa Use async import for registering update paths 2018-09-13 15:43:47 -07:00
Matt Bierner
6f440fcb7e Register a single workspacesymbol provider for js/ts
Avoid potentially making two workspace symbol: one for js and one for ts
2018-09-13 15:43:47 -07:00
Matt Bierner
dbeeecbaed Refactoring to create TS Server object
Rebase of a number of incremental changes listed below

Move first level dispatchMessage into ForkedTsServerProcess

Goal is to move callbacks and other per-server state into `ForkedTsServerProcess`

Create forked ts server object syncrounously

There is no reason for this to be async anymore. Making this object sync reduces complexity and makes the code easier to reason about

Moving server relate functions into ForkedTSServer object

The goal here is to have a single "server" object that keeps track of all its relevant state. The service client would manage one of these servers at a time, starting new ones if needed and dispatching to old ones

Split server into own file

Use switch case instead of conditionals

Make pendingResponses readonly

Add typings for callback item

Improve naming

- Use more descriptive names
- Preview private vars with _

Use passed in version for getting command line args

Attach webview click handler to window instead of to document body

Fixes #48926

Change error handling for ts server exit and error

- Don't fire twice on error (once for the `once` and once for the `onError`)
- Flush callbacks on both exit and error.

Remove cancellationPipeName as state

Remove obsolete comment

Move all env generation into generatePatchedEnv

Extract server spawn into static method

Move spawn from static to be own factory class

Move providers from arguments to state on the spawner

Update js/ts grammar

Remove duplicate error handler

Cleaning up server fork

- Standarize names
- Extract methods
- Move some function to be private statics
- Move logging out of electron and into server.ts

Use undefined instead of null for optional value
2018-09-13 11:55:44 -07:00
Matt Bierner
6ed4cced25 Check the correct previous text for suggestions 2018-09-12 11:56:21 -07:00