Skip to content

Missing code actions (editor.codeActionsOnSave) with typescript.experimental.useTsgo in VSCode #2444

@virtuallyunknown

Description

@virtuallyunknown

Extension Version

0.20260106.1

VS Code Version

1.107.1

Operating system Version

Arch Linux

Steps to reproduce

  1. Initiate a new project, and install tsgo - pnpm add -D @typescript/native-preview.
  2. Set "type": "module" in package.json.
  3. Create a tsconfig.json with the recommended settings - pnpm exec tsgo --init, add the src directory to includes.
  4. Install the tsgo extension - TypeScriptTeam.native-preview and create .vscode/settings.json file with the following config to enable it:
{
    "typescript.experimental.useTsgo": true,
    "editor.codeActionsOnSave": {
    },
}
  1. Create these 2 files in the src directory:
// foo.ts
export const greet() {};

// bar.ts
greet();

Issue

So what is the issue? The documentation for VSCode mentions the following:

With the editor.codeActionsOnSave setting, you can configure a set of Code Actions that are automatically applied when you save a file, for example to organize imports. Based on your workspace files and active extensions, IntelliSense provides a list of available Code Actions.

However, when "typescript.experimental.useTsgo": true is enabled, most of the code actions become unavailable so IntelliSense does not provide a list.

TSGO enabled:

Image

TSGO disabled:

Image

So then if we go back to our bar.ts and save the file, normally the source.addMissingImports.ts action would kick in and automatically add the missing import for our greet function imported from foo.ts. But since these code actions are unavailable with useTsgo enabled, nothing happens.

This has become an important part of my workflow, and a huge time-saver as well. I'd really want to give tsgo a shot but this feature is dearly missed at the moment.

Cheers!

Metadata

Metadata

Assignees

No one assigned

    Labels

    Domain: EditorRelated to the LSP server, editor experience

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions