fixed range formatting with ^>= 0.8
This commit is contained in:
parent
a24b928433
commit
a85b634110
@ -70,8 +70,12 @@ local on_attach = function(client, bufnr)
|
||||
end
|
||||
end
|
||||
if client.server_capabilities.documentRangeFormattingProvider then
|
||||
if vim.version().minor >= 8 then
|
||||
vim.keymap.set('v', '<space>f', vim.lsp.buf.format, opts)
|
||||
else
|
||||
vim.keymap.set('v', '<space>f', vim.lsp.buf.range_formatting, opts)
|
||||
end
|
||||
end
|
||||
|
||||
-- Set autocommands conditional on server_capabilities
|
||||
if client.server_capabilities.documentHighlightProvider then
|
||||
|
Loading…
x
Reference in New Issue
Block a user