Commit Graph

1492 Commits

Author SHA1 Message Date
Matt Bierner 8559324b09 Use more optional chaining in TS extension (#152271)
Use optional chaining in TS extension

Also removes `prefer-const` since this is now enabled globally
2022-06-16 05:33:58 +02:00
Matt Bierner a289e64e09 Switch to finalized TS protocol types (#152259) 2022-06-15 15:37:21 -07:00
Matt Bierner 8fb977f2c1 Make jsx: react the default for implicit js/ts projects (#152256)
Make jsx: react the default

Fixes #152150

This fixes imports of `react` getting removed with TS 4.7 in implicit projects
2022-06-15 21:41:52 +00:00
Andrew Branch 5a32c3ff17 [typescript-language-features] Pass through all typescript.unstable.* settings (#151472)
Pass through all `typescript.unstable.*` settings
2022-06-08 11:53:06 -07:00
Matt Bierner e44f4ba886 Add experimental tag to experimental extension settings (#151031)
This makes a few more extension settings with the `experimental` tag so that show up if you search `@tag:experimental`
2022-06-01 16:32:58 -07:00
Matt Bierner 6428d0fc7d Support TS's includeInlayVariableTypeHintsWhenTypeMatchesName setting (#150489)
From https://github.com/microsoft/TypeScript/pull/48529

Let users control is variable type inlay hints are suppresed if the variable name matches the type name, such as:

```ts
const range = new Range();
```
2022-05-26 16:00:04 -07:00
Logan Ramos 3a8b1fe03e More telemetry comments (#150303)
* Add owners to all telemetry events

* More comments

* Add comments to non typescript GDPR annotation

* Another comment
2022-05-24 16:00:55 -07:00
Matt Bierner 6bd7605ae1 Enable strictNullChecks for implicit projects (#149844)
Mistakenly enabled checkJS instead of strictNullChecks
2022-05-18 10:47:37 -07:00
Matt Bierner 101f6fb31d Enable enabling js/ts.implicitProjectConfig.checkJs by default (#149660)
Fixes #149659
2022-05-16 11:52:27 -07:00
Matt Bierner 4923404e98 Don't include leading @ in JS/TS completion word range (#149400)
Fixes #149385
2022-05-12 15:22:18 -07:00
Matt Bierner 3ba66bf24f Use explicit empty authority for JS/TS resources (#149125)
Fixes #149123

10c8c1c2cc made sure we sync over the authority of in-memory resources over to TS Server. However if a resource does not have an authority, this resulted in a url with `scheme//path` instead of `scheme/authority/path`

TS would then normalize the uri to `scheme/path`, resulting in us considering this a new resource

This fix adds an explicit empty authority that we use in this case instead
2022-05-09 15:52:52 -07:00
Matt Bierner 10c8c1c2cc Include authority in TS in-memory scheme (#148940)
For #146853

Make sure we include the uri authority when serializing and then restoring the file paths we send to TSServer (similarly to how we already handle the uri scheme)
2022-05-06 11:48:53 -07:00
Andrew Branch 076bb03cb4 No commit characters for string completions (#148597) 2022-05-03 13:36:20 -07:00
Matt Bierner 17ee4c4265 Pick up TS 4.7 for bundling with VS Code 2022-05-02 15:50:42 -07:00
Andrew Branch e9e3ca02ef Add flags to completions telemetry (#148313) 2022-04-30 17:57:13 -04:00
Matt Bierner 1d2461bed6 Sort 2022-04-21 22:23:48 -04:00
Andrii Dieiev 7e887b76ea Fix version in error message (#147750) 2022-04-20 09:40:18 -07:00
Matt Bierner d851ea5d49 Add 'go to source definition' command
Fixes #147532

Requires TS 4.7+
2022-04-19 19:32:19 -07:00
Matt Bierner 977c9c9f98 Revert "Always use nameSpan for code lenses"
This reverts commit d218b48067.

Fixes #147154
Fixes #146818

TS still needs to make tweaks before we can remove this logic
2022-04-13 12:00:06 -07:00
Matt Bierner a52e45add2 Don't show busy for JS/TS files not in workspace
Fixes #145309
2022-04-05 17:03:12 -07:00
Matt Bierner 464e50f207 Use more consistent method names 2022-03-31 11:56:37 -07:00
Matt Bierner 8d5ae2bdd9 Add auto enum case for ts.locale
Fixes #146436
2022-03-31 11:56:36 -07:00
Gabriela Araujo Britto 88e3d49156 support label details (#146270) 2022-03-30 15:27:50 -07:00
Gabriela Araujo Britto 4e159b9e28 [typescript-language-features] Add includeCompletionsWithObjectLiteralMethodSnippets preference (#145941)
* create flag for object literal method snippet completions

* reword description
2022-03-24 15:17:43 -07:00
Logan Ramos 9b7268acf9 Update telemetry module 2022-03-18 11:34:33 -04:00
Matt Bierner 7ba9564ac6 Use correct casting when working with Object.freeze
Casting the result of Object.freeze results in a non-readonly object. Instead we should pass the type along to the call to `Object.freeze`
2022-03-16 16:00:32 -07:00
Robo 32d40cf44e chore: update to electron 17 (#143223)
* chore: bump electron@17.0.0

* Revert "chore: revert to electron@13 (#143851)"

This reverts commit df645f1450.

* chore: bump electron@17.1.0

* Revert "ci: fix build with latest node-gyp"

This reverts commit c3e948aa30.

* chore: revert ci changes for node v16

* chore: update yarn.lock

* chore: bump electron@17.1.1
2022-03-11 00:51:37 +09:00
Matt Bierner 71c0686d04 Use lowercase preserve for jsxemit
This matches what the tsconfig schema expects
2022-03-09 14:38:13 -08:00
Matt Bierner b3832713db Use esnext as implicit js/ts module
For https://github.com/microsoft/TypeScript/issues/46698

Also adds new settings for the target and module in implicit projects
2022-03-09 14:33:37 -08:00
Matt Bierner 9d41c706c6 Allow manually restarting TS Server even if it has crashed too many times
Currently if the server crashes too many times, the user has to restart VS Code. It's possible the user could fix something (such as a bad plugin) and then run this command to just restart the server without needing to restart the entire editor
2022-03-08 18:48:48 -08:00
Matt Bierner 886ab06860 Try to have more explicit error when we don't have a server
Fixes #143032

This change removes a call that would automatically restart the TS server when invoking a command. Instead we now return a `NoServer` response

When this happens, the server still should be restarted. This change stops us from logging a large number of errors when we get into this state where the server has crashed too many times and we no longer want to automatically restart it
2022-03-08 18:48:48 -08:00
Matt Bierner eb6050d8a8 Preserve path item details for JS/TS completions
Fixes #144455
2022-03-08 14:33:26 -08:00
Ondrej Medek 529cc9c859 fix markdownDescription for javascript.suggest.jsdoc.generateReturns (#144486) 2022-03-07 17:12:55 -08:00
Matt Bierner 5c452f8973 Use [].flat() 2022-03-03 15:03:33 -08:00
Matt Bierner 1900abc88b while -> for 2022-03-01 16:39:41 -08:00
Matt Bierner ea76090229 Remove support for old plugin based semantic token responses
We removed support for the plugin a few iterations ago so this branch should no longer be active
2022-03-01 16:38:37 -08:00
Matt Bierner fb292d9a46 Cleanup semantic tokens provider
- Don't modify params
- mark public
- Use standard api version object
- remove extra disposable
- Don't use declare for const enums
2022-03-01 16:38:36 -08:00
Matt Bierner e6d702383d Remove experimental protocol stubs 2022-03-01 16:38:36 -08:00
Matt Bierner a068ebee8d Finalize markdownstring.baseUri
Fixes #142051
2022-03-01 15:48:53 -08:00
Matt Bierner e04c70a676 Fix TS resolved paths when on vfs
For #136433

These paths always have to start with `/`
2022-02-28 17:27:43 -08:00
Matt Bierner c662fe67bf Bump default target for jsconfig template 2022-02-28 15:16:39 -08:00
Matt Bierner 062b82c1bc Use .test instead of .match 2022-02-28 14:27:47 -08:00
Matt Bierner 1d77856203 Use ?.forEach instead of ( || []).forEach 2022-02-28 13:52:59 -08:00
Matt Bierner 6f63577e80 Remove unused event 2022-02-28 13:46:52 -08:00
Matt Bierner 2fc747419d use ?. 2022-02-28 13:44:48 -08:00
Matt Bierner cf898ff7d1 null -> undefined 2022-02-28 13:43:18 -08:00
Matt Bierner 70dd24e9bd Remove extra check
This should not be nullable
2022-02-28 13:43:18 -08:00
Matt Bierner d218b48067 Always use nameSpan for code lenses
Fixes #143648

The nameSpan property has existed for something like years or so, so it should be safe to use. There's currently not a good way to request the reference count of an anon function and I don't think this is actually useful to show since the ref count should always be 1 for these
2022-02-28 13:43:16 -08:00
Matt Bierner ee9c87ccca Clean up logged messages 2022-02-24 14:28:27 -08:00
Matt Bierner 2a72cf7070 Restore 'follow link' text on tsconfig links
For #141112
2022-02-24 14:02:38 -08:00