Skip to content

Markdown editor table commands are not available in the Command Palette #347015

Description

Testing #346614

The new table commands don't appear in the Command Palette: Insert Table, Table: Insert Row Above/Below, Table: Delete Row, Table: Insert Column Left/Right, Table: Delete Column, Table: Align Column Left/Center/Right, and Table: Remove Column Alignment. They have no default keybindings either, so there's no way to run them in VS Code.

Steps to reproduce:

  1. Open tables.md from the test plan with Reopen Editor With... > Markdown Editor and click the pencil to enable editing.
  2. Click into a table cell.
  3. Open the Command Palette (Cmd+Shift+P) and type Table: Insert Row or Insert Table.

Expected: the table commands are listed.
Actual: only unrelated commands and Ask in Chat entries are listed.

The commands themselves work: binding markdown.editor.table.insertRowBelow to a key inserts a row below the current one. They're hidden because updateMarkdownEditorPackageJson.mts writes a commandPalette entry with "when": "false" for every generated command:

const generatedCommandPaletteEntries: readonly CommandPaletteContribution[] = commandDefinitions.map(command => ({
command: command.id,
when: 'false',
$generated: true,
}));

Tested on macOS (arm64) with VS Code Insiders 1.146.0-insider (142e558) and markdown-language-features rebuilt against @vscode/markdown-editor 0.0.2-177. Insiders still bundles 0.0.2-153, which doesn't include table editing.

annotated.mp4

Metadata

Metadata

Labels

bugIssue identified by VS Code Team member as probable bugmarkdown-editor

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

    ⌂ 换网址