Prevent cursor hold errors with changed api

This commit is contained in:
ViViDboarder 2021-12-14 16:20:16 -08:00
parent 052f75718d
commit 83590865a5

View File

@ -75,7 +75,9 @@ local function default_attach(client, bufnr)
buf_set_keymap('n', '<leader>q', '<cmd>lua vim.lsp.diagnostic.set_loclist()<CR>', opts)
-- Open diagnostic on hold
if vim.diagnostic ~= nil then
vim.cmd [[autocmd CursorHold,CursorHoldI * lua vim.diagnostic.open_float(nil, {focus=false})]]
end
-- Set some keybinds conditional on server capabilities
if client.resolved_capabilities.document_formatting then