Matt Bierner
0749b7aca8
Timebox the TSServer request used in the JS/TS task provider
...
Fixes #84278
2019-11-12 21:59:36 -08:00
Matt Bierner
1f3642a07d
Add explicit type on experimental fixAll provider
...
For #84602
2019-11-12 14:28:43 -08:00
Matt Bierner
a170916295
Highlight a few other types in jsdoc comments
...
Fixes #84622
2019-11-12 13:31:09 -08:00
Greg Van Liew
8ae2921645
Nits in settings comments
2019-11-12 10:55:04 -08:00
Johannes Rieken
7e333135dd
often set selection range for TS document symbols, #84576
2019-11-12 11:28:48 +01:00
Matt Bierner
2ec3bc4fd0
Removed undocumented setting usage
2019-11-11 16:12:52 -08:00
Matt Bierner
8904a3cbce
💄
2019-11-11 16:12:52 -08:00
Matt Bierner
6118d2713e
Make sure synchronized buffers are reset when tsserver restarts
2019-11-11 16:12:52 -08:00
Matt Bierner
21fd94b70c
Make sure buffer sync reset clears pending diagnostics
2019-11-08 14:47:06 -08:00
Matt Bierner
7218d47251
Make sure we don't try calling a cached getErr
on a closed resources that are in the getErr queue
2019-11-08 14:47:06 -08:00
kieferrm
59ba1190b4
fix GDPR annotation
2019-11-08 22:36:55 +00:00
Alex Dima
c9a2de2d9c
Improve integration test output on Windows ( #84239 )
2019-11-08 17:21:35 +01:00
Matt Bierner
fdeb9aa9b8
Use 'as const' instead of readonly class object
2019-11-07 20:31:32 -08:00
Matt Bierner
a8ad448cb0
Aggressively cancel code lens requests when the resource changes
...
For #84185
2019-11-07 18:47:39 -08:00
Matt Bierner
d83f121f6d
Fix spelling
2019-11-07 07:57:04 -08:00
Alexandru Dima
c34e736195
Forward SemanticColoring disposals to the ext host
2019-11-07 16:06:46 +01:00
Alexandru Dima
bdbe2e3612
Clear semantic tokens in case of errors/empty results
2019-11-07 15:40:06 +01:00
Alexandru Dima
7761e75deb
API tweak from the standup discussion
2019-11-07 15:26:22 +01:00
Matt Bierner
bea911842a
Fix name and make sure tell VS Code about about specific code actions
2019-11-06 18:21:43 -08:00
Matt Bierner
5b63895862
Docment remaining known js/ts refactorings
2019-11-06 18:13:54 -08:00
Matt Bierner
26c4541c4a
Add coalease helper function
2019-11-06 17:47:43 -08:00
Matt Bierner
692630172a
Documenting more js/ts refactorings
2019-11-06 17:47:43 -08:00
Matt Bierner
42d53cf373
Document extract constant and extract type alias
2019-11-06 16:51:49 -08:00
Matt Bierner
c3983ca63b
Document extract interface for js/ts
...
Also re-organizes the code action kinds fo better encapsulate mapping of TS kinds to VS Code kinds
2019-11-06 16:51:49 -08:00
Matt Bierner
2510769bf9
Updat codeActions contribtions schema based on https://github.com/microsoft/vscode/issues/82718#issuecomment-550468267
...
- Adds a description
- Remove schama
- Moves the language to the top level so we don't need to duplicate so much info for each code action
2019-11-06 16:51:49 -08:00
Matt Bierner
c8d64b13e5
Add code actions contributon point
...
For #82718
Fixes #52846
This adds a newly proposed codeActions contribution point. For details, see #82718
This change also makes the intellisense for the `editor.codeActionsOnSave` property dynamic by using the new contribution point
2019-11-06 10:13:59 -08:00
Alexandru Dima
013433992a
Semantic tokenization
2019-11-05 17:17:28 +01:00
Alexandru Dima
308ff31f95
Merge remote-tracking branch 'origin/master' into alex/semantic-exploration
2019-11-05 09:44:55 +01:00
Andrii Dieiev
a188b905c6
Trigger completions on backticks in JS/TS ( #80234 )
2019-11-04 14:55:07 -08:00
Matt Bierner
c78edd8668
Pick up TS 3.7-rc
2019-11-04 08:49:47 -08:00
Johannes Rieken
073735c5e1
Merge branch 'master' into joh/willRename
2019-11-04 12:10:18 +01:00
Huáng Jùnliàng
c35b9ba236
add babel.config.json
to validation ( #83758 )
2019-11-01 11:23:04 -07:00
Johannes Rieken
5a4e23fb31
update names
2019-11-01 17:03:56 +01:00
Johannes Rieken
36c3e8756c
adjust API proposal to account for N files being created, moved, and deleted
2019-11-01 16:50:56 +01:00
Johannes Rieken
2d71cb4cdf
adopt proposed API changes in TS land
2019-11-01 12:38:46 +01:00
Johannes Rieken
14e2178b7f
fix #83762
2019-10-31 16:02:34 +01:00
Matt Bierner
c80fb1b771
Be more resilient when checking if we have an opened jts/ts buffer
...
Fixes #83338
`TextDocument` lifetime may not match that of the the user facing editors. However the JS/TS extension was assuming that it did. Introduce a `ensureHasBuffer` function that can open a buffer if vscode knows about a textdocument but no `onDidOpenTextDocument` has been fired for it yet
2019-10-29 14:26:20 -07:00
Benjamin Pasero
ca22de4b17
debt - bump node.d.ts dependency in extensions to 12.x (part of #82514 )
2019-10-28 08:11:47 +01:00
Matt Bierner
ba4a504ffe
Use a case-insensitive map for store pending buffer operations
...
Fixes #82634
2019-10-24 18:12:21 -07:00
Matt Bierner
951f891b23
Extend disposable
2019-10-24 16:58:12 -07:00
Matt Bierner
73fbb9da18
Use proper map
2019-10-24 16:58:12 -07:00
Matt Bierner
b66a2571fd
Use Disposable
2019-10-24 16:58:12 -07:00
Matt Bierner
73b3fc4348
Support performing a js/ts workspace symbol search when focused on the left side of a git view
...
Fixes #75107
2019-10-24 14:55:54 -07:00
Matt Bierner
c4868f4cc8
Use includes
2019-10-24 14:55:54 -07:00
Matt Bierner
520fafc07b
Use includes
2019-10-24 14:55:54 -07:00
Matt Bierner
8c0e291789
Make message for update imports better match vscode's message
...
For #76268
2019-10-23 18:04:22 -07:00
Matt Bierner
639ccb016f
Batch renames for js/ts
...
Fixes #76268
2019-10-23 17:57:41 -07:00
Matt Bierner
e4478d363d
Batch renames
2019-10-23 17:57:41 -07:00
Matt Bierner
6290c3ff0b
Use file name to determine if we are in a ts file or not
...
Using a textdocument to know if we are in a typescript vs a javascript document is ideal but comes at a performance cost. In most cases we can use the file name safely
2019-10-23 17:57:40 -07:00
Matt Bierner
645a178353
Use destructured paramters
2019-10-23 17:57:40 -07:00
Matt Bierner
01f429e8c9
Don't show progress indicator when we know for sure we are not doing a js/ts rename
2019-10-23 17:57:40 -07:00
Matt Bierner
46d2224d8b
Remove gating for TS versions < 2.4
...
Telemetry shows that these old TS versions have very low usage (in the tens across the many, many js/ts users). Given this, it now makes sense to remove the extra gating/checks required to support these old versions
2019-10-23 17:57:40 -07:00
Matt Bierner
0d0a574164
Normalizing names
2019-10-23 17:57:40 -07:00
Matt Bierner
45cd966a16
Use VS Code's fs instead of node
2019-10-23 17:57:40 -07:00
Matt Bierner
611fd60cd4
Make sure we update js/ts diagnostics when the visible editors change
...
Changes in one document may cause errors in other, not yet visible docs. Make sure we update the diagnostics when another file becomes visible to handle that case
2019-10-23 17:57:40 -07:00
Matt Bierner
587061a8fc
?. operator
2019-10-22 14:57:25 -07:00
Matt Bierner
07f1939ba2
Log where the typescript version is coming from
2019-10-22 11:25:14 -07:00
Matt Bierner
802d09f5f2
Use double quotes for user facing strings
2019-10-22 11:25:14 -07:00
Matt Bierner
de0cd31fa5
Rename versionString to displayName to make it clearer how this version is used
2019-10-22 11:25:14 -07:00
Matt Bierner
96a5151f7a
Workaround for TS not being able to handle interactive playground resource with query parameters in uri
...
Fixes #81059
Fixes #82419
The interactive playground generates uris that have query paramters. This causes the TS Server to crash. The workaround here is make sure the file paths we give to TS Server don't have query paramters but the ones we work with locally do
2019-10-21 18:26:40 -07:00
Matt Bierner
ed53e86205
Make sure the syntax and semantic servers don't get out of sync
...
If one server fails for a command but the other does not, we are in an inconsistent state. Treat this as a fatal error
2019-10-21 18:26:40 -07:00
Matt Bierner
ab4e86df8d
Fix time range for restart detection
2019-10-21 18:26:40 -07:00
Matt Bierner
82ca6ba87f
document that suggest.names
doesn't work with checkjs
...
Fixes #81895
2019-10-19 16:19:35 -07:00
Matt Bierner
bd200eafd1
Add configuration for includeAutomaticOptionalChainCompletions
...
For https://github.com/microsoft/TypeScript/pull/34552
2019-10-18 22:00:11 -07:00
Matt Bierner
693ffb4d57
Default maxTsServerMemory to 3GB
2019-10-18 16:14:48 -07:00
Matt Bierner
2a46387970
Use test instead of match
2019-10-18 16:14:48 -07:00
Matt Bierner
035963b1f1
Add basic pinning test for jsdoc completions
...
For #82874
2019-10-18 16:14:48 -07:00
Matt Bierner
5aec74ad3b
Treat errors on updateOpen
as non-recoverable
...
Any errors on `updateOpen` will cause the TS Server to become out of sync. This change alerts us to errors that happen in `updateOpen`. We then restart the ts server
2019-10-17 21:52:02 -07:00
Michael Loughry
89e4d3eddc
Add setting to configure the max memory for tsserver ( #82630 )
...
* Add setting to configure the max memory for tsserver
* Fix silly tpo from fixing formatting
* Add "MB" to setting description string
* Add validation to configuration value
* Add 128MB as a lower bound
2019-10-15 13:45:11 -07:00
Matt Bierner
a967c8ada3
Move js/ts json validation to js/ts language features extension
...
Fixes #73336
2019-10-04 15:31:21 -07:00
Alexandru Dima
45a92a4937
wip
2019-09-30 15:19:07 +02:00
Alexandru Dima
110b5acf0d
wip
2019-09-27 17:15:28 +02:00
Matt Bierner
e5efdb4b4b
Expand documentation for typescript.tsdk
...
Fixes #42243
2019-09-26 17:29:13 -07:00
Ron Buckton
340f7beef9
Fix to allow for optional chain token in completions ( #81402 )
2019-09-25 11:13:58 -07:00
Alexandru Dima
7e4991aa33
WIP
2019-09-25 17:49:27 +02:00
Rob Lourens
099485461d
Merge pull request #80801 from orta/capital_S
...
Fixes some capital S typoes with JS/TS
2019-09-15 14:55:34 -07:00
Andrew Branch
8774e0bb05
[typescript-language-features] Add formatter option for semicolons ( #80828 )
...
* Add formatter option for semicolons
* Add compatibility note
* Make it compile without TS 3.7
2019-09-13 13:40:41 -07:00
Matt Bierner
67e37803b7
Add telemtry property for local TS version
...
We are interested in understanding which TS versions user have enabled in their workspaces, and how widely these diverge from these the workspace version
2019-09-12 17:27:28 -07:00
Orta Therox
a89b72bf63
Fix hardcoded lower case S issues for JS/TS only for presentation-ish strinngs
2019-09-12 09:58:03 -04:00
Matt Bierner
22db92f71b
Add telemetry event when TS server is spawned
...
This is needed to help us better understand which TS versions users have enabled in their workspaces
2019-09-11 18:03:14 -07:00
Matt Bierner
f4524551e9
Remove gating for TS < 2.2.0 features
...
Based on telemetry, these versions have pretty much zero usage in the past 30 days. Removing the extra gating code since we can now assume users are on TS > 2.2.
2019-09-11 15:50:50 -07:00
Matt Bierner
7a00ddf9f8
Format files for 3.6
...
Fixes #80118
2019-09-02 21:29:05 -06:00
Matt Bierner
8891b85518
Fix caption parsing
...
For #79704
- Use regexp
- Handle unix line endings
- Don't highlight caption as part of code block
2019-08-27 14:49:19 -07:00
Andrew Liu
86723e74b6
fix for 79704 - support for @example <caption>
2019-08-26 17:19:36 -07:00
Matt Bierner
91e99652cd
Fix js/ts refactorings
2019-08-26 14:51:26 -07:00
Matt Bierner
e3b9b8eefc
Re-check opened files while executing refactoring
...
Fixes #79650
2019-08-23 23:06:01 -05:00
Matt Bierner
908ea77860
Revert "Use per-resource settings for js/ts validate.enable"
...
This reverts commit 8b61c15d3d
.
2019-08-21 17:20:03 -07:00
Matt Bierner
8b61c15d3d
Use per-resource settings for js/ts validate.enable
...
For #78549 but requires more work
2019-08-21 16:23:23 -07:00
Martin Aeschlimann
379623e369
update yarn.lock files
2019-08-21 18:04:55 +02:00
Martin Aeschlimann
be8f289fa9
update jsonc-parser
2019-08-21 16:55:59 +02:00
Matt Bierner
1429e8182f
Enable "restart ts server" command in js/tsconfig files
...
Fixes #79530
2019-08-20 11:22:24 -07:00
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
Matt Bierner
69a7b7ef24
Extract areLanguageDiagnosticSettingsEqual
2019-06-07 11:22:06 -07:00
Matt Bierner
a87c73527e
Remove extra work in DiagnosticSettings ctor
...
The langauges map is written so that it is lazy. We do not need to pre-populate it
2019-06-07 11:21:22 -07:00
Matt Bierner
5b01e094c2
Use includes instead of indexOf
2019-06-07 11:12:54 -07:00
Matt Bierner
809386b670
Working on getting ts server class in a testable state
2019-06-05 15:41:45 -07:00
Benjamin Pasero
d78a75973c
update @types/node ( #74881 )
2019-06-05 10:20:01 +02:00
Matt Bierner
76e774e4bd
Add arrays.empty
...
This helps with `a === b` checks in arrays.equals
2019-05-30 17:22:38 -07:00
Matt Bierner
015f1c7909
Use array prototype instead of creating instance
2019-05-30 17:13:10 -07:00
Matt Bierner
a8a0fa763f
Use every for equals
2019-05-30 17:01:10 -07:00
Matt Bierner
55d6317a4f
Don't update js/ts diagnostics if they have not changed
...
Fixes #74633
This was the indirect cause of #74633 . See that issue for an explaination of why it was problematic. In summary, updating diagnostics can retrigger code actions even if the user facing diagnostics have not actually changed
2019-05-30 16:59:32 -07:00