Commit graph

703 commits

Author SHA1 Message Date
Matt Bierner d9aba4fa7f Use const enums 2019-08-15 18:03:55 -07:00
Matt Bierner 35c97ea91d Mark readonly 2019-08-15 18:02:28 -07:00
Matt Bierner 46d0bd8100 Don't include closing ] in folded range
Fixes #79142
2019-08-14 17:05:13 -07:00
Matt Bierner 2c4edeb617 Make sure we compare fully normalized error codes when checking for fix all actions 2019-08-14 17:05:13 -07:00
Matt Bierner c4733f91c8 Still show fix all actions for fix-all actions that can fix multiple errors with multple different diagnostics 2019-08-14 14:49:23 -07:00
TypeScript Tools 41414c2b5f Strip a path list out of an error message
The error, which happens quite frequently, contains an excessively long path list.  The message itself was cleaned up in https://github.com/microsoft/TypeScript/pull/32785 but we add some additional filtering to the editor since older server versions are still in use.
2019-08-12 15:10:29 -07:00
Alex Ross 2bf257c0c5 Implement resolveTask for typescript tasks
Fixes #76521
2019-08-06 09:59:09 +02:00
Alex Ross 8fda22e123 Improve typescript task slash warning
Part of #74995
2019-07-30 12:23:31 +02:00
Matt Bierner 049e4ca16d Mark addMissingAwait as a preferred fix 2019-07-24 23:09:36 -07:00
Matt Bierner cf69f2f1af Refactor code to use single state object instead of two 2019-07-19 18:35:42 -07:00
Matt Bierner feef95c707 Make sure we update pending files properly
The previous logic failed to add anything to the pending files list

For #77665
2019-07-19 18:35:42 -07:00
Alex Ross 8b497a9019 Add slash type message to typescript tasks
Part of #74995
2019-07-11 11:16:30 +02:00
Matt Bierner ae977ba1e0 Make sure we always kill the syntax server when the semantic server exists 2019-07-01 17:30:42 -07:00
Matt Bierner 35f77aab43 Enable useSeparateSyntaxServer by default and remove the experimental section from setting name
Fixes #76420
2019-07-01 15:10:21 -07:00
Alex Ross 01e7c59b1d Force drive letter to lowercase in tsc tasks
Fixes #75084
2019-06-27 12:30:25 +02:00
Matt Bierner cefbf36d1d Add docCommentTemplate to syntax commands 2019-06-26 15:17:17 -07:00
Matt Bierner 9670060267 Make sure we never cancel a request to just one of the ts servers
Fixes #76143
2019-06-25 16:22:13 -07:00
Alex Ross 7f365d2ff2 Fix drive letter casing on typescript tasks
Occurs when opening by double clicking on workspace file. Fixes #75084
2019-06-25 16:36:45 +02:00
Matt Bierner 8c8f79dcef Auto restart when changing typescript.experimental.useSeparateSyntaxServer 2019-06-24 17:07:07 -07:00
Matt Bierner 14bc8002eb Use openExternal 2019-06-24 17:07:07 -07:00
Matt Bierner e32e2a90c5 Make RelativeWorkspacePathResolver a static class 2019-06-24 17:07:07 -07:00
Matt Bierner 85ab838037 Add explicit win32 gheck for using user specific temp folder 2019-06-24 15:19:03 -07:00
Matt Bierner e642a0a5db
Merge pull request #75547 from asztal/patch-1
Handle multiple users with /tmp/vscode-typescript
2019-06-24 12:54:45 -07:00
Matt Bierner 777010a734 Fix file name spelling 2019-06-24 11:54:45 -07:00
Matt Bierner ffecce0476 Better encapsulate logic of spawning different server kinds 2019-06-20 18:25:12 -07:00
Matt Bierner 5fc7a8c5c0 Renames 2019-06-20 18:15:33 -07:00
Matt Bierner fd245fcda0 Fix method name 2019-06-20 18:13:06 -07:00
Matt Bierner 362ca1d638 Also include format in the syntax commands 2019-06-20 18:01:49 -07:00
Matt Bierner ec191a08f4 Make execute command a configuration object 2019-06-20 18:01:49 -07:00
Matt Bierner 1958209daf Include server id in TS server errors 2019-06-20 18:01:49 -07:00
Matt Bierner 87b8402b59 Add experimental dual TS server
Fixes #75866
2019-06-20 17:11:20 -07:00
Matt Bierner 8ec2559029 Move getQueueingType into class 2019-06-20 17:11:20 -07:00
Matt Bierner 45ea4703c2 Renames 2019-06-20 17:11:20 -07:00
Matt Bierner 4a053c9d6d Extract server spanwer to own file 2019-06-20 17:11:20 -07:00
Matt Bierner ccf4a04d5a extract server error to own file 2019-06-20 17:11:20 -07:00
Matt Bierner 7e1f8d4f1d Extract ITypeScript server interface 2019-06-20 17:11:20 -07:00
Matt Bierner 8b93c01655 Re-queue canceled geterr requests before remaining buffers
We should give higher priority to files that have previously had geterr triggered on them but did not have their request completed
2019-06-20 10:27:36 -07:00
Matt Bierner 459939b905 Provide full TS symbol range when previewing definitions in VSCode
Fixes #72017

