Commit graph

935 commits

Author SHA1 Message Date
Matt Bierner 027da88563 Use constant 2020-02-26 16:03:10 -08:00
Matt Bierner a10e4cb911 Make sure we set the correct replacement range for dot member completions
Fixes #91105
2020-02-24 15:53:13 -08:00
Matt Bierner 3c030d7014 Add extra guard on restarting TS server on fatal crash 2020-02-24 15:12:57 -08:00
Matt Bierner 6ff3d9c899 Auto restart TS Server on watch options change 2020-02-24 15:12:57 -08:00
Martin Aeschlimann b2e0925ba1 update jsonc-parser 2020-02-21 15:03:33 +01:00
Matt Bierner 9c0899f286 Pick up TS 3.8.2 2020-02-20 21:38:14 -08:00
Matt Bierner d17a017c0b Fix formatting and version for TS Server issue report 2020-02-20 21:34:20 -08:00
Matt Bierner 0b3aa0a6ea
Let extensions prepopulate the issue reporter title and description (#91039)
* Let extensions prepopulate the issue reporter title and description

Fixes #91028

Adds two new optional arguments to the `vscode.openIssueReporter` command: `issueTitle` and `issueBody`. These are taken using an options object and are used to pre-populate the native issue reporter fields

Hooks up these fields for TypeScript's report issue prompt. We use this to post the most recent TS Server error stack

* Extract duplicate command id to constant

* Log version directly instead of prompting users for it
2020-02-20 10:31:09 -08:00
Martin Aeschlimann 12770d4fed update typescript semantic highlighting 2020-02-20 15:35:50 +01:00
Martin Aeschlimann 66f525f435 [ts] enumMember missing in token legend 2020-02-20 10:31:14 +01:00
Matt Bierner 2aced89ae1 Show more clear TS Version picker when reinstalling a different TS version locally
- Make sure that `TypeScriptVersion` is immutable by getting and caching `apiVersion` on init
- Only show dot next to currently active version if both path and api versions match
2020-02-18 19:16:56 -08:00
Matt Bierner 8503705b11 Don't show reference code lens for both class and ctor in es5 classes
Fixes #90396
2020-02-14 16:57:47 -08:00
Matt Bierner ea0880611f Use non-deprecated version of registerTasksProvider
For #88391
2020-02-12 17:20:05 -08:00
Matt Bierner 43e268ad72 💄 2020-02-12 15:48:38 -08:00
Matt Bierner fb622a8b83 Move code action documentation contribution point to come from metadata
For #86788
2020-02-11 11:36:23 -08:00
Matt Bierner efb781e5be Marking that documents/workspaces arrays cannot be mutated 2020-02-11 11:36:23 -08:00
Martin Aeschlimann 985840db96 update typescript-language-features 2020-02-10 03:27:46 +01:00
Martin Aeschlimann 12509673e9 update typescript-vscode-sh-plugin 2020-02-10 02:25:47 +01:00
Matt Bierner 718331d6f3 Allow configuring TS Server watch options through VS Code
Fixes #89381

Given that these are advanced options, we require editing them in the json file instead of using our settings UI
2020-02-07 18:14:38 -08:00
Matt Bierner 4d35421462 Remove version gating on for now enableProjectDiagnostics
None of the apis being users for this experimental setting require the latest TS version
2020-02-06 16:33:05 -08:00
Matt Bierner f0942786b4 Add experimental setting to use separate server to compute project level diagnostics
For #13953

**Problem**
We'd like to show project wide diagnostics, however at the moment TS server is single threaded. This means that computing all these diagnostics would interrupt other user operations such as completions.

Right now, our advice is to use tasks to get around this limitation (since tasks always run as separate process) however few people actually use tasks.

**Change**
This change adds an experimental `tsserver.experimental.enableProjectDiagnostics` setting (default false) that makes VS Code spawn a separate TS Server that is only used for computing diagnostics. This should help keep the primary syntax server responsive while letting the diagnostics server churn away at project level diagnostics

**Why experimental?**

- We are comporting too many diagnostics. This is bad for larger projects. I don't think TS provides the right APIs to know which files we actually need to request diagnostics on when a file changes.

- This hasn't been fully extensively tested to make sure it plays nicely with feature such as automatic type acquisition or in complex workspace with multiple projects
2020-02-06 15:15:33 -08:00
Matt Bierner aca46ac4a5 Take server arguments object
Makes it more difficult to mistaktenly reverse which server is which
2020-02-06 15:15:33 -08:00
Matt Bierner c8516dd7e8 Marking arrays as readonly 2020-02-06 15:15:33 -08:00
Matt Bierner 5d3c86ad99 Remove VS Code project file change watchers
Updating projects should be handled by the `projectsUpdatedInBackground events` now
2020-02-06 15:15:33 -08:00
Matt Bierner ae758e681d Fix spelling in test name 2020-02-05 18:12:26 -08:00
Matt Bierner 5347c21ecf Treat any non-whitespace character as jsdoc param names
Fixes #90108
2020-02-05 15:26:13 -08:00
Matt Bierner 87b6d03182 Add cursor position check to jsDocCompletionTest 2020-02-04 18:02:38 -08:00
Matt Bierner 2b7e6ab2fd 💄 2020-02-04 18:00:03 -08:00
Matt Bierner e7451b12ce Adding assertEditorContents helper function and fixing jsdoc completion tests 2020-02-04 17:52:11 -08:00
Matt Bierner a32cb805a2 Adding some basic tests for auto insert of await on completions 2020-02-04 17:34:12 -08:00
Matt Bierner 58fe34bb77 Don't require strict prefix matches for private field completions
Fixxes #89556
2020-02-04 17:17:00 -08:00
Matt Bierner b4a835f5b9 Fixing backet completion items not shown for cases such as this.xy| 2020-02-04 16:15:58 -08:00
Matt Bierner 7b754d7d95 Adding more pinning tests for JS/TS completions 2020-02-04 16:15:58 -08:00
Matt Bierner 9887559f17 Add basic JS/TS replace/insert completions
For #87091

Adds basic support for insert/replace mode for JS/TS completions. We're blocked on full support by https://github.com/microsoft/TypeScript/issues/35602. I'll be adding some skipped tests that document current limitations
2020-02-04 16:15:58 -08:00
Matt Bierner 78465390bd Run many of the JS/TS completion tests in both insert and replace completion mode 2020-02-04 16:15:58 -08:00
Matt Bierner 6205cf0fed Add basic insert mode tests 2020-02-04 16:15:58 -08:00
Matt Bierner 6960e8c07b Fixing TS completion tests
The current method of verifying when suggestions have been shown is not reliable so switch to use a delay instead :(
2020-02-04 16:15:58 -08:00
Matt Bierner 5b284c140c Build TS extension against current vscode.d.ts directly
Currently  extensions like TS have a dev dependency on the `"vscode"` package. This pulls in a copy of `vscode.d.ts` that we end up using instead of our local `vscode.d.ts`.

This change uses the `paths` `tsconig` option so that we use our local `vscode.d.ts` instead of the one from `node_modules`
2020-02-04 16:15:58 -08:00
Matt Bierner 45999fdb8f Remove extra cast
Not required with TS 3.8
2020-02-04 16:15:58 -08:00
Matt Bierner 5623c36a40 Remove surveyor code
Not currently being used
2020-02-04 16:15:58 -08:00
Alex Ross 8066726b27 Allow both : an . as time separators in tsc problem pattern
Fixes https://github.com/microsoft/vscode/issues/89273
2020-02-04 15:01:09 +01:00
Matt Bierner 3f5fda1800 Redefine performanceData 2020-02-03 14:31:21 -08:00
Matt Bierner 7c502bbb6a Fix compile error related to new TS version 2020-02-03 14:20:17 -08:00
Matt Bierner 55e72d8d02 Add support for rendering jsdoc inline @link tags
Fixes #28624
2020-02-03 14:00:19 -08:00
Matt Bierner 8fd777f649 Remove extra not null checks 2020-02-03 14:00:19 -08:00
Ron Buckton d837ddc72e
Fix off-by-one typo to improve display of file names in TS call hierarchy (#89822) 2020-01-31 15:35:49 -08:00
Matt Bierner d92dedcd69 Allows for js and ts specific refactoring pages 2020-01-29 18:03:24 -08:00
Alex Dima acf2931955
Fixes #89552: Throw from the provider when semantic tokens cannot be computed and keep old semantic tokens if this happens 2020-01-29 16:22:08 +01:00
Matt Bierner d99bbafe17 Pick up new TS version for building VS Code 2020-01-28 11:00:02 -08:00
Matt Bierner c4b6a6b537 Send # as a completion trigger character to TS 3.8.1+
https://github.com/microsoft/TypeScript/issues/36367 added support for `#` as a TS completion trigger
2020-01-27 19:06:05 -08:00