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