Has two fixes:

- Hooks up the JS/TS extension to consume the full symbol range provided by https://github.com/microsoft/TypeScript/pull/31587

- Makes the go the definition mouse implementation use the locationLink to compute the preview range. If a`targetSelectionRange` is provided, this means we use the normal `range` to get the preview range
2019-06-17 15:39:56 -07:00
Lee Houghton fa4f870501
Handle multiple users with /tmp/vscode-typescript
This fixes an issue where the typescript language server fails to load if multiple users launch VS Code on the same Linux machine.

Steps to reproduce:
- Log in as user1
- Launch VS Code
- Log out
- Log in as user2
- Launch VS Code
- It tries to write to files in /tmp/vscode-typescript, but that directory is not writeable because it is owned by user1
- You cannot use TypeScript intellisense

This fix namespaces the directory with the current uid so that each user will get their own. 

On Windows, this shouldn't be an issue anyway since each user gets their own temp directory.
2019-06-15 00:36:23 +01:00
Matt Bierner e3294dc7b1 Fix exception if extension is not installed 2019-06-14 16:30:05 -07:00
Matt Bierner c419355b5b
Merge pull request #75375 from microsoft/dev/mjbvz/vscode-api-readonly-events
Mark events as readonly in VS Code api
2019-06-14 11:59:57 -07:00
Benjamin Pasero c6d9e8ea64 status - push proposed API for statusbar id/name and adopt 2019-06-14 11:52:39 +02:00
Andrius 2ac8fbb7d0 notify tsserver about changes in external files. 2019-06-13 19:20:33 +03:00
Matt Bierner b4f6130fe4 Fix some compile errors resutling from readonly change 2019-06-12 16:54:16 -07:00
Matt Bierner a6a376e933
Merge pull request #75092 from microsoft/dev/mjbvz/readonly-diagnostics-api
Use readonly arrays for the vscode.DiagnosticCollection api
2019-06-12 14:46:17 -07:00
Matt Bierner 1f4e2a21fc Add support for loading contributed TS version
Fixes https://github.com/microsoft/vscode/issues/75222
Fixes https://github.com/microsoft/TypeScript/issues/31623
2019-06-10 15:42:35 -07:00
Matt Bierner a1c33c6c12 Don't try creating untitled files in a refactoring
Fixes #75132
2019-06-10 11:11:12 -07:00
Matt Bierner 8448512143 Use readonly arrays for the vscode.DiagnosticCollection api
## Problem
The diagnostic collection object is set up so that it does not mutate the arrays of diagnostics you pass to it. It also does not expect or allow mutation of diagnostics that it returns.

However it it currently typed using normal arrays. This means that if an extension (such as JS/TS) wishes to use readonly diagnostics intnernally, it cannot do so without casting.

## Proposed Fix
Use `ReadonlyArray` in diagnostic collection. This should be a safe change for the `set` type methods. The changes to `get` and `forEach` have the risk of breaking the typing of some extensions, but `get` already returned a frozen array of diagnostic so trying to mutate the array itself would have resulted in runtime error.
2019-06-07 11:41:33 -07:00
Matt Bierner dc2245f164 Use readonlyArray for diagnostics 2019-06-07 11:25:16 -07:00
Matt Bierner dc8e21138f Extend disposable 2019-06-07 11:23:14 -07:00