Closed syd3n closed 4 years ago
@syd3n Thanks for the bug report! Sorry I didn't see this earlier.
vscode-fish
uses the fish shell's builtin fish_indent
command. This command is hard-coded to indent to 4 spaces here, so unfortunately there's no way for the extension to pass Ident Using Tabs
preference to fish_indent
.
As a workaround, you can disable format on save for fish files:
Preference: Open Keyboard Shortcuts (JSON)
"[fish]": {
"editor.formatOnSave": false,
},
Just double checking, there is no way to indent this to 2 spaces / tabs? :( eh bummer i use 2 tabs for all my projects
According to the maintainer of fish-shell, the number of spaces per indent isn't supposed to be configurable (think gofmt
which defines a "standard" formatting for a language). Previous discussion at https://github.com/fish-shell/fish-shell/pull/6790
Yup, 4 spaces is just the way it is. Closing this issue out.
When I have the
vscode-fish
extension disabled, and specifyIndent Using Tabs
with a specificTab Size
set, the indentation I have specified while editing a*.fish
file will stick and there are no issues.But if I have the
vscode_fish
extension enabled, and open a*.fish
file for editing and then specificIndent Using Tabs
and specific aTab Size
, the auto format will go back to spaces. I am not able to figure out how to change this behavior. Any suggestions?Attaching a vid of what I am describing. Please let me know if what I am describing is not clear.
fish-ext-indent-issue.mp4.zip