2023-01-07 17:52:40 +08:00
|
|
|
-- Autocmds are automatically loaded on the VeryLazy event
|
|
|
|
-- Default autocmds that are always set: https://github.com/LazyVim/LazyVim/blob/main/lua/lazyvim/config/autocmds.lua
|
|
|
|
-- Add any additional autocmds here
|
2023-11-26 13:11:59 +08:00
|
|
|
|
|
|
|
-- Turn off paste mode when leaving insert
|
|
|
|
vim.api.nvim_create_autocmd("InsertLeave", {
|
|
|
|
pattern = "*",
|
|
|
|
command = "set nopaste",
|
|
|
|
})
|
|
|
|
|
|
|
|
-- Disable the concealing in some file formats
|
|
|
|
-- The default conceallevel is 3 in LazyVim
|
|
|
|
vim.api.nvim_create_autocmd("FileType", {
|
|
|
|
pattern = { "json", "jsonc", "markdown" },
|
|
|
|
callback = function()
|
|
|
|
vim.opt.conceallevel = 0
|
|
|
|
end,
|
|
|
|
})
|