Skip to content

Commit 7a55ffc

Browse files
committed
Theme updates
1 parent f0fda96 commit 7a55ffc

File tree

4 files changed

+167
-76
lines changed

4 files changed

+167
-76
lines changed

lua/plugins/navigation.lua

Lines changed: 13 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ return {
5656
end,
5757
},
5858
},
59-
version = false, -- telescope did only one release, so use HEAD for now
59+
version = false,
6060
keys = {
6161
{ "<leader>,", "<cmd>Telescope buffers show_all_buffers=true<cr>", desc = "Switch Buffer" },
6262
{ "<leader>/", "<cmd>Telescope live_grep<cr>", desc = "Find in Files (Grep)" },
@@ -98,23 +98,29 @@ return {
9898
{ "gD", "<cmd>Telescope lsp_type_definitions<cr>", desc = "Go to Type Definitions" },
9999
{ "ca", "<cmd>Telescope lsp_code_actions<cr>", desc = "LSP Code Actions" },
100100
},
101-
config = function()
102-
require("telescope").setup({
101+
opts = function()
102+
return {
103103
defaults = {
104-
prompt_prefix = " ",
104+
prompt_prefix = " ",
105105
selection_caret = "",
106106
layout_strategy = "horizontal",
107-
layout_config = { prompt_position = "top" },
107+
layout_config = {
108+
horizontal = {
109+
prompt_position = "top",
110+
preview_width = 0.55,
111+
},
112+
width = 0.87,
113+
height = 0.80,
114+
},
108115
sorting_strategy = "ascending",
109-
winblend = 0,
110116
},
111117
file_ignore_patterns = {
112118
".git/",
113119
"node_modules/",
114120
"vendor/",
115121
"pnpm-lock.yaml",
116122
},
117-
})
123+
}
118124
end,
119125
},
120126

lua/plugins/starter.lua

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@ _____/ /_/ /_/ /_/ /_/\____/\__/ /_/ /_/_\__, /
3838
starter.gen_hook.aligning("center", "center"),
3939
},
4040
}
41+
--stylua: enable
4142
return config
4243
end,
4344
config = function(_, config)
@@ -61,7 +62,12 @@ _____/ /_/ /_/ /_/ /_/\____/\__/ /_/ /_/_\__, /
6162
local stats = require("lazy").stats()
6263
local ms = (math.floor(stats.startuptime * 100 + 0.5) / 100)
6364
local pad_footer = string.rep(" ", 1)
64-
starter.config.footer = pad_footer .. "⚡ Neovim loaded " .. stats.count .. " plugins in " .. ms .. "ms"
65+
starter.config.footer = pad_footer
66+
.. "⚡ Neovim loaded "
67+
.. stats.count
68+
.. " plugins in "
69+
.. ms
70+
.. "ms"
6571
pcall(starter.refresh)
6672
end,
6773
})

lua/plugins/statusline.lua

