Commit Graph

1944 Commits

Author SHA1 Message Date
Matt Bierner
569d6942e8 Use clearer reference 2025-02-07 00:31:33 -08:00
Matt Bierner
ae77c3ff42 Optimistically show paste with imports if TS server takes to long when computing imports to add
Fixes #235959

When pasting across files, sometimes users can see a spinner while we wait to see if TS has a `paste with imports` edit. This needs to be done even if we insert plain text by default so that we can then show the paste widget and user can select `paste with imports`

This change makes it so that if TS takes over 200ms, we assume that a paste operation may be available and return an unresolved edit for it. Only when the edit then actually needs to be applied, we wait for TS to respond

In most cases we won't need to wait because plain text will be pasted by default. Users will then only see the spinner after selecting `paste with imports`
2025-02-07 00:01:46 -08:00
henry
3eb1f2c914 correct conditions 2025-01-24 00:41:28 -06:00
henry
ac7533df77 fixed lazy client 2025-01-23 20:10:05 -06:00
Martin Aeschlimann
273f654ced Merge remote-tracking branch 'origin/main' into aeschli/clear-wombat-216 2025-01-17 09:42:36 +01:00
Martin Aeschlimann
37a00332c7 remove old MappedEditsProvider 2025-01-15 21:21:58 +01:00
aslezar
d8ea024868 chore: used same message decription for TS and JS 2025-01-14 12:49:27 +05:30
Shivam Garg
00d7778d98 Merge branch 'microsoft:main' into fix-js-indent 2025-01-13 01:42:01 +05:30
Matt Bierner
4daea74ba9 Finalize paste api and drop api tweaks
Fixes #30066

This finalizes the documentPaste api. This api allows extensions to attach metadata on text copy and change how content is pasted. Some examples:

