Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: make ui more tidy and unified #699

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions lua/modules/configs/completion/cmp.lua
Original file line number Diff line number Diff line change
Expand Up @@ -75,12 +75,14 @@ return function()
cmp.setup({
window = {
completion = {
border = border("Normal"),
border = border("PmenuBorder"),
winhighlight = "Normal:Pmenu,CursorLine:PmenuSel,Search:PmenuSel",
max_width = 80,
max_height = 20,
},
documentation = {
border = border("CmpDocBorder"),
border = border("PmenuBorder"),
winhighlight = "Normal:Pmenu",
},
},
sorting = {
Expand Down
7 changes: 3 additions & 4 deletions lua/modules/configs/tool/wilder.lua
Original file line number Diff line number Diff line change
Expand Up @@ -25,13 +25,12 @@ return function()
),
})

local match_hl = require("modules.utils").hl_to_rgb("String", false, colors.green)

local popupmenu_renderer = wilder.popupmenu_renderer(wilder.popupmenu_border_theme({
border = "rounded",
highlights = {
border = "Title", -- highlight to use for the border
accent = wilder.make_hl("WilderAccent", "Pmenu", { { a = 0 }, { a = 0 }, { foreground = match_hl } }),
default = "Pmenu",
border = "PmenuBorder", -- highlight to use for the border
accent = wilder.make_hl("WilderAccent", "CmpItemAbbr", "CmpItemAbbrMatch"),
},
empty_message = wilder.popupmenu_empty_message_with_spinner(),
highlighter = wilder.lua_fzy_highlighter(),
Expand Down
13 changes: 9 additions & 4 deletions lua/modules/configs/ui/bufferline.lua
Original file line number Diff line number Diff line change
Expand Up @@ -24,18 +24,23 @@ return function()
diagnostics_indicator = function(count)
return "(" .. count .. ")"
end,
indicator = {
-- icon = "▎",
icon = " ",
style = "icon",
},
offsets = {
{
filetype = "NvimTree",
text = "File Explorer",
text = "",
text_align = "center",
padding = 1,
padding = 0,
},
{
filetype = "lspsagaoutline",
text = "Lspsaga Outline",
text = "",
text_align = "center",
padding = 1,
padding = 0,
},
},
},
Expand Down
18 changes: 18 additions & 0 deletions lua/modules/configs/ui/catppuccin.lua
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,24 @@ return function()
Type = { fg = cp.blue },
Typedef = { fg = cp.yellow },
StorageClass = { fg = cp.red, style = { "italic" } },
WinSeparator = { bg = cp.base, fg = cp.base },

-- For indent-blankline
IndentBlanklineContextChar = { fg = cp.pink },

-- For nvim-tree
NvimTreeIndentMarker = { fg = cp.surface0 },

-- For nvim-cmp and wilder
Pmenu = { fg = cp.overlay2, bg = transparent_background and cp.none or cp.base },
PmenuBorder = { fg = cp.surface1, bg = transparent_background and cp.none or cp.base },
PmenuSel = { bg = cp.green, fg = cp.base },
CmpItemAbbr = { fg = cp.overlay2 },
CmpItemAbbrMatch = { fg = cp.blue, style = { "bold" } },

-- For lspsaga
OutlineNormal = { bg = cp.crust },
OutlineIndent = { fg = cp.surface0 },

-- For native lsp configs.
DiagnosticVirtualTextError = { bg = cp.none },
Expand Down