Lines changed: 38 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,19 @@ return {
33
{
44
"nvim-lualine/lualine.nvim",
55
event = "VeryLazy",
6-
config = function()
7-
local cp = require("catppuccin.palettes").get_palette()
6+
init = function()
7+
vim.g.lualine_laststatus = vim.o.laststatus
8+
if vim.fn.argc(-1) > 0 then
9+
-- set an empty statusline until lualine loads
10+
vim.o.statusline = " "
11+
else
12+
-- hide the statusline on the starter page
13+
vim.o.laststatus = 0
14+
end
15+
end,
16+
opts = function()
17+
vim.o.laststatus = vim.g.lualine_laststatus
18+
819
local custom_catppuccin = require("lualine.themes.catppuccin")
920
custom_catppuccin.normal.b.bg = "None"
1021
custom_catppuccin.insert.b.bg = "None"
@@ -15,41 +26,46 @@ return {
1526

1627
custom_catppuccin.normal.c.bg = "None"
1728

18-
require("lualine").setup {
29+
local opts = {
1930
options = {
2031
theme = custom_catppuccin,
2132
component_separators = "|",
2233
section_separators = { left = "", right = "" },
2334
globalstatus = false,
2435
disabled_filetypes = {
25-
"starter",
36+
"ministarter",
2637
},
2738
},
2839
sections = {
2940
lualine_a = {
3041
{ "mode", right_padding = 2 },
3142
},
3243
lualine_b = {
44+
{
45+
"diagnostics",
46+
symbols = { error = "", warn = "", info = "" },
47+
},
48+
{ "filetype", icon_only = true, separator = "", padding = { left = 1, right = 0 } },
3349
{
3450
"filename",
35-
path = 1
51+
path = 1,
3652
},
3753
},
38-
lualine_c = {
54+
lualine_c = {},
55+
lualine_x = {
3956
{
40-
'diff',
57+
"diff",
4158
colored = true, -- Displays a colored diff status if set to true
4259
diff_color = {
4360
-- Same color values as the general color option can be used here.
44-
added = 'DiffAdd', -- Changes the diff's added color
45-
modified = 'DiffChange', -- Changes the diff's modified color
46-
removed = 'DiffDelete', -- Changes the diff's removed color you
61+
added = "DiffAdd", -- Changes the diff's added color
62+
modified = "DiffChange", -- Changes the diff's modified color
63+
removed = "DiffDelete", -- Changes the diff's removed color you
4764
},
48-
symbols = {added = '+', modified = '~', removed = '-'}, -- Changes the symbols used by the diff.
49-
}
65+
symbols = { added = "+", modified = "~", removed = "-" }, -- Changes the symbols used by the diff.
66+
},
5067
},
51-
lualine_x = {},
52-
lualine_y = { "filetype", "location" },
68+
lualine_y = {},
5369
lualine_z = {},
5470
},
5571
inactive_sections = {
@@ -58,12 +74,14 @@ return {
5874
lualine_c = {
5975
{
6076
"filename",
61-
path = 1
62-
}
77+
path = 1,
78+
},
79+
},
80+
lualine_x = {
81+
"location",
6382
},
64-
lualine_x = {"location"},
6583
lualine_y = {},
66-
lualine_z = {}
84+
lualine_z = {},
6785
},
6886
statusline = {},
6987
winbar = {},
@@ -73,9 +91,10 @@ return {
7391
"fugitive",
7492
"lazy",
7593
"neo-tree",
76-
"trouble"
94+
"trouble",
7795
},
7896
}
97+
return opts
7998
end,
8099
},
81100
}

lua/plugins/theme.lua

Lines changed: 109 additions & 49 deletions
Original file line numberDiff line numberDiff line change
@@ -70,60 +70,119 @@ return {
7070
"catppuccin/nvim",
7171
name = "catppuccin",
7272
build = ":CatppuccinCompile",
73-
opts = {
74-
transparent_background = true,
75-
integrations = {
76-
cmp = true,
77-
dashboard = false,
78-
fidget = true,
79-
gitgutter = true,
80-
gitsigns = true,
81-
harpoon = true,
82-
illuminate = true,
83-
markdown = true,
84-
mason = true,
85-
mini = true,
86-
telescope = true,
87-
treesitter = true,
88-
treesitter_context = true,
89-
which_key = true,
90-
indent_blankline = {
91-
enabled = true,
92-
colored_indent_levels = false,
93-
},
94-
lsp_trouble = true,
95-
native_lsp = {
96-
enabled = true,
97-
virtual_text = {
98-
errors = { "italic" },
99-
hints = { "italic" },
100-
warnings = { "italic" },
101-
information = { "italic" },
102-
ok = { "italic" },
103-
},
104-
underlines = {
105-
errors = { "underline" },
106-
hints = { "underline" },
107-
warnings = { "underline" },
108-
information = { "underline" },
109-
ok = { "underline" },
73+
config = function()
74+
require("catppuccin").setup({
75+
flavour = "mocha",
76+
transparent_background = true,
77+
integrations = {
78+
cmp = true,
79+
dashboard = false,
80+
fidget = true,
81+
gitgutter = true,
82+
gitsigns = true,
83+
harpoon = true,
84+
illuminate = true,
85+
markdown = true,
86+
mason = true,
87+
mini = true,
88+
telescope = { enabled = true },
89+
treesitter = true,
90+
treesitter_context = true,
91+
which_key = true,
92+
indent_blankline = {
93+
enabled = true,
94+
colored_indent_levels = false,
11095
},
111-
inlay_hints = {
112-
background = true,
96+
lsp_trouble = true,
97+
native_lsp = {
98+
enabled = true,
99+
virtual_text = {
100+
errors = { "italic" },
101+
hints = { "italic" },
102+
warnings = { "italic" },
103+
information = { "italic" },
104+
ok = { "italic" },
105+
},
106+
underlines = {
107+
errors = { "undercurl" },
108+
hints = { "undercurl" },
109+
warnings = { "undercurl" },
110+
information = { "undercurl" },
111+
ok = { "undercurl" },
112+
},
113+
inlay_hints = {
114+
background = true,
115+
},
113116
},
117+
neotree = true,
118+
notify = true,
119+
noice = true,
114120
},
115-
neotree = true,
116-
notify = true,
117-
},
118-
},
121+
custom_highlights = function(colors)
122+
return {
123+
-- Ensure that the background is transparent
124+
Normal = { bg = "none" },
125+
NormalFloat = { bg = colors.mantle },
126+
FloatBorder = { fg = colors.crust },
127+
128+
-- Needed this for undercurls to work
129+
DiagnosticUnderlineError = { sp = colors.red, undercurl = true },
130+
DiagnosticUnderlineWarn = { sp = colors.yellow, undercurl = true },
131+
DiagnosticUnderlineInfo = { sp = colors.sky, undercurl = true },
132+
DiagnosticUnderlineHint = { sp = colors.teal, undercurl = true },
133+
134+
-- Telescope
135+
TelescopeBorder = {
136+
fg = colors.crust,
137+
bg = colors.crust,
138+
},
139+
TelescopeMatching = { fg = colors.blue },
140+
TelescopeNormal = {
141+
bg = colors.crust,
142+
},
143+
TelescopePromptBorder = {
144+
fg = colors.surface0,
145+
bg = colors.surface0,
146+
},
147+
TelescopePromptNormal = {
148+
fg = colors.text,
149+
bg = colors.surface0,
150+
},
151+
TelescopePromptPrefix = {
152+
fg = colors.flamingo,
153+
bg = colors.surface0,
154+
},
155+
TelescopePreviewTitle = {
156+
fg = colors.base,
157+
bg = colors.green,
158+
},
159+
TelescopePromptTitle = {
160+
fg = colors.base,
161+
bg = colors.red,
162+
},
163+
TelescopeResultsTitle = {
164+
fg = colors.mantle,
165+
bg = colors.lavender,
166+
},
167+
TelescopeSelection = {
168+
fg = colors.text,
169+
bg = colors.surface0,
170+
style = { "bold" },
171+
},
172+
TelescopeSelectionCaret = { fg = colors.flamingo },
173+
174+
-- Neotree
175+
NeoTreeNormal = {
176+
bg = colors.crust,
177+
},
178+
}
179+
end,
180+
})
181+
182+
vim.cmd.colorscheme("catppuccin")
183+
end,
119184
lazy = false,
120185
priority = 1000,
121-
config = function()
122-
-- load the colorscheme here
123-
vim.cmd([[colorscheme catppuccin]])
124-
vim.api.nvim_set_hl(0, "Normal", { bg = "none" })
125-
vim.api.nvim_set_hl(0, "NormalFloat", { bg = "none" })
126-
end,
127186
},
128187

129188
-- Add indentation guides even on blank lines
@@ -137,6 +196,7 @@ return {
137196
"Neotree",
138197
"txt",
139198
"markdown",
199+
"ministarter",
140200
},
141201
},
142202
},

0 commit comments

Comments
 (0)