-
请教一下大佬们,我配置了 volar 的 lsp 后,在保存文件的时候会自动进行格式化。我同时也引入了 eslint,在 eslint 配置的 html 格式是一个参数一行,像这样,: <Draggable
:list="props.listItems"
v-bind="dragOptions"
ghost-class="ghost"
</Draggable> 但是每当我保存文件以后,就会自动被格式化成: <Draggable :list="props.listItems" v-bind="dragOptions" ghost-class="ghost"> 我试过如果禁用 volar 的 lsp ,就可以解决这个问题。但如果我想要在使用 volar 的同时,套用 eslint 的格式,应该怎么做呢? |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 2 replies
-
请问 volar 如何配置? 要为 volar 单独写一个 lsp lua 脚本,我写的一直报错,能分享一下你的配置么? |
Beta Was this translation helpful? Give feedback.
-
像这样在 lsp 的 on_attach 里禁用format可以吗 learn-neovim-lua/lua/lsp/config/ts.lua Line 25 in 9885e94 learn-neovim-lua/lua/lsp/common-config.lua Lines 11 to 20 in 9885e94 |
Beta Was this translation helpful? Give feedback.
像这样在 lsp 的 on_attach 里禁用format可以吗
learn-neovim-lua/lua/lsp/config/ts.lua
Line 25 in 9885e94
learn-neovim-lua/lua/lsp/common-config.lua
Lines 11 to 20 in 9885e94