Skip to content

Commit 391ad94

Browse files
committed
general updates
1 parent e74b709 commit 391ad94

File tree

4 files changed

+28
-4
lines changed

4 files changed

+28
-4
lines changed

lua/theprimeagen/init.lua

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,13 +50,23 @@ autocmd('BufEnter', {
5050
group = ThePrimeagenGroup,
5151
callback = function()
5252
if vim.bo.filetype == "zig" then
53-
vim.cmd.colorscheme("tokyonight-night")
53+
-- vim.cmd.colorscheme("tokyonight-night")
5454
else
5555
-- vim.cmd.colorscheme("rose-pine-moon")
5656
end
5757
end
5858
})
5959

60+
autocmd("BufWritePost", {
61+
callback = function()
62+
local file_name = vim.fn.expand("%:p") -- Get the full file path
63+
vim.notify("File saved: " .. file_name, "info", {
64+
title = "File Save Notification",
65+
timeout = 2000, -- Optional: Override default timeout
66+
})
67+
end,
68+
})
69+
6070

6171
autocmd('LspAttach', {
6272
group = ThePrimeagenGroup,

lua/theprimeagen/lazy/lualine.lua

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,15 +4,28 @@ return {
44
config = function()
55
require('lualine').setup({
66
options = {
7-
theme = 'gruvbox', -- Choose a theme
7+
theme = 'iceberg_dark', -- Choose a theme
88
icons_enabled = true,
99
section_separators = '',
1010
component_separators = ''
1111
},
1212
sections = {
1313
lualine_a = {'mode'},
1414
lualine_b = {'branch'},
15-
lualine_c = {'filename'},
15+
lualine_c = {
16+
function()
17+
local filepath = vim.fn.expand('%:p')
18+
if filepath == '' then
19+
return '[No Name]'
20+
end
21+
local parts = vim.split(filepath, '/')
22+
local len = #parts
23+
if len < 3 then
24+
return filepath
25+
end
26+
return table.concat(parts, '/', len - 2, len)
27+
end
28+
},
1629
lualine_x = {'encoding', 'fileformat', 'filetype'},
1730
lualine_y = {'progress'},
1831
lualine_z = {'location'}

lua/theprimeagen/lazy/nvim-tree.lua

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,5 +52,6 @@ return {
5252
keymap.set("n", "<leader>ef", "<cmd>NvimTreeFindFileToggle<CR>", { desc = "Toggle file explorer on current file" }) -- toggle file explorer on current file
5353
keymap.set("n", "<leader>ec", "<cmd>NvimTreeCollapse<CR>", { desc = "Collapse file explorer" }) -- collapse file explorer
5454
keymap.set("n", "<leader>er", "<cmd>NvimTreeRefresh<CR>", { desc = "Refresh file explorer" }) -- refresh file explorer
55+
keymap.set("n", "<leader>ez", "<cmd>NvimTreeFocus<CR>", { desc = "Focus File tree" })
5556
end
5657
}

lua/theprimeagen/test.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
Foo
1+
Foo Foo

0 commit comments

Comments
 (0)