From bb3a2cf67262c059ed364c542776fc6369401d51 Mon Sep 17 00:00:00 2001 From: Ben Kreeger Date: Tue, 8 Jul 2025 13:48:34 -0500 Subject: [PATCH] Fix lazygit config both inside and outside of neovim --- lazygit/config.yml | 24 +++++++++++++++++++++ lazygit/lazygit.yaml | 12 ----------- neovide/config.toml | 7 +++++++ nvim/lazy-lock.json | 11 +++++----- nvim/lua/config/lazy/10-git.lua | 28 ++++++++++++------------- nvim/lua/config/lazy/30-fuzzyfinder.lua | 2 -- nvim/lua/config/lazy/33-terminal.lua | 21 ++++++++++++++----- nvim/lua/config/settings.lua | 7 +++++++ setup.sh | 2 +- zsh/aliases.zsh | 1 - zsh/functions.zsh | 5 +++++ zsh/zprofile | 6 ++---- zsh/zshrc | 5 +++++ 13 files changed, 86 insertions(+), 45 deletions(-) delete mode 100644 lazygit/lazygit.yaml create mode 100644 neovide/config.toml diff --git a/lazygit/config.yml b/lazygit/config.yml index e69de29..5a3b2ee 100644 --- a/lazygit/config.yml +++ b/lazygit/config.yml @@ -0,0 +1,24 @@ +--- +gui: + theme: + activeBorderColor: ['#a6e3a1', bold] + inactiveBorderColor: ['#a6adc8'] + optionsTextColor: ['#89b4fa'] + selectedLineBgColor: ['#313244'] + cherryPickedCommitBgColor: ['#45475a'] + cherryPickedCommitFgColor: ['#a6e3a1'] + unstagedChangesColor: ['#f38ba8'] + defaultFgColor: ['#cdd6f4'] + searchingActiveBorderColor: ['#f9e2af'] + authorColors: + '*': '#b4befe' + showRootItemInFileTree: false + showPanelJumps: false + nerdFontsVersion: '3' +git: + merging: + args: --no-ff + mainBranches: [master, main, develop] + autoStageResolvedConflicts: false + overrideGpg: true + parseEmoji: true diff --git a/lazygit/lazygit.yaml b/lazygit/lazygit.yaml deleted file mode 100644 index d75eea5..0000000 --- a/lazygit/lazygit.yaml +++ /dev/null @@ -1,12 +0,0 @@ ---- -gui: - showRootItemInFileTree: false - showPanelJumps: false - nerdFontsVersion: '3' -git: - merging: - args: --no-ff - mainBranches: [master, main, develop] - autoStageResolvedConflicts: false - overrideGpg: true - parseEmoji: true diff --git a/neovide/config.toml b/neovide/config.toml new file mode 100644 index 0000000..26c2705 --- /dev/null +++ b/neovide/config.toml @@ -0,0 +1,7 @@ +[font] +normal = ["Inconsolata Patched G"] +size = 12 + +[box-drawing] +mode = "selected-native" +selected = "๎‚น๐Ÿฎ๐Ÿฎ‘๐Ÿฎ’๎ธ€๎ธ๎ธ‚๎ธƒ๎ธ„๎ธ…โ”€โ”โ”‚โ”ƒโ”„โ”…โ”†โ”‡โ”ˆโ”‰โ”Šโ”‹โ”Œโ”โ”Žโ”โ”โ”‘โ”’โ”“โ””โ”•โ”–โ”—โ”˜โ”™โ”šโ”›โ”œโ”โ”žโ”Ÿโ” โ”กโ”ขโ”ฃโ”คโ”ฅโ”ฆโ”งโ”จโ”ฉโ”ชโ”ซโ”ฌโ”ญโ”ฎโ”ฏโ”ฐโ”ฑโ”ฒโ”ณโ”ดโ”ตโ”ถโ”ทโ”ธโ”นโ”บโ”ปโ”ผโ”ฝโ”พโ”ฟโ•€โ•โ•‚โ•ƒโ•„โ•…โ•†โ•‡โ•ˆโ•‰โ•Šโ•‹โ•Œโ•โ•Žโ•โ•โ•‘โ•’โ•“โ•”โ••โ•–โ•—โ•˜โ•™โ•šโ•›โ•œโ•โ•žโ•Ÿโ• โ•กโ•ขโ•ฃโ•คโ•ฅโ•ฆโ•งโ•จโ•ฉโ•ชโ•ซโ•ฌโ•ญโ•ฎโ•ฏโ•ฐโ•ฑโ•ฒโ•ณโ•ดโ•ตโ•ถโ•ทโ•ธโ•นโ•บโ•ปโ•ผโ•ฝโ•พโ•ฟโ–€โ–โ–‚โ–ƒโ–„โ–…โ–†โ–‡โ–ˆโ–‰โ–Šโ–‹โ–Œโ–โ–Žโ–โ– โ–‘โ–’โ–“โ–”โ–•โ––โ–—โ–˜โ–™โ–šโ–›โ–œโ–โ–žโ–Ÿ" diff --git a/nvim/lazy-lock.json b/nvim/lazy-lock.json index 782dc39..859dc7f 100644 --- a/nvim/lazy-lock.json +++ b/nvim/lazy-lock.json @@ -5,19 +5,18 @@ "conform.nvim": { "branch": "master", "commit": "973f3cb73887d510321653044791d7937c7ec0fa" }, "dropbar.nvim": { "branch": "master", "commit": "64f5540824ab350f02dabc1276f4a1f4f141276b" }, "fidget.nvim": { "branch": "main", "commit": "d9ba6b7bfe29b3119a610892af67602641da778e" }, - "gitsigns.nvim": { "branch": "main", "commit": "588264bee92993df92535b6742576f5655c91b1c" }, + "gitsigns.nvim": { "branch": "main", "commit": "362fe61f9f19e9bceff178792780df5cce118a7d" }, "lazy.nvim": { "branch": "main", "commit": "6c3bda4aca61a13a9c63f1c1d1b16b9d3be90d7a" }, "lazydev.nvim": { "branch": "main", "commit": "2367a6c0a01eb9edb0464731cc0fb61ed9ab9d2c" }, - "lazygit.nvim": { "branch": "main", "commit": "4839ab642962cc76bb1bf278427dc4c59be15072" }, "lualine.nvim": { "branch": "master", "commit": "a94fc68960665e54408fe37dcf573193c4ce82c9" }, - "mason-lspconfig.nvim": { "branch": "main", "commit": "c4c84f4521d62de595c0d0f718a9a40c1890c8ce" }, + "mason-lspconfig.nvim": { "branch": "main", "commit": "7815740f4d0afb74ada00956c36e18ad695ed9e3" }, "mason-tool-installer.nvim": { "branch": "main", "commit": "517ef5994ef9d6b738322664d5fdd948f0fdeb46" }, "mason.nvim": { "branch": "main", "commit": "8024d64e1330b86044fed4c8494ef3dcd483a67c" }, - "mini.nvim": { "branch": "main", "commit": "48f48e4b3f317e9da34ee7a01958b4c5018e2d34" }, - "neo-tree.nvim": { "branch": "main", "commit": "cea666ef965884414b1b71f6b39a537f9238bdb2" }, + "mini.nvim": { "branch": "main", "commit": "66d3cf727d7bf2ba59df02e710f39640d9af823f" }, + "neo-tree.nvim": { "branch": "main", "commit": "fba6d1f9b5ed031f983b2cb413d69838d88d76fa" }, "nui.nvim": { "branch": "main", "commit": "de740991c12411b663994b2860f1a4fd0937c130" }, "nvim-autopairs": { "branch": "master", "commit": "23320e75953ac82e559c610bec5a90d9c6dfa743" }, - "nvim-lspconfig": { "branch": "master", "commit": "1cb30b1bafe5a63a5c6ac20dc39f83487df38855" }, + "nvim-lspconfig": { "branch": "master", "commit": "7fac9025a967a4d0846660f751cd392fac6bb788" }, "nvim-notify": { "branch": "master", "commit": "a22f5d7ac511c2df2fd3290a9f04c48d5a822e2e" }, "nvim-surround": { "branch": "main", "commit": "8dd9150ca7eae5683660ea20cec86edcd5ca4046" }, "nvim-treesitter": { "branch": "master", "commit": "42fc28ba918343ebfd5565147a42a26580579482" }, diff --git a/nvim/lua/config/lazy/10-git.lua b/nvim/lua/config/lazy/10-git.lua index b1d66ad..8045131 100644 --- a/nvim/lua/config/lazy/10-git.lua +++ b/nvim/lua/config/lazy/10-git.lua @@ -11,18 +11,18 @@ return { }, }, }, - { - "kdheepak/lazygit.nvim", - lazy = false, - cmd = { - "LazyGit", - "LazyGitConfig", - "LazyGitCurrentFile", - "LazyGitFilter", - "LazyGitFilterCurrentFile", - }, - keys = { - { "gs", "LazyGit", desc = "LazyGit" }, - }, - }, + -- { + -- "kdheepak/lazygit.nvim", + -- lazy = false, + -- cmd = { + -- "LazyGit", + -- "LazyGitConfig", + -- "LazyGitCurrentFile", + -- "LazyGitFilter", + -- "LazyGitFilterCurrentFile", + -- }, + -- keys = { + -- { "gs", "LazyGit", desc = "LazyGit" }, + -- }, + -- }, } diff --git a/nvim/lua/config/lazy/30-fuzzyfinder.lua b/nvim/lua/config/lazy/30-fuzzyfinder.lua index e98ca16..6d85a11 100644 --- a/nvim/lua/config/lazy/30-fuzzyfinder.lua +++ b/nvim/lua/config/lazy/30-fuzzyfinder.lua @@ -16,7 +16,6 @@ return { enabled = vim.g.have_nerd_font, }, "rcarriga/nvim-notify", - "kdheepak/lazygit.nvim", }, config = function() require("telescope").setup({ @@ -30,7 +29,6 @@ return { pcall(require("telescope").load_extension, "fzf") pcall(require("telescope").load_extension, "ui-select") pcall(require("telescope").load_extension, "notify") - pcall(require("telescope").load_extension, "lazygit") -- Define these keys here since they require access to runtime values local builtin = require("telescope.builtin") diff --git a/nvim/lua/config/lazy/33-terminal.lua b/nvim/lua/config/lazy/33-terminal.lua index 9b62835..7a059e9 100644 --- a/nvim/lua/config/lazy/33-terminal.lua +++ b/nvim/lua/config/lazy/33-terminal.lua @@ -1,14 +1,25 @@ return { { "akinsho/toggleterm.nvim", - config = true, cmd = "ToggleTerm", - opts = { - open_mapping = [["tt"]], - direction = "horizontal", - }, + config = function() + require("toggleterm").setup({ + open_mapping = [["tt"]], + direction = "horizontal", + }) + local Terminal = require("toggleterm.terminal").Terminal + local lazygit = Terminal:new({ cmd = "lazygit", hidden = true, direction = "float" }) + function _lazygit_toggle() + lazygit:toggle() + end + end, keys = { { "tt", "ToggleTerm dir=git_dir", desc = "ToggleTerm: Toggle [t]erminal" }, + { + "gs", + "lua _lazygit_toggle()", + desc = "[g]it [s]tatus", + }, }, }, } diff --git a/nvim/lua/config/settings.lua b/nvim/lua/config/settings.lua index 073bcef..f8d7ff4 100644 --- a/nvim/lua/config/settings.lua +++ b/nvim/lua/config/settings.lua @@ -1,4 +1,11 @@ vim.g.have_nerd_font = true +vim.o.guifont = "Inconsolata Patched G:h12" +if vim.g.neovide then + vim.opt.cmdheight = 0 + vim.o.linespace = 5 + vim.g.neovide_cursor_animation_length = 0 + vim.g.neovide_scroll_animation_length = 0 +end vim.opt.number = true vim.opt.relativenumber = true vim.opt.signcolumn = "yes" diff --git a/setup.sh b/setup.sh index d259db8..2e550f3 100755 --- a/setup.sh +++ b/setup.sh @@ -18,7 +18,7 @@ if [[ ! -a "$HOME/.zprofile" ]]; then fi # Symlink directories to $XDG_CONFIG_HOME. -directories=("gem" "ghostty" "git" "gnupg" "k9s" "lazygit" "nvim" "starship" "tmux" "zed") +directories=("gem" "ghostty" "git" "gnupg" "k9s" "lazygit" "neovide" "nvim" "starship" "tmux" "zed") for directory in "${directories[@]}"; do if [[ -d "$XDG_CONFIG_HOME/$directory" ]]; then continue; fi ln -sfv "$SCRIPTPATH/$directory" "$XDG_CONFIG_HOME/$directory" diff --git a/zsh/aliases.zsh b/zsh/aliases.zsh index 316e786..42965a6 100644 --- a/zsh/aliases.zsh +++ b/zsh/aliases.zsh @@ -37,7 +37,6 @@ alias av="ansible-vault" if [[ -x "$(command -v nvim)" ]]; then alias vim="nvim" fi - if [[ -x "$(command -v highlight)" ]]; then alias ccat='highlight -O ansi --force' alias clat='highlight -lO ansi --force' diff --git a/zsh/functions.zsh b/zsh/functions.zsh index 854ee06..e46fb4e 100644 --- a/zsh/functions.zsh +++ b/zsh/functions.zsh @@ -75,3 +75,8 @@ function update_dotfiles() { nvim --headless "+Lazy! install" +qa > /dev/null 2>&1 nvim --headless "+Lazy! clean" +qa > /dev/null 2>&1 } + +# Tool functions +function vide() { + neovide $1 & +} diff --git a/zsh/zprofile b/zsh/zprofile index 2262c3d..0eeda8e 100644 --- a/zsh/zprofile +++ b/zsh/zprofile @@ -1,3 +1,5 @@ +# vim: filetype=zsh + SCRIPTPATH=$HOME/.config/dotfiles/zsh # google cloud sdk @@ -5,10 +7,6 @@ if [[ -a "/usr/local/Caskroom/google-cloud-sdk/latest/google-cloud-sdk/path.zsh. source "/usr/local/Caskroom/google-cloud-sdk/latest/google-cloud-sdk/path.zsh.inc" fi -if [[ -a "/usr/local/Caskroom/google-cloud-sdk/latest/google-cloud-sdk/completion.zsh.inc" ]]; then - source "/usr/local/Caskroom/google-cloud-sdk/latest/google-cloud-sdk/completion.zsh.inc" -fi - # rust additions if [[ -a "$HOME/.cargo/bin" ]]; then export PATH="$HOME/.cargo/bin:$PATH" diff --git a/zsh/zshrc b/zsh/zshrc index 255a810..fa55786 100644 --- a/zsh/zshrc +++ b/zsh/zshrc @@ -20,6 +20,11 @@ setopt PROMPT_SUBST SCRIPTPATH=$HOME/.config/dotfiles/zsh +# google cloud sdk +if [[ -a "/usr/local/Caskroom/google-cloud-sdk/latest/google-cloud-sdk/completion.zsh.inc" ]]; then + source "/usr/local/Caskroom/google-cloud-sdk/latest/google-cloud-sdk/completion.zsh.inc" +fi + # history substring search if [[ -a "$SCRIPTPATH/zsh-history-substring-search/zsh-history-substring-search.zsh" ]]; then source "$SCRIPTPATH/zsh-history-substring-search/zsh-history-substring-search.zsh"