feat: updates

This commit is contained in:
2024-09-16 22:25:49 -04:00
parent 08b2166714
commit f72e1a5501
5 changed files with 78 additions and 21 deletions

View File

@@ -15,8 +15,10 @@
colorschemes.gruvbox.enable = true;
extraPlugins = [ pkgs.vimPlugins.todo-txt-vim ];
plugins = {
flash.enable = true;
oil.enable = true;
neogit.enable = true;
hardtime.enable = true;
lsp = {
enable = true;
servers = {
@@ -159,8 +161,8 @@
};
keymaps = [
{ action = ":"; key = ";"; mode = [ "n" ]; }
{ action = "gj"; key = "j"; mode = [ "n" ]; }
{ action = "gk"; key = "k"; mode = [ "n" ]; }
# { action = "gj"; key = "j"; mode = [ "n" ]; }
# { action = "gk"; key = "k"; mode = [ "n" ]; }
{ action = "<Esc>"; key = "jk"; mode = [ "i" ]; }
{ action = "<cmd>Telescope find_files<CR>"; key = "<leader><leader>"; options.desc = "Find Files"; }
@@ -171,6 +173,11 @@
{ action = "<cmd>Trouble diagnostics toggle<CR>"; key = "<leader>tr"; }
{ action = "<cmd>Neogit<CR>"; key = "<leader>gg"; options.desc = "Open Git"; }
{ action = "<cmd>NvimTreeToggle<CR>"; key = "<leader>tt"; options.desc = "Tree View";}
{ action.__raw = "function() require('flash').jump() end"; key = "s"; mode = [ "n" "x" "o" ]; options.desc = "Flash"; }
{ action.__raw = "function() require('flash').treesitter() end"; key = "S"; mode = [ "n" "x" "o" ]; options.desc = "Flash Treesitter"; }
{ action.__raw = "function() require('flash').remote() end"; key = "r"; mode = [ "o" ]; options.desc = "Remote Flash"; }
{ action.__raw = "function() require('flash').treesitter_search() end"; key = "R"; mode = [ "o" ]; options.desc = "Treesitter Search"; }
];
};
}

View File

@@ -16,7 +16,7 @@ config.window_frame = {
}
config.hide_tab_bar_if_only_one_tab = true
config.tab_bar_at_bottom = true
config.tab_bar_at_bottom = false
wezterm.on('update-status', function(window)
local SOLID_LEFT_ARROW = utf8.char(0xe0b2)
@@ -62,4 +62,42 @@ config.keys = {
nav_pane("l", "Right"),
}
local function get_current_working_dir(tab)
local current_dir = tab.active_pane and tab.active_pane.current_working_dir or { file_path = '' }
local HOME_DIR = os.getenv('HOME')
return current_dir.file_path == HOME_DIR and '~'
or string.gsub(current_dir.file_path, '(.*[/\\])(.*)', '%2')
end
wezterm.on('format-tab-title', function(tab, tabs, panes, config, hover, max_width)
local has_unseen_output = false
if not tab.is_active then
for _, pane in ipairs(tab.panes) do
if pane.has_unseen_output then
has_unseen_output = true
break
end
end
end
local cwd = wezterm.format({
{ Text = get_current_working_dir(tab) },
})
local process = get_process(tab)
local title = process and string.format(' %s (%s) ', process, cwd) or ' [?] '
if has_unseen_output then
return {
{ Foreground = { Color = '#28719c' } },
{ Text = title },
}
end
return {
{ Text = title },
}
end)
return config

View File

@@ -8,6 +8,12 @@
ripgrep
wget
];
programs.bat = {
enable = true;
config = {
theme = "gruvbox-dark";
};
};
programs.zsh = {
enable = true;
prezto = {
@@ -45,5 +51,8 @@
programs.starship = {
enable = true;
enableZshIntegration = true;
settings = {
nodejs.disabled = true;
};
};
}