Commit graph

1292 commits

Author SHA1 Message Date
Matt Bierner d04956f6a7
Switches the 'Fix all' quick fix provider to use resolveCodeAction (#107853)
Made while testing #106410
2020-11-09 18:00:46 -08:00
Matt Bierner 451c2b61d3 Specify type of CodeLensProvider instead of using casts 2020-11-05 12:19:55 -08:00
Matt Bierner 9f4737fa3f Exclude definitions from js/ts references code lens
Fixes #98274
2020-11-05 12:17:18 -08:00
Benjamin Pasero ac2ca0b539 typescript - fix nls issue
//cc @mjbvz
2020-11-05 10:49:22 +01:00
Matt Bierner 4a54027a82 Disable rename after refactoring in interactive playground
Fixes #75137
2020-11-04 18:06:39 -08:00
Matt Bierner 81a25a894c Rename implicit project settings and deprecate old ones
For #109990
2020-11-04 14:55:28 -08:00
Matt Bierner ff7cc33236 Use objects.equals for comparing configuration objects 2020-11-04 14:33:24 -08:00
Matt Bierner 05fee0cf3d Extract implictProjectConfiguration class 2020-11-04 14:33:24 -08:00
Matt Bierner 64705a07dc Add two new setting for strict null and strict funtion in js/ts that are implicit projects
For #109988

The new `js/ts.implicitProjectConfig.strictNullChecks` and `js/ts.implicitProjectConfig.strictFunctionTypes` control these settings in implict javascript and typescript files that are not contained in a jsconfig or tsconfig project. They are enabled by default for now so that we can collect feedback on them
2020-11-04 14:33:24 -08:00
Matt Bierner c38a12c26c Quote jsconfig and tsconfig in setting 2020-11-04 14:33:24 -08:00
Matt Bierner 8141dcf29a Extract adjustFoldingEnd 2020-11-04 13:19:38 -08:00
Matt Bierner 97db458fa4 Show closing ) while folding JS/TS
Fixes #109854
2020-11-04 13:19:38 -08:00
Matt Bierner 0608e3f5bd Pick up TS 4.1-rc for insiders 2020-11-04 13:19:38 -08:00
Johannes Rieken 0729278ad1 use label2 when CompletionEntry#source is a path inside the workspace 2020-11-02 13:22:12 +01:00
Matt Bierner 8a5ffbb044
Mark DocumentSelector as readonly (#109212)
This change:

- Make  `DocumentSelector` use a readonly array
- Updates all properties of `DocumentFilter` to be readonly

`DocumentSelector` is used as a parameter in our provider APIs and does not need to be mutable. This change lets extensions pass in readonly values for the selector
2020-10-23 18:37:39 -07:00
Matt Bierner dc9c7fae94 Remove readonly
This change was mistakenly checked in
2020-10-22 23:51:27 -07:00
Matt Bierner aabcbd5ef8 Also enable errors and warnings in interactive playground
For #83025
2020-10-22 22:42:55 -07:00
Matt Bierner 40fc0b1789 Enable semantic features in interactive playground
Fixes #109190
2020-10-22 22:36:08 -07:00
Matt Bierner 16075cc22a Add insertSpaceAfterOpeningAndBeforeClosingEmptyBrackets formatting setting
Fixes #109190
2020-10-22 22:36:08 -07:00
Matt Bierner 37c63d6ae5 Don't show loading and project loading status for in-memory JS/TS files
Fixes #108454
2020-10-19 17:18:49 -07:00
Matt Bierner 706857dfa5 Pass executingFilePath to TS server 2020-09-29 17:59:29 -07:00
Matt Bierner 6ef40a891b Disable TS plugins on web 2020-09-29 17:59:29 -07:00
Matt Bierner ee536909df Enable logging for TS Server on web
The web server does not have a log file
2020-09-29 17:59:29 -07:00
Matt Bierner f1e631ab83 Update ts server web build 2020-09-25 16:22:05 -07:00
Matt Bierner 5a7d0a1ed2 Adopt resolveCodeAction for JS/TS refactorings 2020-09-18 18:17:31 -07:00
Matt Bierner 5b4350943e Remove custom typings for refactor trigger reason
This property has been finalized
2020-09-18 18:17:31 -07:00
Matt Bierner b255097c33 null -> undefined 2020-09-18 18:17:31 -07:00
Matt Bierner bd54e5f5cc Simplify showQuickPick 2020-09-18 18:17:31 -07:00
Matt Bierner f26d81979f Extend disposable 2020-09-18 16:27:21 -07:00
Matt Bierner f8f2538d20 Move exists to own file 2020-09-18 16:26:04 -07:00
Matt Bierner c3651027ba Use enum 2020-09-18 16:23:49 -07:00
Matt Bierner 017a42552b Use Promise.all to perform config finding in parallel instead of sequentially
For #87494
2020-09-18 16:15:50 -07:00
Matt Bierner bf2448549d Make getTsConfigsInWorkspace observe the TaskProvider cancellation 2020-09-18 16:15:50 -07:00
Matt Bierner d1510288f0 Add timeout for vscode.workspace.findFiles
For #87494
2020-09-18 16:15:50 -07:00
Matt Bierner 6932306e4d Add (get) and (set) prefixes to JS/TS getters and setters in the outline
Fixes #106935
2020-09-18 11:06:32 -07:00
ChaseKnowlden e8760a5d6c Fix capitalization of GitHub org 2020-09-17 11:43:03 +02:00
Matt Bierner 50cc1d0e97 Update to use TS 4.1 for building VS Code 2020-09-16 11:58:01 -07:00
Matt Bierner 2a954244f0 Only allow configurePlugin against main TS Server
Fixes #106346

Looks like the TS Server doesn't support this in partial mode at the moment
2020-09-09 09:21:56 -07:00
Jean Pierre a6833ed841
proper fix for #105202 (#106293) 2020-09-08 14:46:43 -07:00
Matt Bierner e969bc18a1 Disable errors in non-semantic supported files
Fixes #106299
Fixes #106314

Also enables js/ts features on the right side of PRs and in search results
2020-09-08 14:39:58 -07:00
Matt Bierner 3dc43cb7b3 Exclude pr schemed files from js/ts language features
Fixes #105842
2020-09-02 10:36:24 -07:00
Matt Bierner b8e4718a12 Disable js/ts features for the private scheme
This scheme is used internally by VS Code for features such as search/replace preview
2020-09-01 15:07:05 -07:00
Matt Bierner e6b0f45556 Use containerName if it exists 2020-09-01 14:10:15 -07:00
Matt Bierner 5e9a412cd9 Remove experimental typings
These typings are now in TS 4.0
2020-09-01 14:02:58 -07:00
Pranav Senthilnathan fb80351278
prune the refactor not applicable reasons if there are too many (#103203)
* prune the refactor not applicable reasons if there are too many

* Add in appendInvalidActions for older TS versions

Co-authored-by: Matt Bierner <matb@microsoft.com>
2020-08-31 15:37:02 -07:00
Jean Pierre 8b1aca7255
Fixes #105202 (#105664) 2020-08-31 14:54:51 -07:00
Johannes Rieken bc3b0defe0 use extensionUri and joinPath instead of asAbsolutePath 2020-08-28 14:57:20 +02:00
Alex Ross 0de8d51904 Finalize task detail API
Fixes #69785
2020-08-27 11:08:48 +02:00
Matt Bierner 64d126cafb Add new TSS_REMOTE_DEBUG flags that are only active in remote cases
Fixes https://github.com/microsoft/vscode-remote-release/issues/3546
2020-08-19 17:07:13 -07:00
Matt Bierner f694b07825 Make sure we do not enable JS/TS language features on live share clients
For #104180
2020-08-18 16:48:16 -07:00
Duc Nghiem Xuan 63c711deef
Don't include this function types in completeFunctionCalls (#104479) 2020-08-17 17:52:26 -07:00
Matt Bierner 650f7688f3 Add (loading...) prefix to hovers while TS Server is starting up
Fixes #104859
2020-08-17 17:48:26 -07:00
kieferrm c17b4c2488 fix GDPR annotations 2020-08-12 00:47:16 +00:00
kieferrm ce508a8214 fix GDPR annotation 2020-08-12 00:44:36 +00:00
Matt Bierner b84660fa86 Add more specific checks for being on TS 4.0.1
Fixes #104456
2020-08-11 15:23:56 -07:00
Andrew Maust 2f61d0037c
fixes #104059 (#104193)
Co-authored-by: Andrew Maust <69081050+Andrew884@users.noreply.github.com>
2020-08-10 20:46:14 -07:00
Eric Piacentini 7e4fd71ad8
Removed lines requiring Typescript version < 3.0 (#104211) 2020-08-10 20:45:11 -07:00
Matt Bierner 6d0ac47022 Fix RC version 2020-08-10 20:06:06 -07:00
Matt Bierner a3e37dc103 Remove expect error 2020-08-10 14:33:10 -07:00
Matt Bierner d21ff5b1c3 Remove expect error for TS 4.0 2020-08-10 14:31:25 -07:00
Matt Bierner 6dd0a9a64d Remove any casts 2020-08-10 13:36:19 -07:00
Alex Ross 924ccf2b63 Include weird timestamp pattern in tsc-watch problem matcher
Fixes #104157
2020-08-07 11:00:41 +02:00
Daniel Rosenwasser 54a38a2ee9
Add check to ensure RC and forward use '--serverMode'. (#104123) 2020-08-05 15:26:59 -07:00
Matt Bierner 4193455a6f Observe the new createAutoImportProviderProgramDurationMs property added by TS 4.0
Adds this property to our completion telemetry
2020-08-05 12:28:44 -07:00
Matt Bierner 4430401028 Include server id in telemetry and in user issue reports
From https://github.com/microsoft/TypeScript/issues/39795#issuecomment-668250348
2020-08-03 16:03:34 -07:00
Matt Bierner 358cc674a7 Add more exclaimation points 2020-08-03 16:03:34 -07:00
Matt Bierner 0009a0b424 Fallback to bundled version if selected TS version is invalid
Fixes #103213

This restores some logic that we removed during the web refactoring
2020-08-03 15:08:28 -07:00
Andrew Branch 4a206a33e5
Change includePackageJsonAutoImports options (#103732) 2020-08-03 14:16:28 -07:00
adfnekc fd75556c52
fix unicode download url error (#103460)
unicode downloadurl change
2020-07-30 20:47:34 -07:00
Matt Bierner 519ce367a3 Use asAbsolutePath instead of hardcoding path 2020-07-24 13:52:48 -07:00
Matt Bierner d43491b79d Reduce number of files copied for TS web build 2020-07-24 13:52:48 -07:00
Alex Dima 91cdca1bdb
Do not ship unnecessary files with extensions 2020-07-24 13:57:51 +02:00
Matt Bierner 8c426f9f3b Update built TS web version 2020-07-22 17:56:43 -07:00
Andrew Branch 2cf34eefdd
[typescript-language-features] Add telemetry for package.json auto imports (#103126)
* Add telemetry for package.json auto imports

* Change data classification

* Use string, boolean is not allowed in TelemetryProperties
2020-07-22 15:59:51 -07:00
Andrew Branch 1c8662b8bf
Add setting for package.json auto imports (#103037) 2020-07-22 15:28:22 -07:00
Matt Bierner 3f1206a355 Fix isWeb platform check
The new check should be safer
2020-07-22 14:52:38 -07:00
Matt Bierner 5b9fd525fa Minimize shipped tsserver
This takes the shipped size from 9Mb to 2.9mb
2020-07-22 14:52:38 -07:00
Matt Bierner ba6576d343 Move project status into host 2020-07-22 14:02:38 -07:00
Matt Bierner 8d6b507dfb Fix build error
watch didn't pick up on the file rename
2020-07-22 12:12:21 -07:00
Matt Bierner f9224c26cb Move command manager into commands folder 2020-07-22 11:31:08 -07:00
Matt Bierner 3b15049759 Rename files to mark them as browser or electron 2020-07-22 11:31:08 -07:00
Matt Bierner c6ce8f26cc Move fork impl into serverProcess 2020-07-22 11:31:08 -07:00
Matt Bierner 2f10b23958 Move buffer sync support into server folder 2020-07-22 11:31:08 -07:00
Matt Bierner 0a7364f005 Use object parameter for services 2020-07-21 18:56:27 -07:00
Matt Bierner feadf5183d Move code lens files into own directory 2020-07-21 17:19:47 -07:00
Matt Bierner 5dfb77c313 Move task provider into own folder 2020-07-21 17:15:20 -07:00
Matt Bierner a4b0116978 Rename features -> langaugeFeatures 2020-07-21 17:12:19 -07:00
Matt Bierner 6649f4e296 Clean up extension activation 2020-07-21 17:06:24 -07:00
Matt Bierner 0bf4493b75 Don't send git resources to tsserver 2020-07-21 16:52:17 -07:00
Matt Bierner 21cd7c6001 Move some files into server 2020-07-21 16:47:54 -07:00
Matt Bierner ae7254a2e9 Fixing some errors when loading workspace TS versions 2020-07-21 16:41:02 -07:00
Matt Bierner 23c4467ed3
Enable web TS Server (#102990)
This enables running the TS Server on web. This currently requires a special version of the TypeScript server
2020-07-21 16:13:52 -07:00
Matt Bierner ec8606cb49 Make sure main process webview file resource loads stays on main process
We were checking the wrong uri
2020-07-21 14:02:28 -07:00
Matt Bierner caa05dd6d5 Remove extra gating around selector
A registration should only need to if it targets all files, or just those on disk
2020-07-20 16:53:32 -07:00
Matt Bierner 3841f78377 Fix normalization of toResource for untitled resources 2020-07-20 16:36:58 -07:00
Matt Bierner e41c195051 Work towards allowing enhanced syntax server commands to be run against any file
We currently restrict the TS server to working with a small set of file schemes. This is done because the TS server itself cannot read files from on of VS Code's virtual file system providers (and will crash if it tries to do so)

However we can enable single file commands for these other file schemes, so long as they are treated as in-memory files. This change works towards supporting that by changing when certain providers are enabled/disabled
2020-07-20 16:27:37 -07:00
Matt Bierner 8bf2ae16a0 Export RequestCancellerFactory implementations as constants 2020-07-20 16:27:37 -07:00
Matt Bierner 538ff07c71 Move logDirectoryProvide into server 2020-07-20 16:27:37 -07:00
Matt Bierner 90fbd0eb60 Extract cancellation.electron
This makes it possible to replace the cancellation logic for serverless
2020-07-20 16:27:37 -07:00
Matt Bierner 3b9db3df27 Extract NodeLogDirectoryProvider to electron specific file 2020-07-20 16:27:37 -07:00
Matt Bierner 00bd63c32c Move lazyClientHost to own file 2020-07-20 16:27:37 -07:00
Matt Bierner c17905888c Extract onIsCaseInsenitiveFileSystem 2020-07-20 16:27:37 -07:00
Matt Bierner 00a0a77785 Cleaning up ts server logic
Getting ready to have worker based TS servers instead of ones that use a process

- Use standard error handler instead of having separate reader error
- Move all process based server logic into own file (`serverProcess`)
2020-07-16 16:05:20 -07:00
Matt Bierner ed028cfd96 Add ClientCapabilities class 2020-07-16 14:37:58 -07:00
Matt Bierner 0857489caf Add the concept of client capabilities for TypeScript
For serverless, we will only be able to run the TypeScript syntax server which does not support all features. This change makes this possible by adding the concept of client capabilities. Providers such as rename will only be registered when the client has semantic capabilities
2020-07-16 12:32:27 -07:00
Matt Bierner 16c6b81b3e Flatten conditional registration
This allows us to pass a precomputed, flat list of requirements when registering a language feature
2020-07-16 12:32:27 -07:00
Matt Bierner a1967ddf13 Remove eslint disable
For #101978
2020-07-09 09:25:47 -07:00
Matt Bierner 76471bdb74 Add slight delay to test
For #101922

I can't repo this locally but suspect it may be timing related
2020-07-08 11:43:48 -07:00
Matt Bierner dee0511b58 Remove duplicated test 2020-07-08 11:43:48 -07:00
Matt Bierner 46c2494cb0
Enable ts tests on ./test-integration.sh (#101826)
* Enable ts tests on ./test-integration.sh

* Fix join lines for windows

* Fixing more tests for windows

Make sure we use the correct new line character

* Update test-ingration scripts
2020-07-07 17:38:03 -07:00
Matt Bierner bc462053d6 Making TS tests more reliable 2020-07-06 16:52:35 -07:00
Matt Bierner 4f9ebc3205 Sort implement abstract above remove unused
Fixes #101486
2020-07-06 15:41:10 -07:00
Matt Bierner 2ce03eed5a Update VS Code refactoring support for new TS 4.0 api
Adopts changes from https://github.com/microsoft/TypeScript/pull/37871/
2020-07-02 16:41:34 -07:00
Armando Aguirre 2ddb2c5a72
Added word boundary on tsserver regex (#101598)
Adds a word boundary on the tsserver regex so that it doens't get confused by other file names.
2020-07-02 13:18:57 -07:00
Matt Bierner c5b91342d6 Remove extra dispose implementations 2020-06-29 14:40:15 -07:00
Matt Bierner 04c36be045 Prompt user to upload TS Server log 2020-06-26 16:41:38 -07:00
Matt Bierner 90de01176e Always enable dynamic syntax server on TS 4.0+
We are looking for feedback on this new setting. For those on TS 4.0+, it should also be a sensible default
2020-06-26 16:18:48 -07:00
Matt Bierner 9d59cb9813 Reduce duplicate code
Merge the `SyntaxRoutingTsServer` and `ProjectLoadingRoutingSyntaxTsServer` classes since these only differ routing to the syntax server while a project is loading
2020-06-26 16:18:48 -07:00
Martin Aeschlimann 6eeb350744 update typescript-vscode-sh-plugin (fix version check) 2020-06-26 15:26:15 +02:00
Martin Aeschlimann 4952232a7b
Merge pull request #101046 from madskristensen/patch-2
Fix SchemaStore.org URLs
2020-06-26 08:46:20 +02:00
Matt Bierner 32e6693f00 Fix race on 'projectInfo' requests
Fixes #101076

Make sure we fully start the TS Server (including uploading files) before sending the 'projectInfo' request for the status bar item
2020-06-25 16:44:25 -07:00
Matt Bierner 48c6e3979d
Add experimental support for using iframes for webviews (#100991)
* Use non-deprecated API version

* Prototype: enable offline iframe based webviews on desktop

Adds a new `vscode-webview` protocol  for loading the wrapper contents of a webview

Still needs cleaning up

* fix loading of electron webview

* Cleanup and add `webview.experimental.useIframes` setting

Co-authored-by: deepak1556 <hop2deep@gmail.com>
2020-06-25 14:52:02 -07:00
Mads Kristensen 860ca64f07
Fix SchemaStore.org URLs
SchemaStore.org now support HTTPS directly instead of relying on the backdoor through *.azurewebsites.net
2020-06-25 10:13:47 -07:00
Matt Bierner adb27e5fd0 enable/disable deprecated diagnostics in core instead of requiring each diagnostic provider do so 2020-06-22 15:21:15 -07:00
Wenlu Wang 9d6054c99d
Add ts/js deprecated support (#97742)
* Add ts/js deprecated support

* Support callhierarchy

* avoid tags

* fix lint

* fix lint

* Avoid changes

* Avoid assign

* Avoid changes

* Avoid styles

* Add temp deps for build

* update version

* add config item

* fix type

* Use expiremental namepsace

* fix types
2020-06-22 14:01:37 -07:00
Rhitik Bhatt 4dfc14b846
Fixes buggy onEnter behavior when used with generator method (#100076)
* Adds regex to ignore already closed comment block

* Adds test case for generator method onEnter buggy behavior
2020-06-15 11:57:40 -07:00
Matt Bierner 7e4cc2c435 Only run specific commands on the syntax server
This works better than running all commands on the syntax server by default
2020-06-11 20:05:33 -07:00
Matt Bierner 102311f877 Always send projectInfo to semantic server 2020-06-08 17:14:22 -07:00
Matt Bierner 480c98f1ab Add ProjectLoadingRoutingSyntaxTsServer
For #99643

Add a new server option for TypeScript that routes request based on if a project is loading or not

The is enabled by the undocumented `"typescript.tsserver.useSeparateSyntaxServer": "dynamic"` setting
2020-06-08 16:46:55 -07:00
Matt Bierner 0184d2f90d Extract EventName to enum 2020-06-08 16:46:55 -07:00
Matt Bierner 233eac4110 Simplify getFixAllActions 2020-06-04 15:18:51 -07:00
Matt Bierner 05d6fb6634 Support new TS proposed API for refactorings
For https://github.com/microsoft/TypeScript/pull/38378/files#diff-121b46a8c0f71b73817f429b57e27e61R553
2020-06-01 14:18:41 -07:00
matt penrice 3cb12a21b5
Create VsCodeResource for schemed filepaths (#94986) 2020-05-29 12:00:22 -07:00
Matt Bierner dfde221caa Fix the remove unused source action not removing single unused interfaces 2020-05-29 11:05:38 -07:00
Matt Bierner 5f8e6d0b19 Make sure add all missing imports quick fix comes after individual add missing import quick fixes
Fixes #98613
2020-05-29 11:05:38 -07:00
Andrew Branch 766e520783
Allow TS Server to be started with --inspect-brk (#98340) 2020-05-26 11:57:02 -07:00
Matt Bierner c3b1725a2d Make sure implement interface is prioritized over remove unused
Fixes #94212
2020-05-20 15:34:02 -07:00
Matt Bierner 85a336c885 Only return single ts-ignore action if there are multiple errors on one line
Fixes #97867
2020-05-20 15:17:22 -07:00
Matt Bierner d9f0f110f9 Don't compile testworkspace 2020-05-15 13:08:22 -07:00
Matt Bierner 9efb82eda9 Fix kind of SourceAddMissingImports 2020-05-15 10:39:43 -07:00
Matt Bierner 39fb3b1065 Mark add missing imports as preferred fixes
Allow auto fixing add missing imports if:

- There is only one possible import
- And there are no better fixes (such as spelling changes)
2020-05-15 10:39:43 -07:00
Matt Bierner 541b9eb7a6 Don't mark fix all actions as preferred
Fixes #97866
2020-05-15 10:39:43 -07:00
Matt Bierner f3454d430b Better clean for 452a377c5e 2020-05-14 12:13:31 -07:00
Benjamin Pasero 45aa0bf525 fix compile error
fyi @mjbvz
2020-05-14 09:58:21 +02:00
Matt Bierner 452a377c5e Still search all projects if you are using TS 3.9 but are not in a TS file 2020-05-13 19:42:18 -07:00
Matt Bierner b312fa2d33 Add initial source actions for remove unused and add missing imports
Fixes #95831
2020-05-12 13:16:08 -07:00
Matt Bierner 6efd86a30c Cleaning up fix all for JS/TS 2020-05-12 13:16:08 -07:00
Matt Bierner c6db83b483 Extract error codes to constant file 2020-05-11 17:33:28 -07:00
Matt Bierner 2393521d37 Use equals helper 2020-05-11 17:33:28 -07:00
Rahul Kadyan 47c54f0e32
feat: use configNamespace for registering language providers of other extensions (#95621)
fixes #75890
2020-05-11 15:22:42 -07:00
Matt Bierner e4e1099f8c Configure optional chain completions at the file level instead of per-request
Fixes #97398
2020-05-11 14:52:20 -07:00
Matt Bierner b1e9155139
Use generic for providers with resolve methods (#96955)
* Use generic for providers with resolve

Fixes #95852

Some of our providers have two phases: provide and resolve. This change updates the typings to make it clearer that the values returned by provider are passed into resolve.

* Remove duplicate vscode.d.ts in search-result extension

* Also use generic type in result of resolve
2020-05-11 13:06:03 -07:00
Matt Bierner 986a9c8bc9 Don't save files on JS/TS server start
Fixes #96503

This workaround no longer seems needed
2020-05-04 17:36:34 -07:00
Matt Bierner 996b5be2ed Update built-in JS/TS version to 3.9 2020-05-04 16:34:31 -07:00
Andrew Casey 13d3a9358b
Update npm script compile-extension:typescript-language-features (#96320) 2020-04-27 18:38:08 -07:00
Andrew Casey 3ecefe6d7a
Make char position optional in TS stack (#96321) 2020-04-27 18:37:50 -07:00
kieferrm 3aa931c67d fix GDPR annotation 2020-04-28 00:49:18 +00:00
Matt Bierner 686ad17217 Clean up onTypesInstallerInitializationFailed
- Convert to async
- don't require using inline type with id
2020-04-27 16:42:45 -07:00
Andrew Casey 27e2e92a54
Clean up CallstackOrException telemetry in typescript-language-features (#96108)
One was actually SystemMetaData, all others were either dropped or
replaced with sanitized versions classifiable as SystemMetaData.
2020-04-27 12:13:00 -07:00
Matt Bierner a4597e1905 Enable JS/TS workspace symbol search for all projects
Fixes #11026

Adds a new `typescript.workspaceSymbols.scope` setting that enables searching all known projects when using TS 3.9+
2020-04-24 00:42:55 -07:00
Matt Bierner 0d5ed6bfde Add logging of service state
For #95122
2020-04-22 14:01:30 -07:00
Duncan Walter c7c2301bc2
TS: Add setting to prompt users about workspace tsdk (#95566)
* add a setting to prompt users to switch to tsdk version

* version manager in control

Co-authored-by: Duncan Walter <dwalter@hubspot.com>
2020-04-22 10:57:22 -07:00
Johannes Rieken d1dfa5e91b iterate over suggestions only once, #95324 2020-04-17 09:06:34 +02:00
Matt Bierner c189b2bb05 Remove use of memoize
Fixes #95324
2020-04-16 10:17:01 -07:00
Matt Bierner b89738c83b Scope prepareRename to TS 3.1+
Fixes #95399
2020-04-16 10:17:01 -07:00
Matt Bierner 1c542d50be More improvements to TS completion computation
For #95324

- Get word range before we make the TS request
- Reuse the context
2020-04-15 14:14:20 -07:00
Matt Bierner 564c619d73 💄 2020-04-15 14:14:20 -07:00
Matt Bierner a51f8c4626 Fix missing property description string 2020-04-15 12:46:40 -07:00
Matt Bierner 605d2cfadb 💄 2020-04-15 12:46:40 -07:00
Matt Bierner 948aa4a214 Make TS completion item more efficent to compute
For #95324

- Removes repeated calls to `getWordRangeAtPosition`
- Only use our fuzzy string logic when using TS 3.8 or older
2020-04-15 10:02:47 -07:00
Josh Smith 3f9e68436b
Issue #93589: Rename 'renameShorthandProperties' setting to 'useAliasesForRenames' (#94480)
* Issue #93589: Rename 'renameShorthandProperties' setting to 'useAliasesForRenames'

* Issue 93589: Added deprecation message to 'renameShorthandProperties' preference

* Issue 93589: Old and new setting value added for mitigtion

Co-authored-by: joshuahs <joshuahs@umich.edu>
2020-04-14 14:53:19 -07:00
Matt Bierner b6c2ea092d Add experimental trigger reason to ts server protocol
For https://github.com/microsoft/TypeScript/issues/35096
2020-04-14 13:55:08 -07:00
Matt Bierner a8f8a2dca0 Only re-request diagnostics if the file has actually been opened
Fixes #95027

Hovers cause VS Code to quickly open and the close the target file. We never actually sync the file with the TypeScript server when this happens. However on file close, we always re-request diagnostics for the project.

This fix makes it so that we only re-request diagnostics if the file has actually been opened on the TSServer
2020-04-11 17:30:12 -07:00
Matt Bierner f3ceb33c5c Hook up experimental TS refactor error
For https://github.com/microsoft/TypeScript/pull/37871
2020-04-10 17:07:09 -07:00
Matt Bierner 8b46fd0645 Try preserving selected signature better in js/ts
Fixes #94834
2020-04-09 15:06:46 -07:00
Martin Aeschlimann ef715cf8c5 TypeScript semantic tokens: use range provider 2020-04-09 18:25:20 +02:00
Martin Aeschlimann 8ef9a03b52 typescript: update typescript-vscode-sh-plugin 2020-04-09 17:24:48 +02:00
Matt Bierner 7ae7343973 Fix some strict null errors revealed by change to emitter 2020-04-08 18:06:24 -07:00
Matt Bierner 32929fbbb8 Always prefer the extract constant refactoring with the lowest scope
Fixes #94717

Previously we hardcoded a check to scope_0
2020-04-08 13:48:03 -07:00
Matt Bierner 74b4540bd1 Prioritize implement interface over remove unused in JS/ts
Fixes #94212

If both `implement interface` and `remove unused` are possible, only mark `implement interface` as prefered.

Also changes our core code action sorting logic to prioritize autofixes
2020-04-08 13:05:44 -07:00
Git-Lior ce57f8ad58
bugfix - typescript code completion doesn't recognize property modifiers when more than one exists (#94165)
* fix microsoft/TypeScript#37117 - code completion in typescript fails to recognize property modifiers

* split kindModifiers by comma or spaces
2020-04-07 13:22:28 -07:00
Martin Aeschlimann 72df4fc229 update typescript-vscode-sh-plugin 2020-04-07 09:46:21 +02:00
Martin Aeschlimann 677b3cfa4b Disable semantic highlighting in large JS/TS files. Fixes #94321 2020-04-03 14:53:07 +02:00
Alex Dima 65309e1d7c
Have SemanticTokensBuilder.build() return SemanticTokens (for #93614) 2020-03-30 15:52:25 +02:00
Matt Bierner 6bdf50706f Enable resolveJsonModule for implicit JS/TS projects
For #93500
2020-03-27 15:11:12 -07:00
Martin Aeschlimann f04dce33a1 Throttle the number of semantic token requests #92583 2020-03-27 16:46:15 +01:00
Martin Aeschlimann 40077f5ea9 [typescript][semantic] add library modifier. Fixes #91090 2020-03-27 14:35:22 +01:00
Martin Aeschlimann c65ea4300d update typescript-vscode-sh-plugin 2020-03-13 00:42:20 +01:00
Matt Bierner 8c596fbf90 Mark arrays readonly 2020-03-10 16:38:34 -07:00
Matt Bierner 9d25faad7f Show better symbolKinds for workspace symbols 2020-03-10 16:38:34 -07:00
Matt Bierner 89fe6d2bfe Fix bad filter
Fixes #92338
2020-03-10 12:31:37 -07:00
Matt Bierner f20250c965 Move version check into provideCompletionItems
Handle TS version changes
2020-03-09 14:45:43 -07:00
Josh Goldberg 72c700cf54
Added completion entry for @ts-expect-error directive (#92093)
* Added completion entry for @ts-expect-error directive

* Limited to relevant TS versions

* You know what, it's more complicated, I'll just go with everything vs 3.9
2020-03-09 12:56:23 -07:00
Pine Wu 2362584a62 Revert "Fix #73803"
This reverts commit 67e6aef0c8.
2020-03-06 00:30:14 -08:00
Pine Wu 4857a9a746 Revert "Fix integration test"
This reverts commit 5a0ab960f0.
2020-03-06 00:29:57 -08:00
Matt Bierner be9c791caa Extract toSymbolInformation 2020-03-05 13:30:52 -08:00
Matt Bierner f062556992 Limit number of pulled in workspace symbols
Fixes #11432
2020-03-05 13:30:52 -08:00
Matt Bierner 9cc4da7503 💄 2020-03-05 12:52:18 -08:00
Pine Wu 5a0ab960f0 Fix integration test 2020-03-05 12:41:06 -08:00
Matt Bierner eca0690ba0
Allow issue reporter to work on built-in extensions (#92040)
Fixes #91029
2020-03-05 12:15:23 -08:00