我正在使用 neovim,vim-autoformat,并且有一个
.editorconfig
设置,如下所示:
root = true
[*]
indent_style = spaces
indent_size = 2
但是,当我运行
:Autoformat
时,这就是我得到的
我已经确认这是从 .editorconfig 读取的,因为当我更改制表符长度时,我可以看到它从
:Autoformat
明显发生变化,但是,它确实出现了插入制表符,并且它也没有像人们那样缩进期待。
我在这里做错了什么,应该如何配置以将选项卡预期传递到第一张图像?
这是因为默认格式化程序很可能设置不正确。我可以通过运行
:Autoformat typescript
来强制格式化程序,这会给我带来我期望的缩进。