Matt Bierner
c37d497f2b
Mark add missing async as auto fixable
2019-01-28 18:12:32 -08:00
Matt Bierner
13aff1eff2
Add workaround for TS not supporting providePrefixAndSuffixTextForRename not being supported per-file
...
Workaround for https://github.com/Microsoft/TypeScript/issues/29585
2019-01-28 17:16:49 -08:00
Matt Bierner
52fb9079e9
Merge pull request #67148 from RomainMuller/master
...
Fix the "tsc watch" task when references are used
2019-01-28 15:32:21 -08:00
Matt Bierner
b15877def6
Handle some edge cases of #18131
2019-01-28 14:46:29 -08:00
Matt Bierner
807759ecff
Rename jsDocCompletion.enabled to javascript.suggest.completeJsDocs and typescript.suggest.completeJsDocs
...
Fixes #67146
2019-01-28 14:46:29 -08:00
Matt Bierner
a70b1317a1
Removing languageServiceEnabled check
...
After further discussion with the TS team, we determined that we do not need to stop sending semantic commands when the language service disables itself
2019-01-28 13:40:27 -08:00
Matt Bierner
ef25b181ea
Move ServerResponse into namespace
2019-01-28 13:40:27 -08:00
Matt Bierner
ccb5a625c2
Mark extract constant as a preferred refactoring
...
https://github.com/Microsoft/TypeScript/issues/29587
2019-01-28 13:40:27 -08:00
Matt Bierner
b36fddfc1f
Experimentally marking a few more quick fixes as preferred
2019-01-25 11:48:25 -08:00
Matt Bierner
0927975565
Mark more quick fixes as preferred
...
#62110
https://github.com/Microsoft/TypeScript/issues/29450
2019-01-24 12:00:40 -08:00
Matt Bierner
4a39da971e
Extend disposable in more places
2019-01-24 12:00:40 -08:00
Matt Bierner
e6f93f3074
Extract isPreferredFix
2019-01-24 12:00:40 -08:00
Matt Bierner
508f43166b
Rename source.autoFix to source.fixAll
...
Part of #62110
`autoFix` is a confusing term since we have a `auto fix` command now. Using `fix all` as this term is used by many linters for this type of operation
2019-01-22 14:34:43 -08:00
Matt Bierner
73dfd92e65
Fix spelling
2019-01-22 14:34:43 -08:00
Matt Bierner
f929531dfb
Add CodeActionKind.intersects
...
Fixes #66881
2019-01-21 18:04:01 -08:00
Matt Bierner
c994fc20fa
Apply auto fix on save actions sequentially and make sure we request fixes of the specific type we are interested in
2019-01-21 17:16:06 -08:00
Matt Bierner
ee65a242a9
Gate auto fix for TS to use an undocumented experimental TS setting
...
We likely do not want to enable autofixes until we have proper TS support: https://github.com/Microsoft/TypeScript/issues/29452
2019-01-21 17:16:06 -08:00
Matt Bierner
4e6bd4aedd
Prototype autofix source code action
...
Part of #62110
* Adds a new `CodeActionKind`: `source.autoFix`.
* Implements a simple auto fix provider for typescript. This provider can auto fix `implement interface` and `spelling` errors (provided there is only a single valid fix listed)
The provider is likely not something we actually want to check it (especially in its current state), we should ask TS for proper autoFix support
2019-01-21 17:16:06 -08:00
Matt Bierner
4f8d546aa7
De-duplicate "fix all" quick fixes across requests for multiple diagnostics in selection range
...
For https://github.com/Microsoft/typescript-tslint-plugin/issues/49
2019-01-21 17:15:49 -08:00
Romain Marcadier-Muller
ea59a710ca
Fix the "tsc watch" task when references are used
...
Moves the `--watch` option at the end of the `tsc` invocation, as `--build`
is required to be the first option on the call.
Fixes #66875
2019-01-21 17:14:11 -08:00
Matt Bierner
bcc2281e45
Rename CodeAction.canAutoApply -> CodeAction.preferred
...
Part of #62110
Use the more generic name as suggested in https://github.com/Dart-Code/Dart-Code/issues/1393 . This makes the intent of the field more clear and also allows us to extend the concept of preferred code actions to refactorings and other classes of code actions
Experimentally also allows a `preferred` value for `apply` when configuring code aciton keyboard shortcuts. This applies the preferred code action returned from the list of code actions returned
2019-01-21 14:09:30 -08:00
Matt Bierner
1904cd8d84
Prototype auto fixable quick fixes
...
Part of #62110
- Adds a new field `canAutoApply` to code actions. This field indicates that a code action can be applied without additional user input. For quick fixes, this should be set if the fix properly addresses the error
- Enable auto fixes for TS spelling errors
- Added a `editor.action.autoFix` command to triggers auto fixes at the current cursor position
2019-01-16 17:56:22 -08:00
Matt Bierner
2ab82c12ed
Make sure we opt in to new TS user preferences for enabling rename features
...
Fixes #66176
2019-01-11 15:42:03 -08:00
Matt Bierner
adb4b04bfd
Fix type error
2019-01-11 14:40:17 -08:00
Matt Bierner
beef295f9a
Normalize the TS server path in logged TS server errors
2019-01-11 14:23:29 -08:00
Matt Bierner
e730375b7a
Don't make semantic requests against the TS server when the languageService has been disabled
2019-01-11 14:23:29 -08:00
Matt Bierner
6682006c8b
Use more explicit state for TS server states
...
Try to prevent the tracked server state from getting into weird invalid states and make the state more explicit
2019-01-11 14:23:29 -08:00
Matt Bierner
2f5d88899d
Make NoContentResponse an constant instead of a class
2019-01-11 11:04:58 -08:00
Matt Bierner
60f232b246
Include TypeScript version in errors logged to dev tools
...
Fixes #66368
2019-01-11 11:04:58 -08:00
Matt Bierner
3da39a64dd
Improve logging of TypeScript server errors
...
Fixes #66366
Fixes #66367
Avoid printing the error twice in the trace
Make sure we show helpful error information in the VS Code dev tools when a TS server error occurrs
2019-01-11 11:04:57 -08:00
Matt Bierner
d2a8ca946f
Use isCancellationRequested
2019-01-11 11:04:57 -08:00
Matt Bierner
66511a0bdb
Interup geterror during rename
...
Rename is a user triggered operation and should interupt long run error computations
2019-01-11 11:04:57 -08:00
SteVen Batten
ccdd2997a6
update AI module ( #66370 )
...
fixes #64849
2019-01-10 17:43:25 -08:00
Matt Bierner
299997228d
Don't include object key types in completeFunctionCalls
...
Fixes #66297
2019-01-09 11:52:02 -08:00
Matt Bierner
e44801f2b3
Fix inserting of duplicate calls when using typescript.suggest.completeFunctionCalls
...
Fixes #18131
2019-01-08 16:25:07 -08:00
Matt Bierner
f49c40947e
Add test for completeFunctionCalls
2019-01-08 16:07:40 -08:00
Matt Bierner
6eeb11ecf2
Extract updateConfig
2019-01-08 15:53:11 -08:00
Matt Bierner
d9e2246c9b
Temporarily revert using word range for TS completions due to #66187
2019-01-07 17:49:58 -08:00
Matt Bierner
9d2787e42e
Accepting a member completion should result in valid code
...
Fixes #58597
Default to replacing the word range in js/ts. This is a change in core behavior so we'll need to see what the feedback is like for it.
2019-01-04 18:09:48 -08:00
Matt Bierner
7a4944fb64
Add pinning test for paren accept character on bracket completion
2019-01-04 18:08:17 -08:00
Matt Bierner
6494c1c513
Adding pinning test for function treating paren as commit character
2019-01-04 18:01:01 -08:00
Matt Bierner
24cb22200e
Move wait to setup block
2019-01-04 17:33:08 -08:00
Matt Bierner
6366adf510
Add pinning test for period treated as bracket trigger character
2019-01-04 17:30:26 -08:00
Matt Bierner
b166d5896f
Add basic pinning test for commit character var completion
2019-01-04 16:56:42 -08:00
Matt Bierner
483adec7a5
Add simple pinning test for basic completion
2019-01-04 16:49:40 -08:00
Matt Bierner
df2d0c0fee
Add pinning test for #53962
2019-01-04 16:29:19 -08:00
Matt Bierner
b4964bcf35
Replace some common index based for loops with for-of loops
...
Replaces many loops of the form:
```js
for (let i = 0; i < elements.length; ++i) {
const i = elements[i];
...
}
```
with:
```js
for (const element of elements) {
...
}
```
Mix of a horrible regex based find/replace and manual touch ups
2019-01-03 19:11:18 -08:00
Matt Bierner
5cc00861fc
Enable no-var-keyword tslint rule
2019-01-03 18:02:48 -08:00
Matt Bierner
3f8579f96a
Avoid some common type casts
...
Casts can hide some type errors
2019-01-03 17:44:14 -08:00
Rob Lourens
ef2547d547
replace void 0 with undefined
2019-01-03 11:20:19 -08:00