Commit Graph

365 Commits

Author SHA1 Message Date
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
Matt Bierner
e6443c6220 Fix description 2018-09-11 12:54:46 -07:00
Matt Bierner
1ff383c64f Split useCodeSnippetsOnMethodSuggest into js and ts specific settings
Splits the old setting into `javascript.suggest.insertParametersForFunctionCalls` and `typescriptscript.suggest.insertParametersForFunctionCalls`

Fixes #58385
2018-09-11 11:20:38 -07:00
Matt Bierner
cb1768b61f Fix commit charactes not working if you trigger them manually after a .
Cases like: `console.|` should have commit characters while, `...|` should not
2018-09-11 11:14:18 -07:00
Matt Bierner
f8486f95a7 Reject renames with string message directly 2018-09-11 10:49:40 -07:00
Matt Bierner
3d011dea44 Catch errors on navto requests
Fixes #58421
2018-09-11 10:48:45 -07:00
Matt Bierner
33db532608 Show error early on invalid rename in js/ts
Fixes #58393
2018-09-11 10:48:45 -07:00
Alex Dima
f9d8addc07 Merge remote-tracking branch 'origin/master' into pr/limerickgds/51557 2018-09-11 15:30:40 +02:00
Matt Bierner
d33b1c3063 Initial work on signature help context (#58135)
* Initial work on signature help context

Fixes #54972

Adds `SignatureHelpContext`. This tells providers why signature help was requested

TODO:

- [ ] Better understand semantics of retrigger. Should `retrigger` be an flag instead of a `triggerReason`?
- [ ]  Fix skipped test
- [ ] Add more tests for trigger reasons / trigger characters

* Fix unit test

* Make sure we retrigger sig help if it is already showing

* Add test for dismiss and re-invoke

* Extract some constants

* Extract createMockEditor
2018-09-10 17:44:21 -07:00
Matt Bierner
5db4761cac Remove unused param 2018-09-10 15:51:55 -07:00
Matt Bierner
d5bd9803bd Change behavior of jt/ts jsdoc completions
Changes how jsdoc completion works to reduce typing delays and hopefully avoid showing it for fewer false positives. Main changes

- Only show the completion item if typescript's docCommentTemplate returns something. This means that you won't see the completion item in cases like: `/** |a */`  or `/**|` anymore. However in the case of `/**|`, pressing return will still complete to the empty comment as expected

- Get the snippet for the completion early so there is no flash when accepting it
2018-09-10 15:41:07 -07:00
Matt Bierner
2d4a98842b Rename javascript.nameSuggestions to javascript.suggest.names
Bring this setting name inline with other suggestions settings

Part of #58385
2018-09-10 15:41:07 -07:00
Matt Bierner
ae7035dbbf Add setting to disable all path based sugestions in js/ts
The new  `javascript.suggest.paths` and `typescript.suggest.paths` settings replace `typescript.quickSuggestionsForPaths`. These settings should disable all path based suggestions from js/ts

The old `quickSuggestionsForPath` setting is now marked deprecated and is not being migrated to these new settings as it has different semantics. It was originally designed just to disable quick suggestions for paths but it does not work properly when using TypeScript 2.9+
2018-09-10 15:41:07 -07:00
Matt Bierner
72581dfca9 Rename typescript.autoImportSuggestions.enabled and allow it to be applied to js or ts separately
Part of #58385
2018-09-10 15:41:07 -07:00
Matt Bierner
98894ae9ba Rename typescript.suggestions.enabled to typescript.suggest.enabled to be more consistent with other extensions 2018-09-10 15:41:07 -07:00
Matt Bierner
937cbc186b Split suggestions.enabled into js and ts specific settings 2018-09-10 15:41:07 -07:00
Matt Bierner
3e176b19bc Only wrap rename request in try catch 2018-09-10 12:49:49 -07:00
Dave Williams
b9dbeb90d1 New config to turn off TypeScript autocomplete suggestions (#58011)
* New config to turn off TypeScript autocomplete suggestions

* add missing semicolon

* Exclude everything, even name suggestions, when suggestions disabled
2018-09-10 11:06:12 -07:00
Matt Bierner
d140d23129 Disable all commit characters when in spread contexts
Fixes #55700
2018-09-10 10:58:34 -07:00
Matt Bierner
567baa4eff Fix some errors around js commit characters
- Add commit characters for keywords such as `this` and `super`.
- Allow trigger characters on lines with only leading whitespace

Fixes #58048
2018-09-10 10:44:37 -07:00
Matt Bierner
dc47417f54 Delegate js/ts code lenses back to vs code
Fixes #43574
2018-09-07 16:47:26 -07:00
Alex Dima
c36258d23f Use const enums (to inline their values in JS) 2018-09-06 20:39:19 +02:00