Tom-Bonnike / vscode-formatting-toggle

A VS Code extension that allows you to toggle the formatter (Prettier, Beautify, …) ON and OFF with a simple click.
https://marketplace.visualstudio.com/items?itemName=tombonnike.vscode-status-bar-format-toggle
MIT License
60 stars 13 forks source link

The status bar element disappears from the status bar when switching to a code editor #73

Open MurzNN opened 8 months ago

MurzNN commented 8 months ago

I have a problem with the status bar "Formatting" element - it disappears when I'm switching to a code editor tab from the Extension page in the VS Code Remote instance (Dev containers).

Reproduce steps:

  1. Open a remote session (attach to a Docker container)
  2. Open the "Formatting toggle" extension page.
  3. Click on the "Enable" button.
  4. See that the "Formatting" element has successfully appeared in the status bar.
  5. Switch to another tab with a code editor.
  6. See that the "Formatting" element has disappeared in the status bar.
  7. Use the "Toggle formatting" action in the command palette to switch the mode.
  8. See that the "Formatting" element has again successfully appeared in the status bar.
  9. Switch to another tab with a code editor.
  10. See that the "Formatting" element has disappeared in the status bar again.

It also appears back if I disable the extension, then reload, and enable it again. But still until I switch the current tab.

On the local instance (without Remote) it works well.

Could you please try to reproduce this on your side and invent some fix for it? Thanks!

Tom-Bonnike commented 8 months ago

Is that the same as https://github.com/Tom-Bonnike/vscode-formatting-toggle/issues/71?

MurzNN commented 8 months ago

Is that the same as #71?

No, #71 is about the online version of VS Code (https://vscode.dev/) but my issue is about the full desktop version of the VS Code, but when the server side of VS Code works in a Docker container (on the same machine).

Here is more details about this mode: https://code.visualstudio.com/docs/devcontainers/containers

Tom-Bonnike commented 8 months ago

Thanks! I definitely need to get more familiar with that. Either there’s something specific about how extensions work in containers, or there’s a status bar bug in containers…