15 lines
455 B
Lua
15 lines
455 B
Lua
vim.o.updatetime = 250
|
|
|
|
vim.cmd [[autocmd CursorHold,CursorHoldI * lua vim.diagnostic.open_float(nil, {focus=false})]]
|
|
|
|
vim.api.nvim_create_autocmd("LspAttach", {
|
|
group = vim.api.nvim_create_augroup("lsp", { clear = true }),
|
|
callback = function(args)
|
|
vim.api.nvim_create_autocmd("BufWritePre", {
|
|
buffer = args.buf,
|
|
callback = function()
|
|
vim.lsp.buf.format { async = false, id = args.data.client_id }
|
|
end,
|
|
})
|
|
end
|
|
})
|