如何配置autoformat no lanar vim
我在VIM和您的叉子上更新。要有一个光滑的过渡,我正在使用Lunar vim,但是我需要更改有关格式的一些选项,例如:
我需要如何格式化:
<img src={ item.image } alt ={ item.descripton } />
但是当我保存时,vim格式如:(
<img src={item.image} alt ={item.descripton} />
没有空格)
我需要更改这或删除自动格式。
I'm newer on vim and your forks. To have a smoother transition I'm using Lunar Vim, but I need to change some option about the formatter, for example:
How I need to format:
<img src={ item.image } alt ={ item.descripton } />
But when I save, the Vim format like:
<img src={item.image} alt ={item.descripton} />
(Without spaces)
I need to change this, or remove the auto formatter.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
有两种方法可以做到这一点,您可以用简单的方法(Jorge Dorino的答案)来做到这一点。
file:/home/user/.config/lvim/config.lua
或您可以保留此行并激活Prettier Formtertert https://prettier.io/docs/en/options.html ,并将您自己的规则配置为HTML文件格式化。
(这样做之前,您需要安装Prettier或Prettierd)
文件:/home/user/.config/lvim/config.lua
There are two ways to do this, you can do it with the easy way (answer of Jorge Dorino).
File: /home/user/.config/lvim/config.lua
Or you can keep this line and activate the prettier formatter https://prettier.io/docs/en/options.html , and configure your own rules to html files formatting.
(You need to install prettier or prettierd before do this)
File: /home/user/.config/lvim/config.lua