Skip to content

volar 与 eslint 规则冲突 #112

Answered by nshen
yansq asked this question in Q&A
Sep 7, 2022 · 2 comments · 2 replies
Discussion options

You must be logged in to vote

像这样在 lsp 的 on_attach 里禁用format可以吗

common.disableFormat(client)

-- 禁用格式化功能,交给专门插件插件处理
M.disableFormat = function(client)
if vim.fn.has("nvim-0.8") == 1 then
client.server_capabilities.documentFormattingProvider = false
client.server_capabilities.documentRangeFormattingProvider = false
else
client.resolved_capabilities.document_formatting = false
client.resolved_capabilities.document_range_formatting = false
end
end

Replies: 2 comments 2 replies

Comment options

You must be logged in to vote
1 reply
@yansq
Comment options

Comment options

You must be logged in to vote
1 reply
@yansq
Comment options

Answer selected by yansq
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants