dot/.config/nvim/lua/config/autocmds.lua

16 lines
455 B
Lua
Raw Normal View History

2023-11-08 15:33:21 +01:00
vim.o.updatetime = 250
2024-07-25 20:09:29 +02:00
2023-11-08 15:33:21 +01:00
vim.cmd [[autocmd CursorHold,CursorHoldI * lua vim.diagnostic.open_float(nil, {focus=false})]]
2024-07-25 20:09:29 +02:00
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
})