dotfiles/_saved/vim/lazyvim/lua/config/autocmds.lua

25 lines
1 KiB
Lua

-- 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
-- with `vim.api.nvim_create_autocmd`
--
-- Or remove existing autocmds by their group name (which is prefixed with `lazyvim_` for the defaults)
-- e.g. vim.api.nvim_del_augroup_by_name("lazyvim_wrap_spell")
vim.api.nvim_create_autocmd({ "BufRead", "BufNewFile" }, {
pattern = { "helmfile.y?ml", "*.gotmpl" },
callback = function()
vim.cmd("set filetype=helm")
end,
})
vim.api.nvim_create_autocmd({ "BufReadPre" }, {
callback = function()
vim.api.nvim_set_hl(0, "ColorColumn", { bg = "#770000" })
vim.api.nvim_set_hl(0, "DiffChange", { bg = "NONE", fg = "#e7c547" })
vim.api.nvim_set_hl(0, "DiffText", { bg = "NONE", fg = "#ff8700" })
vim.api.nvim_set_hl(0, "SpellBad", { bg = "#770000", fg = "#ffffff" })
vim.api.nvim_set_hl(0, "Visual", { bg = "#0094d8", fg = "#ffffff" })
end,
})