Commit Graph

525 Commits

Author SHA1 Message Date
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
Matt Bierner
3e7bb120c7 Use label text indexes to mark active paramter for js/ts
Fixes #65513
2019-01-02 14:53:21 -08:00
Matt Bierner
44b5a77632 Use TS's document highlight API instead of references api to get highlights
Fixes #65921
Fixes #65051
2019-01-02 11:56:39 -08:00
Matt Bierner
494e5e8509 Fix bug for completing function name parameters if function name contained special snippet syntax 2018-12-23 22:22:38 -06:00
Matt Bierner
8ac2c23fdc Don't force convert fixable diagnostics to numbers
Fixes #64848 for the VS Code side
2018-12-14 14:57:37 -08:00
Matt Bierner
45c34a2c51 Remove extra Array.from 2018-12-14 14:57:37 -08:00
Matt Bierner
7632e0133e Use clear 2018-12-14 14:57:37 -08:00
Matt Bierner
83ce38f6de Make fixPathPrefixes a bit more resiliant 2018-12-14 14:57:36 -08:00
Prabhanjan S Koushik
0f5b2d14e7 Fix #64253 - Support ~/ paths for typescript.tsdk (#64892)
* fix-64253 Added fixPathPrefixes

* fix-64253 Removed  and handled ~/path
2018-12-14 14:18:24 -08:00
Matt Bierner
a87dc2b62f Interup getError for refactor and updatePaths on rename
These are user triggered operations that should interupt the background getError requests
2018-12-14 13:48:53 -08:00
Matt Bierner
d02be78457 Show progress during update JS/TS imports
Fixes #64986
2018-12-14 13:29:57 -08:00
Matt Bierner
90f36693c9 Extend disposable 2018-12-14 12:54:07 -08:00
Matt Bierner
bb8fc43f72 Remove un-needed cast 2018-12-14 12:52:48 -08:00
Matt Bierner
6b89247875 Allow extension contributed TS plugins to be loaded for workspace versions of TS
Fixes #65031

Adds a `enableForWorkspaceTypeScriptVersions` flag (default false) to the plugins contributions that  allows a contributed plugin to be loaded for workspace versions of ts
2018-12-13 14:29:32 -08:00
Matt Bierner
5dc52f0617 Extract getCodeLensLabel 2018-12-12 18:07:37 -08:00
Matt Bierner
314b7d75a3 Use text icon for js text suggestions
Fixes #64777
2018-12-11 16:18:58 -08:00
Matt Bierner
7683decdb5 Adding more tests for cached response 2018-12-10 14:12:33 -08:00
Matt Bierner
2b7278c712 Adding better test case for not caching cancelled responses 2018-12-10 14:12:33 -08:00
Matt Bierner
68e0182064 Add test for not caching cancelled response 2018-12-10 14:12:33 -08:00
Matt Bierner
863aee78b6 Adding basic test for cached response 2018-12-10 14:12:33 -08:00
Matt Bierner
aa990b4528 Don't cache cancelled ts server responses
Fixes #64649
2018-12-10 14:12:33 -08:00
Matt Bierner
8b4924d755 Build VS Code using TS 3.2
Fixes #64631
2018-12-07 14:25:14 -08:00
Matt Bierner
a4bed89652 💄 2018-12-07 14:25:14 -08:00
Matt Bierner
98f236872e Use undefined instead of null 2018-12-07 14:25:14 -08:00
Matt Bierner
3fc69f20ab Add toOpenedFilePath method
Make sure we don't try making requests against TS for files that are not currently open
2018-12-07 14:25:14 -08:00
Matt Bierner
7140c91245 Never return undefined for cachedResponse.execute 2018-12-07 14:25:14 -08:00
Matt Bierner
98605b6a4e Extract cached response to own file 2018-12-07 14:25:14 -08:00
Matt Bierner
5562872fea Remove workaround for ts infer type suggestions showing up with no quick fix
This should not be needed now that we are shipping TS 3.2.2
2018-12-06 20:09:23 -08:00
Matt Bierner
07f6967a68 Cache document symbol navtree requests
Fixes #64570
2018-12-06 16:26:48 -08:00
Matt Bierner
ad8d18edf3 Match signature context field name to type name 2018-12-04 17:06:59 -08:00
Matt Bierner
5010af1171 Hide infer type suggestions when using broken versions of ts
Fixes #64395
2018-12-04 16:18:30 -08:00
Matt Bierner
f264e8f33b Make sure our temp ts directory really exists
Fixes possible cause of #64132

Some system operations or users may clear out this folder. This should not prevent TS from launching
2018-12-03 16:24:27 -08:00
Matt Bierner
64117e8fb5 Rename TriggerReason -> TriggerKind
Fixes #64216
2018-12-03 13:53:53 -08:00
Matt Bierner
e42d74ce9a Fix completions for intellicode
IntelliCode uses `insertText`  on all of its suggestions. When completing properties, we were incorrectly assuming that only bracket suggestions would use `insertText`
2018-12-02 11:53:15 -08:00
Matt Bierner
e39a97deb7 Fix snippet function call completions for intellicode 2018-12-02 11:53:15 -08:00
Matt Bierner
a3378e4342 Add pinning test for bracket completions 2018-11-29 17:09:48 -08:00
Matt Bierner
c5afb50a5b Added test for #63100 2018-11-29 17:09:48 -08:00
Matt Bierner
06a64b097f Extract joinLines 2018-11-29 17:09:48 -08:00
Matt Bierner
beb5998ea3 Correctly sort bracket accessor completions in js/ts completion list
Fixes #63100

As suggested in  #63100, always set the range for member completions and overwrite the dot
2018-11-29 15:09:44 -08:00
Matt Bierner
e42051996b Don't trigger parameter hints when completing empty method
Fixes #64023
2018-11-29 12:03:36 -08:00
Matt Bierner
3f33ef2593 Support whitespace after dot for bracket completions
Fixes #64002
2018-11-29 10:44:27 -08:00
Matt Bierner
cd5b4d1bb3 Use insertText as filterText for js/ts completions by default
For some completions—such as those provided
 by IntelliCode—the label results in the incorrect sort order. IntelliCode prefixes completion labels with a unicode star, which means they appear after the normal completions

This fix make sure we use the actual text to be inserted for filtering by default instead of the label
2018-11-28 19:05:40 -08:00
Matt Bierner
364824a864 use simpler typeof check 2018-11-28 19:01:22 -08:00
Peng Lyu
63710859e6 Merge pull request #63792 from vim88/fix_typo_in_comments
Fixes typo and occurrences of double words in comments.
2018-11-28 10:54:52 -08:00
Matt Bierner
9d2251469f Do not display errors in editor for cancelled js/ts code lenses
Fixes #63884

Resolving a code lenses may be cancelled if the document changes. This is normal and should not be displayed as an error in the editor
2018-11-27 17:11:07 -08:00
Matt Bierner
42145f1f0c Interupt TS references and implementations requests
Fixes #60213

These are low priority UI elements and should not block user ui requests that come in, such as completions
2018-11-27 16:48:11 -08:00