-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathinit.lua
29 lines (23 loc) · 823 Bytes
/
init.lua
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
require("config.lazy")
vim.cmd.colorscheme("catppuccin")
-- Function to set a random highlight color for LineNr
function SetRandomLineNrColor()
math.randomseed(os.time())
local colors = {
"#b4befe", -- Lavender
"#eba0ac", -- Maroon
"#d2fac5", -- Green
"#f2cdcd", -- Flamingo
"#cba6f7", -- Mauve
"#fcc6a7", -- Peach
"#89b4fa", -- Blue
"#89dceb", -- Sky
}
local index = math.random(#colors)
vim.api.nvim_set_hl(0, "LineNr", { fg = colors[index], bold = true })
end
-- Ensure the random color is selected each time Neovim starts
vim.cmd("autocmd VimEnter * lua SetRandomLineNrColor()")
-- Setting highlights for lines above and below
vim.api.nvim_set_hl(0, "LineNrAbove", { fg = "#6e738d", bold = false })
vim.api.nvim_set_hl(0, "LineNrBelow", { fg = "#6e738d", bold = false })