- Updating imports for pasted code
- Inserting an image as an attachment in notebooks
- Pasting files converts them to relative text paths
2025-01-07 14:57:16 -08:00
aslezar
97a5f18d0d fix: update descriptions for switch-case indentation settings in TypeScript and JavaScript 2024-12-31 13:06:32 +05:30
aslezar
a91e6b684b feat: support custom js switch-case indentation 2024-12-29 15:24:38 +05:30
Matt Bierner
cfb3a3043d Merge branch 'main' into patch-1 2024-12-17 11:31:26 -08:00
Logan Ramos
e689b912ba Update telemetry package (#236378) 2024-12-17 20:12:49 +01:00
Matt Bierner
6be3f02482 Inline simple methods
These don't add much
2024-12-16 15:50:05 -08:00
DetachHead
d6bf64517a remove javascript.inlayHints.enumMemberValues.enabled because javascript does not have enums 2024-12-17 09:42:08 +10:00
Matt Bierner
bee3e32d01 Merge pull request #235987 from mjbvz/narrow-bobcat
Make sure we sync file config before generating paste edits
2024-12-12 09:56:39 -08:00
Matt Bierner
8c7ca99740 Make sure we sync file config before generating paste edits
This could explain why we occasionally see the wrong style of import being generated
2024-12-12 09:36:15 -08:00
Matt Bierner
6a0fcdeca6 Make preparePasteEdits interrupt diagnostics too
For #235959

Already done for the main paste request but we should do it for `preparePasteEdits`  too
2024-12-12 09:17:26 -08:00
Aiday Marlen Kyzy
18bd4c58c7 Add more detail to expandable-hover setting description (#235596)
* adding more detail to hover

* polish
2024-12-09 10:26:42 +01:00
Riley Bruins
3b7e1c668a Render JSDoc examples as typescript code (#234143)
Currently `@example` produces Markdown code blocks for code examples,
but they are not annotated with a programming language. This commit
annotates those code blocks as `typescript`, allowing for better
highlighting for JS/TS when using Markdown renderers that recognize
these languages.
2024-11-22 12:11:59 -08:00
Matt Bierner
c83b443da0 Clean up support for paste edits (#234240)
- Allow setting an array of preferences for paste as keybindings
- Clarifies kinds used for core and extensions
- Exports text kind as API
2024-11-20 07:14:10 +01:00
Dirk Bäumer
46afc4d3b9 Handle TypeScript server arguments (#234139)
* Handle TypeScript server arguments

* Pass token as last parameter
2024-11-19 15:03:02 -08:00
Matt Bierner
4cdfe236ce Use uris when resolving project loading indicator display (#233859)
Fixes #230009
2024-11-14 18:10:33 -08:00
Nathan Shively-Sanders
a1276ac6df Revert register copilotRelated with copilot (#233729)
* Revert "Add new context parameter to API"

This reverts commit a003a0de24.

* Remove additional references to CopilotRelated
2024-11-13 05:08:23 +00:00
Matt Bierner
ea13242861 Extract interface and fix dispose for TS related files (#233705)
The array is updated async so we can't spread it in the return type
2024-11-12 18:01:19 +01:00
Matt Bierner
ece952c3a2 Update in code default value for copy paste setting (#233361)
Update default value for copy paste setting
2024-11-07 14:01:55 -08:00
Matt Bierner
20e2977a10 Update paste/drop preference settings (#233261)
Makes it a simple array of kinds for now. We can add the mime type variation later if needed

Also makes the paste with imports have a better hierarchy. This lets you setup a keybinding for `text.updateImports` that will work across all languages that support it
2024-11-06 22:59:18 +01:00
Matt Bierner
db1db1518d Don't try using path mapping for vscode.dev with local folder (#233139)
For #231098
2024-11-05 19:44:48 -08:00
Raymond Zhao
bae608634a chore: fix Apache refs (#233124) 2024-11-05 11:59:46 -08:00
Matt Bierner
54d81cd618 Add paste as default settings and enable js/ts paste with imports by default (#233031)
Fixes #184871
For #30066

Adds new settings that let you configure the default way to paste/drop.

Also enables js/ts paste with imports by default for 5.7+. However will not apply by default. Instead it will be shown as an option after pasting. You can then use the `editor.pasteAs.preferences` setting to make it apply automatically or use the `javascript.updateImportsOnPaste.enabled` settings to disable the feature entirely
2024-11-04 16:30:09 -08:00
Matt Bierner
931da88532 Fix conditional (#232742) 2024-10-31 09:56:55 -07:00
Isabel Duan
20a02666f9 Merge branch 'main' into organizeImportsSettingsFix 2024-10-30 15:50:10 -07:00
Isabel Duan
fbbcdd4f05 fix wrong description, add examples 2024-10-30 15:44:19 -07:00
Isabel Duan
95779b7b37 add descriptions, refactor getPreferences function to be more clear 2024-10-30 15:28:59 -07:00
Matt Bierner
d83223b7c2 Try allowing custom commands to be sent to tsserver by extensions (#232663)
For #218275

Limit this to commands that start with `_` which should indicate that it's a private command and prevent clashes with normal TS commands
2024-10-30 14:20:30 -07:00
Matt Bierner
8875f03ec8 Remove code action contribution section (#232664)
This was never fully implemented and I'm not sure we're going to move forward with the static contribution proposal
2024-10-30 14:03:43 -07:00
Matt Bierner
f6d41bc200 Small cleanup in js/ts package strings (#232660) 2024-10-30 13:15:46 -07:00
Matt Bierner
c74816239d Pick up TS 5.7 insiders for builtin ts version (#232650) 2024-10-30 12:09:20 -07:00
Matt Bierner
4679606b30 Don't try watching non writable file systems (#232433)
For ts and markdown, skip watching on file systems that are not writable as these files should not change
2024-10-28 11:12:01 -07:00
Matt Bierner
890985d7e3 Remove (experimental) from setting descriptions (#231963)
Fixes #231958
2024-10-22 11:42:16 -07:00
Matt Bierner
86aab25210 Redirect TS report issue to issue reporting guide (#231527)
Almost none of the issues that come in through our `report issue` button are actionable. Previously more people were filling in the template and following up, but now very few do

So instead, I'm changing this to open a guide about the common causes of crashes and how to file a good issue report. This guide also focuses on helping people self-diagnose and fix problems
2024-10-16 14:17:04 -07:00
Matt Bierner
e2e048ded8 Merge pull request #230345 from microsoft/dev/eslint-9
Eslint 9 migration
2024-10-07 09:15:12 -07:00
Nathan Shively-Sanders
a003a0de24 Add new context parameter to API 2024-10-07 07:24:34 -07:00
Nathan Shively-Sanders
a1cd9f37f1 Update copilotRelated API with Disposable/CancellationToken 2024-10-07 07:24:34 -07:00
Nathan Shively-Sanders
007126775c add missing ts-expect-error till 5.7 2024-10-07 07:24:34 -07:00
Nathan Shively-Sanders
50a1fbda47 Register copilotRelated, use selector's languages
The select provided at registration contains the correct list of
languages to register for the provider.
2024-10-07 07:24:34 -07:00
Nathan Shively-Sanders
fc7db1c7da Remove stray edit 2024-10-07 07:24:34 -07:00
Nathan Shively-Sanders
bada583519 ts-expect-error on upcoming TS 5.7 protocol 2024-10-07 07:24:34 -07:00
Nathan Shively-Sanders
b8e8e701f5 Depend on TS 5.7 not 5.6 2024-10-07 07:24:34 -07:00
Nathan Shively-Sanders
e169ac792f Move copilot related-files to language features
It is now in its own file.

Also address other PR comments.
2024-10-07 07:24:34 -07:00