Description
When attempting to format a shell script (.sh file) using the Format Document command in Visual Studio Code, I receive the following error:
There is no formatter for 'shellscript' files installed.
Environment
Local Machine: macOS (MacBook)
Remote Environment: Debian server
Development Setup: Utilizing Dev Containers for remote development
Extensions Installed: foxundermoon.shell-format
shfmt Installation:
Local (macOS): Installed via Homebrew
Remote (Linux): Installed using Go, located at $HOME/go/bin/shfmt
Configuration
In my settings.json, I have specified the path to shfmt as follows: "shellformat.path": "$HOME/go/bin/shfmt".
Despite this configuration, the formatter does not function as expected, and the aforementioned error persists.
Questions
-
In a Remote - SSH + Dev Container setup, should the foxundermoon.shell-format extension be installed on the local machine, the remote machine, or both?
-
Where should shfmt be installed in this context? On the local machine, the remote machine, or inside the Dev Container?
-
Should the shellformat.path setting be defined in the local settings.json, the remote settings, or within the Dev Container's configuration?
Additional Information
Verified that shfmt is executable at $HOME/go/bin/shfmt on the remote machine.
The foxundermoon.shell-format extension is currently installed on the local machine.
Description
When attempting to format a shell script (.sh file) using the
Format Documentcommand in Visual Studio Code, I receive the following error:Environment
Local Machine: macOS (MacBook)
Remote Environment: Debian server
Development Setup: Utilizing Dev Containers for remote development
Extensions Installed: foxundermoon.shell-format
shfmt Installation:
Local (macOS): Installed via Homebrew
Remote (Linux): Installed using Go, located at $HOME/go/bin/shfmt
Configuration
In my settings.json, I have specified the path to shfmt as follows:
"shellformat.path": "$HOME/go/bin/shfmt".Despite this configuration, the formatter does not function as expected, and the aforementioned error persists.
Questions
In a Remote - SSH + Dev Container setup, should the foxundermoon.shell-format extension be installed on the local machine, the remote machine, or both?
Where should shfmt be installed in this context? On the local machine, the remote machine, or inside the Dev Container?
Should the shellformat.path setting be defined in the local settings.json, the remote settings, or within the Dev Container's configuration?
Additional Information
Verified that shfmt is executable at $HOME/go/bin/shfmt on the remote machine.
The foxundermoon.shell-format extension is currently installed on the local machine.