From fb81087eefce42e846326a4866f2cf1dd4e39969 Mon Sep 17 00:00:00 2001 From: BearDad Date: Fri, 29 Nov 2024 19:28:57 +0100 Subject: [PATCH] TWEAK --- init.lua | 35 +++++++++++++++++++++++++++++++++++ lua/chadrc.lua | 1 + lua/custom/plugins/alpha.lua | 2 +- lua/custom/plugins/init.lua | 6 ++++++ 4 files changed, 43 insertions(+), 1 deletion(-) create mode 100644 lua/chadrc.lua diff --git a/init.lua b/init.lua index faae6cfe..edb3d2e2 100644 --- a/init.lua +++ b/init.lua @@ -1359,4 +1359,39 @@ ins_right { -- Now don't forget to initialize lualine lualine.setup(config) +require('colorizer').setup { + filetypes = { '*' }, + user_default_options = { + names = true, -- "Name" codes like Blue or blue + RGB = true, -- #RGB hex codes + RRGGBB = true, -- #RRGGBB hex codes + RRGGBBAA = true, -- #RRGGBBAA hex codes + AARRGGBB = true, -- 0xAARRGGBB hex codes + rgb_fn = true, -- CSS rgb() and rgba() functions + hsl_fn = true, -- CSS hsl() and hsla() functions + css = true, -- Enable all CSS features: rgb_fn, hsl_fn, names, RGB, RRGGBB + css_fn = true, -- Enable all CSS *functions*: rgb_fn, hsl_fn + -- Highlighting mode. 'background'|'foreground'|'virtualtext' + mode = 'background', -- Set the display mode + -- Tailwind colors. boolean|'normal'|'lsp'|'both'. True is same as normal + tailwind = 'both', -- Enable tailwind colors + -- parsers can contain values used in |user_default_options| + sass = { enable = true, parsers = { 'css' } }, -- Enable sass colors + -- Virtualtext character to use + virtualtext = '■', + -- Display virtualtext inline with color + virtualtext_inline = true, + -- Virtualtext highlight mode: 'background'|'foreground' + virtualtext_mode = 'foreground', + -- update color values even if buffer is not focused + -- example use: cmp_menu, cmp_docs + always_update = true, + }, + -- all the sub-options of filetypes apply to buftypes + buftypes = {}, + -- Boolean | List of usercommands to enable + user_commands = true, -- Enable all or some usercommands +} + vim.api.nvim_set_hl(0, 'CursorLine', { bg = '#191724' }) -- Use a darker or blended color +vim.wo.relativenumber = true diff --git a/lua/chadrc.lua b/lua/chadrc.lua new file mode 100644 index 00000000..a5647075 --- /dev/null +++ b/lua/chadrc.lua @@ -0,0 +1 @@ +return {} diff --git a/lua/custom/plugins/alpha.lua b/lua/custom/plugins/alpha.lua index 49dead1d..b115fb78 100644 --- a/lua/custom/plugins/alpha.lua +++ b/lua/custom/plugins/alpha.lua @@ -83,7 +83,7 @@ return { end -- Calculate padding for centering the greeting - local logoWidth = logo:find '\n' - 1 -- Assuming the logo width is the width of the first line + local logoWidth = logo:find '\n' - 18 -- Assuming the logo width is the width of the first line local greetingWidth = #greeting local padding = math.floor((logoWidth - greetingWidth) / 2) diff --git a/lua/custom/plugins/init.lua b/lua/custom/plugins/init.lua index 2f7b6274..12e18418 100644 --- a/lua/custom/plugins/init.lua +++ b/lua/custom/plugins/init.lua @@ -72,4 +72,10 @@ return { event = 'VeryLazy', enabled = vim.fn.has 'nvim-0.10.0' == 1, }, + { + 'NvChad/nvim-colorizer.lua', + event = 'BufReadPre', + opts = { -- set to setup table + }, + }, }