(neovim) another try of my own setup
This commit is contained in:
parent
50e0f23feb
commit
7225cf3967
54 changed files with 677 additions and 586 deletions
37
_saved/vim/lazyvim/lua/config/autocmds.lua
Normal file
37
_saved/vim/lazyvim/lua/config/autocmds.lua
Normal file
|
@ -0,0 +1,37 @@
|
|||
-- don't auto comment new line
|
||||
vim.api.nvim_create_autocmd("BufEnter", { command = [[set formatoptions-=cro]] })
|
||||
|
||||
-- resize neovim split when terminal is resized
|
||||
vim.api.nvim_command("autocmd VimResized * wincmd =")
|
||||
|
||||
-- enable spell for text files
|
||||
vim.api.nvim_create_autocmd("FileType", {
|
||||
group = vim.api.nvim_create_augroup("spell", { clear = true }),
|
||||
pattern = { "text", "plaintex", "typst", "gitcommit", "markdown" },
|
||||
callback = function()
|
||||
vim.opt_local.spell = true
|
||||
end,
|
||||
})
|
||||
|
||||
-- set some colors
|
||||
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, "Visual", { bg = "#0094d8", fg = "#ffffff" })
|
||||
end,
|
||||
})
|
||||
|
||||
-- fix dimmed elements in Snacks.picker
|
||||
vim.api.nvim_create_autocmd("User", {
|
||||
pattern = "VeryLazy",
|
||||
callback = function()
|
||||
Snacks.util.set_hl({
|
||||
PickerDir = { link = "Text" },
|
||||
PickerPathHidden = { link = "Text" },
|
||||
PickerPathIgnored = { link = "Comment" },
|
||||
PickerGitStatusUntracked = { link = "Special" },
|
||||
}, { prefix = "Snacks" })
|
||||
end,
|
||||
})
|
Loading…
Add table
Add a link
Reference in a new issue