Commit Graph

343 Commits

Author SHA1 Message Date
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
Matt Bierner
c78dafa252 Treat ; as a commit character in js/ts
Fixes #44011
2018-09-06 10:48:17 -07:00
Johannes Rieken
c2c5819fc8 adopt vscode-nls 4.0.0 2018-09-06 14:44:33 +02:00
Johannes Rieken
74fa1d8994 Merge pull request #57956 from Microsoft/joh/vsce-next
use packagedDependencies from running vsce#ls
2018-09-06 11:14:38 +02:00
Matt Bierner
72a24483c4 Use providedCodeActionKinds to avoid calling providers that we know will not return actions of interest
Part of #57875
2018-09-05 11:14:28 -07:00
Matt Bierner
a9e93b1055 Try interuprting getErr requests for user actions
Fixes #57542
2018-09-05 10:13:28 -07:00
Matt Bierner
420917046b Use events on Reader instead of callbacks
Also make reader dispoable
2018-09-05 10:13:28 -07:00
Matt Bierner
c207d5da4c Don't try restarting ts server after extension deactivation
Fixes #57534
2018-09-05 10:13:28 -07:00
Johannes Rieken
3885d4613e Merge branch 'master' into joh/vsce-next 2018-09-05 14:06:12 +02:00
Andrew Casey
cd7c7c5fa2 Add GDPR annotation for typescript-language-features/languageserviceerrorresponse (#57182) 2018-09-04 15:37:27 -07:00
Johannes Rieken
ccec2c9543 use vsce packagedDependencies 2018-09-04 12:29:23 +02:00
Johannes Rieken
f82bcb20ed webpack - move __dirname-config up into shared config 2018-09-03 12:38:46 +02:00
Johannes Rieken
a3b6f18ac4 fix #57390 2018-08-28 16:35:27 +02:00
Johannes Rieken
b0f63ff69d Merge pull request #57155 from Microsoft/joh/ts-webpack
Webpack for ts extension
2018-08-24 17:00:11 +02:00
Johannes Rieken
1f616aaee8 update ignore file 2018-08-24 16:51:11 +02:00
Johannes Rieken
cdb9c0a8f4 update vscode-nls-dev to fixed version, share more config between extensions 2018-08-24 16:37:10 +02:00
Matt Bierner
cd9beb845c Disable node_modules check for update paths on file rename
Fixes #55882

This check was originally added to workaround a TS issue which should now be fixed. If it is not fixed, we want to know about it so that we can get TS to fix it upstream
2018-08-24 16:02:49 +02:00
Matt Bierner
a8d7c6343c Don't request refactorings for empty selections 2018-08-24 16:02:49 +02:00
Johannes Rieken
6ba52f7b25 copy nls 2018-08-24 15:04:36 +02:00
Johannes Rieken
099d99b76c wip 2018-08-24 14:54:50 +02:00
Matt Bierner
ae5fff075d Don't explicitly de-indent on ) in js/ts
Fixes #56275
2018-08-24 12:26:44 +02:00
Matt Bierner
7b21b23496 Remove out of date comments 2018-08-24 12:26:44 +02:00
Matt Bierner
ad68ff316c Remove std-fork 2018-08-21 17:05:46 +02:00