From b156ff8c181f102557254d21262e67236cc69fa2 Mon Sep 17 00:00:00 2001 From: Ben Kreeger Date: Sun, 3 Aug 2025 10:58:16 -0500 Subject: [PATCH] Add my latest config changes --- nvim/lua/config/autocmds.lua | 5 +++++ nvim/lua/config/lazy/31-tree.lua | 1 + nvim/lua/config/lazy/33-terminal.lua | 16 ++++++++++++++-- ssh/config | 11 +++++++++++ zed/settings.json | 19 +++++++++++++++++++ zsh/aliases.zsh | 1 + 6 files changed, 51 insertions(+), 2 deletions(-) diff --git a/nvim/lua/config/autocmds.lua b/nvim/lua/config/autocmds.lua index c9bad3d..a5697e8 100644 --- a/nvim/lua/config/autocmds.lua +++ b/nvim/lua/config/autocmds.lua @@ -6,6 +6,11 @@ vim.api.nvim_create_autocmd("TextYankPost", { end, }) +vim.api.nvim_create_autocmd({ "BufWritePre" }, { + pattern = { "*" }, + command = [[%s/\s\+$//e]], +}) + -- Filetype detection local filetype_maps = { diff --git a/nvim/lua/config/lazy/31-tree.lua b/nvim/lua/config/lazy/31-tree.lua index cae7671..7cce50e 100644 --- a/nvim/lua/config/lazy/31-tree.lua +++ b/nvim/lua/config/lazy/31-tree.lua @@ -24,6 +24,7 @@ return { }, never_show_by_pattern = { ".terraform*", + ".terragrunt-cache*", }, }, use_libuv_file_watcher = true, diff --git a/nvim/lua/config/lazy/33-terminal.lua b/nvim/lua/config/lazy/33-terminal.lua index d5d5f13..51cff8f 100644 --- a/nvim/lua/config/lazy/33-terminal.lua +++ b/nvim/lua/config/lazy/33-terminal.lua @@ -5,7 +5,14 @@ return { config = function() require("toggleterm").setup({ open_mapping = [["tt"]], - direction = "horizontal", + direction = "vertical", + size = function(term) + if term.direction == "horizontal" then + return 15 + elseif term.direction == "vertical" then + return vim.o.columns * 0.4 + end + end, }) local Terminal = require("toggleterm.terminal").Terminal local lazygit = Terminal:new({ @@ -25,7 +32,12 @@ return { { "tt", "ToggleTerm dir=git_dir", - desc = "ToggleTerm: [T]oggle [t]erminal", + desc = "ToggleTerm: [T]oggle [t]erminal (vertical)", + }, + { + "tb", + "ToggleTerm dir=git_dir direction=horizontal", + desc = "ToggleTerm: [T]oggle [b]ottom terminal", }, { "gs", diff --git a/ssh/config b/ssh/config index d5a32b8..37103c5 100644 --- a/ssh/config +++ b/ssh/config @@ -1,4 +1,15 @@ +# vim: ft=sshconfig + Host localhost ForwardAgent yes AddKeysToAgent ask Match host * exec "gpg-connect-agent UPDATESTARTUPTTY /bye" + +Host dns01 + Hostname dns01.kreegerdo.me + User ansible + IdentityFile ~/.ssh/ansible.ed25519 + +Host kreegerdome-udm + Hostname 192.168.1.1 + User bkreeger diff --git a/zed/settings.json b/zed/settings.json index ee17c1f..a1e8b61 100644 --- a/zed/settings.json +++ b/zed/settings.json @@ -7,6 +7,12 @@ // custom settings, run `zed: open default settings` from the // command palette (cmd-shift-p / ctrl-shift-p) { + "agent": { + "default_model": { + "provider": "zed.dev", + "model": "claude-3-5-sonnet" + } + }, "vim_mode": true, "features": { "edit_prediction_provider": "zed" @@ -34,6 +40,19 @@ "JavaScript": { "formatter": { "code_actions": { "source.fixAll.eslint": true } }, "code_actions_on_format": { "source.fixAll.eslint": true } + }, + "HCL": { + // Workarond to be able to format_on_save terragrunt files + // https://github.com/gruntwork-io/terragrunt/issues/1037#issuecomment-2143442454 + "format_on_save": { + "external": { + "command": "sh", + "arguments": [ + "-c", + "TMPFILE=$(mktemp) && cat - > $TMPFILE && terragrunt hclfmt --terragrunt-hclfmt-file $TMPFILE && cat $TMPFILE && rm $TMPFILE" + ] + } + } } }, "file_scan_exclusions": [ diff --git a/zsh/aliases.zsh b/zsh/aliases.zsh index aaf9de3..1af6d08 100644 --- a/zsh/aliases.zsh +++ b/zsh/aliases.zsh @@ -21,6 +21,7 @@ alias dcu="docker compose up" # terraform aliases alias tf="terraform" +alias tg="terragrunt" # Wireguard CLI aliases alias vpnup="sudo wg-quick up wg0"