We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent ce90c7b commit f879437Copy full SHA for f879437
lua/lsp/common-config.lua
@@ -10,8 +10,13 @@ end
10
11
-- 禁用格式化功能,交给专门插件插件处理
12
M.disableFormat = function(client)
13
- client.resolved_capabilities.document_formatting = false
14
- client.resolved_capabilities.document_range_formatting = false
+ if vim.fn.has("nvim-0.8") == 1 then
+ client.server_capabilities.documentFormattingProvider = false
15
+ client.server_capabilities.documentRangeFormattingProvider = false
16
+ else
17
+ client.resolved_capabilities.document_formatting = false
18
+ client.resolved_capabilities.document_range_formatting = false
19
+ end
20
end
21
22
return M
0 commit comments