Compare commits

..

111 Commits

Author SHA1 Message Date
95de6305b1 Neovim: Unsuccessful attempt to get focus to ignore snacks-explorer 2025-03-27 11:07:23 -07:00
42928d5278 Neovim: Formatting 2025-03-27 11:07:01 -07:00
3a00d05aca Neovim: Add tmux-navigator 2025-03-27 11:06:24 -07:00
04d819cfcf Neovim: Update plugins 2025-03-27 10:46:53 -07:00
fda45f7bfc Neovim: Add copilot chat 2025-02-25 11:26:38 -08:00
1253334a04 Neovim: Enable prettier only in repos with a prettier config 2025-02-25 11:26:29 -08:00
565a52b09d Git: Update config using recommended settings
Taken from https://blog.gitbutler.com/how-git-core-devs-configure-git/
2025-02-25 11:26:02 -08:00
75d3e2ea95 Neovim: Update plugins 2025-02-14 12:42:51 -08:00
db8c557fc4 Neovim: Add LazyVim with selected extras and minimal additional config 2025-02-14 12:42:51 -08:00
c38317bb26 Neovim: Remove Kickstart config 2025-02-14 12:42:51 -08:00
23b6233e72 Neovim: Add github copilot 2025-02-08 12:03:40 -08:00
b74afe39cd Neovim: Use jester for debugging Jest test 2025-02-08 12:03:13 -08:00
f891193f67 Neovim: Use better icons when debugging 2025-01-31 12:51:48 -08:00
765bc09de1 Neovim: Configure for Rust 2025-01-31 12:27:24 -08:00
374dc740e2 Neovim: Fix gitsigns after plugin update 2025-01-31 10:56:47 -08:00
cf23989901 Install: Add pnpm 2025-01-31 09:08:05 -08:00
a138bc0451 Bashrc: Source cargo env 2025-01-31 09:07:48 -08:00
052b2f991f Neovim: Update to latest kickstart.nvim
Updated to 5bdde24dfb353d365d908c5dd700f412ed2ffb17
5bdde24dfb
2025-01-31 09:07:26 -08:00
8d1acc7550 vs-code: Sync settings with vs-code 2024-11-22 11:56:48 -08:00
c49c50b6af Lazygit: Set edit actions to use vscode 2024-11-20 10:59:29 -08:00
9351c8137f Lazygit: Enable nerd fonts 2024-11-20 10:59:14 -08:00
8c4334b66d vs-code: Change typescript default formatter 2024-11-15 09:14:42 -08:00
38e098ac82 vs-code: Add shortcut for viewing problems 2024-11-15 09:13:45 -08:00
0fa11e05a5 vs-code: Add some hotkeys from vim 2024-11-14 22:44:04 -08:00
deacba1fe8 vs-code: Update tmux keybindings 2024-11-14 22:21:44 -08:00
6821c4db3f Tmux: Enable tmux-sensible 2024-11-14 17:01:28 -08:00
118bd28e2b Neovim: Add custom folding module 2024-11-14 17:01:16 -08:00
3fbc03a5ca Neovim: Add language server support for deno 2024-11-14 16:59:42 -08:00
d1eb398c2e Bashc: Add git completions 2024-11-14 16:58:47 -08:00
b7d285a2a9 vs-code: Sorting and grouping settings 2024-11-14 16:58:25 -08:00
0e23f5ba55 vs-code: Reorganize keybindings into groups 2024-11-14 16:52:52 -08:00
de29ee2bb2 vs-code: Merge keybindings from second profile 2024-11-14 16:46:28 -08:00
b3bdc1df02 vs-code: Merge settings from second profile 2024-11-14 16:46:28 -08:00
a674b35f1d vs-code: Settings from long ago 2024-11-14 16:46:28 -08:00
c1b75f4532 Install: Add deno 2024-10-17 12:02:16 -07:00
9b2268d4f8 Neovim: Set whichkey delay
Having a short timeoutlen was annoying with things like mini.surround
where I sometimes think about which key needs to be pressed next.
Instead, use the default timeoutlen, but shorten the amount of time
until which-key opens.
2024-10-04 13:16:18 -07:00
bbb0cb9c5b Neovim: Update to Kickstart at 4120893
Latest commit to Kickstart as of 2024-10-02.
2024-10-03 11:52:15 -07:00
519d42bbe7 Neovim: Add ai coding companion using remote ollama 2024-09-20 10:03:52 -07:00
6022c73977 Ble: Add config file 2024-07-26 08:35:58 -07:00
4c4b35e5d2 Neovim: Disable lsp inline virtual hints 2024-07-24 08:24:30 -07:00
0aa80f9874 Show function parameter hints while typing 2024-07-15 09:21:16 -07:00
7f685ff8da Neovim: Display tabs as two spaces 2024-07-15 09:21:16 -07:00
9a5e0a62aa Neovim: Enable debugging plugins 2024-07-13 18:21:32 -07:00
b04c3a756b Neovim: Setup sql completions 2024-07-13 18:21:18 -07:00
9727202801 Atuin: Add config 2024-07-13 13:13:58 -07:00
e0a07cdf70 Bashrc: Add ble.sh and Atuin 2024-07-13 12:59:38 -07:00
419dd60626 Install: Add linters to be installed 2024-07-13 12:58:23 -07:00
c514d41a94 Neovim: Add goto_preview plugin 2024-06-23 18:29:46 -07:00
cdd64b6cbb Neovim: Add ray-x/go plugin 2024-06-22 08:35:02 -07:00
74cc01e310 Neovim: Add oil plugin 2024-06-22 08:34:52 -07:00
c2b60ad356 Neovim: Fix focus plugin not loading 2024-06-14 15:19:28 -07:00
7b8ea9c3af Neovim: Allow moving cursor with arrow keys 2024-06-14 14:59:34 -07:00
f44336163f Neovim: Setup mini.splitjoin 2024-06-09 15:34:11 -07:00
4919a82354 Neovim: Search todo in current file 2024-06-09 14:20:07 -07:00
ade875c1f1 Update gitmux 2024-06-09 07:55:25 -07:00
5abd8ef2dc Neovim: Disable eslint linting
Eslint is still being run when formatting though.
2024-06-06 13:41:51 -07:00
822412e259 Install: Move devcontainer to be installed with npm
Having brew install node will conflict with the nvm installed version of
node. It can behave in weird ways, including having different versions
of node take priority whether in tmux or not.
2024-06-06 09:18:33 -07:00
ef64562fa9 Bashrc: Remove unused functions 2024-06-06 09:17:09 -07:00
17232fd215 Neovim: Remove trailing whitespace on save 2024-06-06 09:17:09 -07:00
2f346e9396 Install: Move most binary files to homebrew 2024-06-06 09:17:09 -07:00
95aca8b3cb Neovim: Switch to eslint_d
This is a linter instead of a language server, so we no longer receive
duplicate warnings about formatting errors due to having multiple
language servers.

Still applies eslint formatting rules on save.
2024-06-03 15:08:04 -07:00
34d3b0ee8b Neovim: Do not run focus on dbui buffers 2024-06-03 13:45:03 -07:00
45bc8ac901 Neovim: Enable friendly-snippets 2024-06-02 17:41:13 -07:00
d790b0eba3 Neovim: Add templ formatting and LSP 2024-06-02 17:40:51 -07:00
bf7c4fcea5 Lazygit: Add custom command for push with lease 2024-06-02 08:55:55 -07:00
7f856981a6 Neovim: Setup focus 2024-06-01 16:02:42 -07:00
02b453f86c Neovim: Add trouble 2024-05-31 15:17:01 -07:00
e4c9c1426d Neovim: Move todo comments into separate file 2024-05-31 15:16:49 -07:00
95ef074764 Tmux: Truncate git branch names and hide clean check 2024-05-31 11:32:10 -07:00
fba777fa03 Tmux: Replace homedir with ~ in status 2024-05-31 11:31:46 -07:00
c00ed42656 Tmux: Remove the datetime from the status
I already have a clock on my computer.
2024-05-31 11:31:24 -07:00
f3f61472c8 Tmux: Open lazygit in the current pane path 2024-05-31 11:30:52 -07:00
21a502588e Tmux: Move status bar to the top
There is enough going on at the bottom in Vim already.
2024-05-31 11:30:33 -07:00
2dc9e0445d Neovim: Setup mini.starter dashboard 2024-05-31 11:29:59 -07:00
00083b0deb Neovim: Add action to delete a buffer from Telescope 2024-05-31 11:29:44 -07:00
ce2955c8d7 Neovim: Switch to lualine statusbar 2024-05-31 09:41:13 -07:00
43ac415294 Neovim: Better distinguish popup windows form background 2024-05-30 21:31:52 -07:00
5ff61f8757 Neovim: Add hotkey to grep for selected text 2024-05-30 21:14:26 -07:00
85f3dbc61d Tmux: Add git to status line 2024-05-30 20:58:13 -07:00
fbf57952e9 Install gitmux
This will be used by the tmux statusline.
2024-05-30 20:57:20 -07:00
239579f8cd Neovim: Add dadbod plugin for interacting with databases 2024-05-30 20:56:54 -07:00
dbf7186397 Bashrc: Switch from exa to eza 2024-05-30 08:35:02 -07:00
37e1f3ed8d Neovim: Enable linters 2024-05-30 08:34:45 -07:00
81fe04dd51 Neovim: Disable lua plugin telemetry 2024-05-30 08:34:30 -07:00
621a9930ea Tmux: Enable system clipboard 2024-05-30 08:34:17 -07:00
9658903ed2 Fix Tmux and Vim integrated navigation 2024-05-30 08:33:46 -07:00
38a63ae5fc Tmux: Add catppuccin theme 2024-05-30 08:33:05 -07:00
940b024acc Tmux: Add tpm 2024-05-30 08:32:35 -07:00
3e12e56db3 Neovim: Return to default Catppuccin latte theme 2024-05-29 21:35:26 -07:00
b857259227 FZF: Add Catppuccin Latte Teal theme 2024-05-29 21:34:24 -07:00
9904794c7e LazyGit: Add Catppuccin Latte Teal theme 2024-05-29 21:33:41 -07:00
90f0774e7b Bashrc: Alias vim to nvim 2024-05-29 15:54:08 -07:00
fc88e7db50 Neovim: Switch to catppuccin colorscheme 2024-05-29 15:53:00 -07:00
b9536f72d3 Tmux: Ensure italics are enabled 2024-05-29 15:52:05 -07:00
08559bae7a Neovim: Enable eslint and tailwindcss LSP 2024-05-29 14:05:43 -07:00
f58ffdb0e4 Lazygit: Update 2024-05-29 11:41:46 -07:00
94de21bc88 Neovim: Add treesitter-context plugin 2024-05-29 11:19:35 -07:00
417fb2b9b6 Neovim: Enable lint and autopairs plugins 2024-05-29 11:19:35 -07:00
e2b33c4bc2 Neovim: Enable custom plugins 2024-05-29 11:19:35 -07:00
48f6ccd87c Neovim: Remove additional unnecessary comments 2024-05-29 11:19:35 -07:00
65f3a2511d Neovim: Add shortcut for searching recent files in CWD 2024-05-29 10:59:23 -07:00
6a7ef6a503 Neovim: Consolidate gitsigns config 2024-05-29 10:27:58 -07:00
500932d68c Tmux: Add popup for LazyGit 2024-05-29 10:27:58 -07:00
c36a92b17a Neovim: Enable nerdfont and relativenumber 2024-05-29 10:27:58 -07:00
6efe774cdd Neovim: Disable arrow key movement 2024-05-29 10:27:58 -07:00
2c67e9da3d Neovim: Add goimports and gofumpt 2024-05-29 10:27:58 -07:00
1508c9cbf7 Neovim: Remove some of the more verbose comments from Kickstarter 2024-05-29 10:27:58 -07:00
ead30af6bf Add fd binary for use by nvim and Telescope 2024-05-29 10:27:58 -07:00
c6a44fe6e6 Neovim: Add kickstart config
Taken at commit 5aeddfdd5d
2024-05-29 10:27:52 -07:00
bd5cfc3072 Fix bug in date in PS1 2024-05-22 10:34:39 -07:00
02828c3124 Add dps alias 2023-12-27 08:13:31 -08:00
44 changed files with 1200 additions and 57 deletions

85
.bashrc
View File

@ -1,16 +1,21 @@
if [[ $- == *i* ]]; then # in interactive session
# ble.sh
# https://github.com/akinomyoga/ble.sh#13-set-up-bashrc
BLE="${HOME}/programs/ble.sh/out/ble.sh"
[[ -f ${BLE} ]] && source ${BLE} --noattach
fi
# Navigation
alias vim="nvim"
alias lg="lazygit"
alias ls="eza --long --header --git --group --time-style long-iso"
alias cat="bat --theme=\"Visual Studio Dark+\""
alias tree="exa --tree"
alias tree="eza --tree"
alias la="ls -lhA"
alias calc="qalc"
alias dedsstore="find . -name \".DS_Store\" -delete"
alias c="clear"
# Difftastic Config
export DFT_TAB_WIDTH=4
export DFT_BACKGROUND=light
alias dps="docker ps -a --format 'table {{.Names}}\t{{.Status}}\t{{.Image}}'"
# History
HISTSIZE=50000
@ -23,6 +28,10 @@ if [ "$BASH" != "" ]; then
if [ -f /etc/bash_completion ] && ! shopt -oq posix; then
. /etc/bash_completion
fi
if [ -f /usr/share/bash-completion/completions/git ]; then
source /usr/share/bash-completion/completions/git
fi
fi
if [[ "${OSTYPE}" == "linux-gnu"* ]]; then
@ -55,12 +64,15 @@ fi
alias tmux="tmux -2"
alias grep="grep --color=auto"
eval "$(/home/linuxbrew/.linuxbrew/bin/brew shellenv)"
# Fix gpg signing
# https://github.com/keybase/keybase-issues/issues/2798
export GPG_TTY=$(tty)
# Golang
export PATH=$PATH:/usr/local/go/bin:${HOME}/go/bin
# NOTE: Go is installed with Homebrew and automatically placed on the path
export PATH=$PATH:${HOME}/go/bin
export TERM="xterm-256color"
export EDITOR=$(which vim)
@ -73,23 +85,22 @@ if [[ -d ${HOME}/bin ]]; then
export PATH=$PATH:${HOME}/bin
fi
# Enable atuin
# https://docs.atuin.sh
eval "$(atuin init bash)"
# fzf
# TODO: Why are these files in so many different places?
if [ -f ~/.fzf.bash ]; then
source ~/.fzf.bash
fi
#eval "$(fzf --bash)"
if [ -f /usr/share/bash-completion/completions/fzf ]; then
source /usr/share/bash-completion/completions/fzf
fi
export FZF_DEFAULT_OPTS=" \
--color=bg+:#ccd0da,bg:#eff1f5,spinner:#dc8a78,hl:#d20f39 \
--color=fg:#4c4f69,header:#d20f39,info:#8839ef,pointer:#dc8a78 \
--color=marker:#dc8a78,fg+:#4c4f69,prompt:#8839ef,hl+:#d20f39"
if [ -f /usr/share/doc/fzf/examples/key-bindings.bash ]; then
source /usr/share/doc/fzf/examples/key-bindings.bash
fi
if [ -f /usr/share/doc/fzf/examples/completion.bash ]; then
source /usr/share/doc/fzf/examples/completion.bash
fi
# Override this in .bashrc_local if a nerd font is installed locally.
export HAVE_NERD_FONT=false
export HIDE_HOSTNAME=false
# Add a local un-tracked bash-rc if present
if [[ -f ${HOME}/.bashrc_local ]];
@ -113,15 +124,6 @@ _git_top() {
fi
}
function up() {
num=1
if [ $# -gt 0 ]; then
num=$1
fi
cd $(printf '../%.0s' $(seq 1 $num))
}
# Add color shortcuts
if [ -x /usr/bin/tput ] && tput setaf 1 >&/dev/null; then
c_reset=`tput sgr0`
@ -137,6 +139,14 @@ else
c_git_dirty=
fi
prev_status_prompt_minimal () {
status=$?
if [ $status -ne 0 ]; then
red=`tput setaf 1; tput bold`
echo "${red}${status}${c_reset} "
fi
}
prev_status_prompt () {
status=$?
if [ $status -ne 0 ]; then
@ -155,8 +165,21 @@ git_prompt () {
echo " -- $git_branch"
}
if [ "$BASH" != "" ]; then
if [ "$BASH" != "" ] && [ "$TMUX" != "" ]; then
h="\h"
if [ $HIDE_HOSTNAME = true ]; then
h=""
fi
# In tmux, hide the path and gitprompt and reduce to one line.
PS1="\n\$(prev_status_prompt_minimal)${h}󰅂 "
elif [ "$BASH" != "" ]; then
# Prompt
PS1="\n╔ \w\$(prev_status_prompt)\$(git_prompt) -- \$(date '+%y-%m-%dT%H:%m:%S')\n╚ \h\$ "
PS1="\n╔ \w\$(prev_status_prompt)\$(git_prompt) -- \$(date '+%y-%m-%dT%H:%M:%S')\n╚ \h\$ "
fi
# ble.sh
# https://github.com/akinomyoga/ble.sh#13-set-up-bashrc
[[ ${BLE_VERSION-} ]] && ble-attach
. "$HOME/.cargo/env"

8
.blerc Normal file
View File

@ -0,0 +1,8 @@
# blerc
# Cannot use ctrl+enter from inside tmux when using tmux-navigator because
# ctrl+enter and ctrl+j are the same key in the terminal. Bind sending
# multi-line commands to ctrl+m instead.
# https://github.com/microsoft/terminal/issues/6912
ble-bind -m vi_imap -f C-m accept-line

View File

@ -41,14 +41,21 @@
attributesfile = /home/tgrosinger/.gitattributes
excludesfile = /home/tgrosinger/.gitignore_global
[help]
autocorrect = prompt
[interactive]
diffFilter = delta --color-only
[push]
default = simple
autoSetupRemote = true
[diff]
colorMoved = default
algorithm = histogram
mnemonicPrefix = true
renames = true
[delta]
navigate = true
@ -59,6 +66,15 @@
[branch]
autosetuprebase = always
sort = -committerdate
[rebase]
autoSquash = true
autoStash = true
updateRefs = true
[tag]
sort = version:refname
[pull]
rebase = true
@ -73,7 +89,7 @@
insteadOf = https://gitlab.i.extrahop.com/
[merge]
conflictstyle = diff3
conflictstyle = zdiff3
[init]
defaultBranch = main
defaultBranch = main

10
.gitmux.conf Normal file
View File

@ -0,0 +1,10 @@
# https://github.com/arl/gitmux/blob/main/README.md#customizing
tmux:
layout: [branch, divergence, " - ", flags]
styles:
branch: '#[fg=cyan,bold]'
options:
branch_max_len: 25
branch_trim: right
ellipsis: …
hide_clean: true

View File

@ -1,4 +1,34 @@
customCommands:
- key: '<c-P>'
context: 'global'
command: 'git push --force-with-lease'
description: 'Force push with lease.'
os:
editPreset: "vscode"
gui:
timeFormat: '2006-01-02'
nerdFontsVersion: '3'
mouseEvents: false
theme:
activeBorderColor:
- '#40a02b'
- bold
inactiveBorderColor:
- '#6c6f85'
optionsTextColor:
- '#1e66f5'
selectedLineBgColor:
- '#ccd0da'
cherryPickedCommitBgColor:
- '#bcc0cc'
cherryPickedCommitFgColor:
- '#40a02b'
unstagedChangesColor:
- '#d20f39'
defaultFgColor:
- '#4c4f69'
searchingActiveBorderColor:
- '#df8e1d'
authorColors:
'*': '#7287fd'

View File

@ -1,27 +1,43 @@
set-option -g status on
set-option -g status-position top
set-option -g status-interval 2
set-option -g renumber-windows on
set-option -g history-limit 10000
set -s escape-time 0
### Fix supporting italics
set -g default-terminal "tmux"
### Use the system clipboard
set -g set-clipboard on
### Reload the config with r
bind-key r source-file ~/.tmux.conf\; display-message "Reloaded config"
### Toggle Mouse Mode
bind-key m set-window-option mouse\; display-message "mouse support is now #{?mouse,on,off}"
### Open LazyGit in a popup
bind-key g display-popup -E -d '#{pane_current_path}' -w 90% -h 90% lazygit
# New panes and windows have same cwd as the one opening it
bind c new-window -c "#{pane_current_path}"
bind '"' split-window -c "#{pane_current_path}"
bind % split-window -h -c "#{pane_current_path}"
### vim/tmux navigation
### https://github.com/christoomey/vim-tmux-navigator
set -g focus-events on
is_vim='echo "#{pane_current_command}" | grep -iqE "(^|\/)g?(view|n?vim?)(diff)?$"'
bind -n C-Left if-shell "$is_vim" "send-keys C-h" "select-pane -L"
bind -n C-Down if-shell "$is_vim" "send-keys C-j" "select-pane -D"
bind -n C-Up if-shell "$is_vim" "send-keys C-k" "select-pane -U"
bind -n C-Right if-shell "$is_vim" "send-keys C-l" "select-pane -R"
is_vim="ps -o state= -o comm= -t '#{pane_tty}' \
| grep -iqE '^[^TXZ ]+ +(\\S+\\/)?g?(view|l?n?vim?x?|fzf)(diff)?$'"
bind-key -n 'C-h' if-shell "$is_vim" 'send-keys C-h' 'select-pane -L'
bind-key -n 'C-j' if-shell "$is_vim" 'send-keys C-j' 'select-pane -D'
bind-key -n 'C-k' if-shell "$is_vim" 'send-keys C-k' 'select-pane -U'
bind-key -n 'C-l' if-shell "$is_vim" 'send-keys C-l' 'select-pane -R'
bind-key -T copy-mode-vi 'C-h' select-pane -L
bind-key -T copy-mode-vi 'C-j' select-pane -D
bind-key -T copy-mode-vi 'C-k' select-pane -U
bind-key -T copy-mode-vi 'C-l' select-pane -R
# change windows
bind -n S-Right next-window
@ -30,13 +46,6 @@ bind -n S-Left previous-window
set -g base-index 1 # Windows start at index 1
setw -g pane-base-index 1 # Panes start at index 1
#### Color Scheme
set-option -g status-justify "centre"
set-option -g status-bg colour238 #grey
set-option -g status-fg yellow #yellow
set-option -g window-status-current-style bold
set-option -g display-panes-colour brightred #orange
# clock
set-window-option -g clock-mode-colour green #green
set -g status-right '#(date "+%%Y-%m-%d %%H:%%M:%%S")'
@ -44,7 +53,27 @@ set -g status-right '#(date "+%%Y-%m-%d %%H:%%M:%%S")'
# bell
set-window-option -g window-status-bell-style fg=white,bg=red #base2, red
# Color Scheme
set -g @catppuccin_flavour 'latte'
set -g @catppuccin_window_left_separator ""
set -g @catppuccin_window_middle_separator ""
set -g @catppuccin_window_right_separator "█ "
set -g @catppuccin_window_default_text "#W"
set -g @catppuccin_window_default_fill "number"
set -g @catppuccin_window_current_text "#W#{?window_zoomed_flag,  ,}"
set -g @catppuccin_window_current_fill "number"
set -g @catppuccin_status_modules_right "directory gitmux session"
set -g @catppuccin_directory_text "#( echo \#{pane_current_path} | sed \"s|$HOME|~|\" )"
set -g @catppuccin_gitmux_text "#(gitmux -cfg $HOME/.gitmux.conf \"#{pane_current_path}\")"
set -g @catppuccin_status_left_separator " "
set -g @catppuccin_status_fill "icon"
set -g @catppuccin_window_status_enable "no"
set-option -g terminal-overrides ',xterm*:Cr=\E]12;gray\007'
set -ga terminal-overrides ",xterm-256color:Tc"
# List of plugins
set -g @plugin 'tmux-plugins/tpm'
set -g @plugin 'tmux-plugins/tmux-sensible'
set -g @plugin 'catppuccin/tmux'
# Initialize TMUX plugin manager (keep this line at the very bottom of tmux.conf)
run '~/.tmux/plugins/tpm/tpm'

13
atuin.toml Normal file
View File

@ -0,0 +1,13 @@
# https://docs.atuin.sh/configuration/config/
workspaces = true
keymap_mode = "auto"
enter_accept = true
history_filter = [
"^cd$",
"^lg$",
"^ls$",
"^clear$",
"^vim$",
]

View File

@ -1 +0,0 @@
bat-0.24.0

Binary file not shown.

View File

@ -1 +0,0 @@
delta-0.15.1

Binary file not shown.

View File

@ -1 +0,0 @@
difft-0.38.0

Binary file not shown.

View File

@ -1 +0,0 @@
dive-0.10.0

Binary file not shown.

View File

@ -1 +0,0 @@
eza-0.11.0

Binary file not shown.

1
bin/linux/gitmux Symbolic link
View File

@ -0,0 +1 @@
gitmux_v0.11.2

BIN
bin/linux/gitmux_v0.11.2 Executable file

Binary file not shown.

View File

@ -1 +0,0 @@
gron-0.7.1

Binary file not shown.

View File

@ -1 +0,0 @@
jq-1.7

Binary file not shown.

View File

@ -1 +0,0 @@
lazygit-0.39.3

Binary file not shown.

View File

@ -62,6 +62,13 @@ function performSetup() {
mkdir -p ~/.config/lazygit
ln -fns ${DOTFILES_DIR}/.lazygit ~/.config/lazygit/config.yml
echo "Linking Atuin..."
mkdir -p ~/.config/atuin
ln -fns ${DOTFILES_DIR}/atuin.toml ~/.config/atuin/config.toml
echo "Linking Ble.sh..."
linkFile ".blerc"
echo "Linking tmux..."
linkFile ".tmux.conf"
@ -71,12 +78,39 @@ function performSetup() {
echo "Installing tmux plugins"
git clone https://github.com/tmux-plugins/tpm ~/.tmux/plugins/tpm
echo "Linking gitmux..."
linkFile ".gitmux.conf"
echo "Linking neovim config"
ln -fns ${DOTFILES_DIR}/nvim ~/.config/nvim
echo "Installing homebrew"
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
if [[ "${OSTYPE}" == "darwin"* ]]; then
brew install rsync rga pandoc poppler tesseract tmux ledger
brew install tmux
else
sudo apt install visidata
sudo apt install build-essential visidata
fi
# NOTE: Do not brew install anything with a dependency on node.
# Instead, install with npm -g.
brew install \
gcc \
tmux neovim \
eza bat fzf ripgrep fd jq gron \
hadolint \
git lazygit git-delta \
crane dive \
go sqlite \
stripe-cli restic \
deno pnpm
npm install -g @devcontainers/cli
npm install -g mjml
npm install -g jsonlint
popd > /dev/null
}

8
nvim/.gitignore vendored Normal file
View File

@ -0,0 +1,8 @@
tt.*
.tests
doc/tags
debug
.repro
foo.*
*.log
data

15
nvim/.neoconf.json Normal file
View File

@ -0,0 +1,15 @@
{
"neodev": {
"library": {
"enabled": true,
"plugins": true
}
},
"neoconf": {
"plugins": {
"lua_ls": {
"enabled": true
}
}
}
}

2
nvim/init.lua Normal file
View File

@ -0,0 +1,2 @@
-- bootstrap lazy.nvim, LazyVim and your plugins
require("config.lazy")

58
nvim/lazy-lock.json Normal file
View File

@ -0,0 +1,58 @@
{
"CopilotChat.nvim": { "branch": "main", "commit": "df550ff3f9f2d028160946d674db08dad432fdd3" },
"LazyVim": { "branch": "main", "commit": "3f034d0a7f58031123300309f2efd3bb0356ee21" },
"SchemaStore.nvim": { "branch": "main", "commit": "d307d291f38678d064cb987112926df6d9134de3" },
"blink-cmp-copilot": { "branch": "main", "commit": "439cff78780c033aa23cf061d7315314b347e3c1" },
"blink.cmp": { "branch": "main", "commit": "49f211fe5d729df53df4c042d7c3464cf47d199e" },
"bufferline.nvim": { "branch": "main", "commit": "655133c3b4c3e5e05ec549b9f8cc2894ac6f51b3" },
"catppuccin": { "branch": "main", "commit": "5b5e3aef9ad7af84f463d17b5479f06b87d5c429" },
"conform.nvim": { "branch": "master", "commit": "f9ef25a7ef00267b7d13bfc00b0dea22d78702d5" },
"copilot.lua": { "branch": "master", "commit": "535ebb53880ae67e33d9e50b503d25f9ef3ca06c" },
"crates.nvim": { "branch": "main", "commit": "fd2bbca7aa588f24ffc3517831934b4c4a9588e9" },
"flash.nvim": { "branch": "main", "commit": "3c942666f115e2811e959eabbdd361a025db8b63" },
"focus.nvim": { "branch": "master", "commit": "d76338e58e49f844e8f6a7aff16a74a2a55a80ef" },
"friendly-snippets": { "branch": "main", "commit": "efff286dd74c22f731cdec26a70b46e5b203c619" },
"gitsigns.nvim": { "branch": "main", "commit": "7010000889bfb6c26065e0b0f7f1e6aa9163edd9" },
"grug-far.nvim": { "branch": "main", "commit": "00fa27119620bc2314d560d0d11aac936a183abb" },
"lazy.nvim": { "branch": "main", "commit": "6c3bda4aca61a13a9c63f1c1d1b16b9d3be90d7a" },
"lazydev.nvim": { "branch": "main", "commit": "2367a6c0a01eb9edb0464731cc0fb61ed9ab9d2c" },
"lualine.nvim": { "branch": "master", "commit": "1517caa8fff05e4b4999857319d3b0609a7f57fa" },
"markdown-preview.nvim": { "branch": "master", "commit": "a923f5fc5ba36a3b17e289dc35dc17f66d0548ee" },
"mason-lspconfig.nvim": { "branch": "main", "commit": "1a31f824b9cd5bc6f342fc29e9a53b60d74af245" },
"mason-nvim-dap.nvim": { "branch": "main", "commit": "ea387e0819ab189d536bb4067e4d8ece3801a292" },
"mason.nvim": { "branch": "main", "commit": "fc98833b6da5de5a9c5b1446ac541577059555be" },
"mini.ai": { "branch": "main", "commit": "978ffc65c6b513fde9ef075326d34d89197f1ea5" },
"mini.icons": { "branch": "main", "commit": "86a633f0dffcfd80110bac86681dbf4b5c37ba5c" },
"mini.pairs": { "branch": "main", "commit": "b90e36aa5ca5e0d825e77ad67aac22214a4d9096" },
"mini.surround": { "branch": "main", "commit": "c92d262deae79545b7674b2069332116461a85f3" },
"neotest": { "branch": "master", "commit": "dddbe8fe358b05b2b7e54fe4faab50563171a76d" },
"neotest-golang": { "branch": "main", "commit": "5650ad9d19d05167ae994a9f63f5c34efdafc246" },
"neotest-jest": { "branch": "main", "commit": "514fd4eae7da15fd409133086bb8e029b65ac43f" },
"noice.nvim": { "branch": "main", "commit": "0427460c2d7f673ad60eb02b35f5e9926cf67c59" },
"nui.nvim": { "branch": "main", "commit": "8d3bce9764e627b62b07424e0df77f680d47ffdb" },
"nvim-ansible": { "branch": "main", "commit": "bba61168b7aef735e7f950fdfece5ef6c388eacf" },
"nvim-dap": { "branch": "master", "commit": "6a5bba0ddea5d419a783e170c20988046376090d" },
"nvim-dap-go": { "branch": "main", "commit": "8763ced35b19c8dc526e04a70ab07c34e11ad064" },
"nvim-dap-ui": { "branch": "master", "commit": "bc81f8d3440aede116f821114547a476b082b319" },
"nvim-dap-virtual-text": { "branch": "master", "commit": "df66808cd78b5a97576bbaeee95ed5ca385a9750" },
"nvim-lint": { "branch": "master", "commit": "93b8040115c9114dac1047311763bef275e752dc" },
"nvim-lspconfig": { "branch": "master", "commit": "85e0dd26b710e834a105d679200d01e326a3d2b0" },
"nvim-nio": { "branch": "master", "commit": "21f5324bfac14e22ba26553caf69ec76ae8a7662" },
"nvim-treesitter": { "branch": "master", "commit": "da5825bf70cc2ea7eacd1e60c32c07baf19adeba" },
"nvim-treesitter-textobjects": { "branch": "master", "commit": "9937e5e356e5b227ec56d83d0a9d0a0f6bc9cad4" },
"nvim-ts-autotag": { "branch": "main", "commit": "a1d526af391f6aebb25a8795cbc05351ed3620b5" },
"persistence.nvim": { "branch": "main", "commit": "166a79a55bfa7a4db3e26fc031b4d92af71d0b51" },
"plenary.nvim": { "branch": "master", "commit": "857c5ac632080dba10aae49dba902ce3abf91b35" },
"render-markdown.nvim": { "branch": "main", "commit": "c91fa46fc8d79f5577beac70a459f30ec17a60c2" },
"rustaceanvim": { "branch": "master", "commit": "1486b5a2cc0de646d6d0837ec77127c9d6e2c50f" },
"snacks.nvim": { "branch": "main", "commit": "bc0630e43be5699bb94dadc302c0d21615421d93" },
"todo-comments.nvim": { "branch": "main", "commit": "304a8d204ee787d2544d8bc23cd38d2f929e7cc5" },
"tokyonight.nvim": { "branch": "main", "commit": "057ef5d260c1931f1dffd0f052c685dcd14100a3" },
"trouble.nvim": { "branch": "main", "commit": "85bedb7eb7fa331a2ccbecb9202d8abba64d37b3" },
"ts-comments.nvim": { "branch": "main", "commit": "1bd9d0ba1d8b336c3db50692ffd0955fe1bb9f0c" },
"vim-dadbod": { "branch": "master", "commit": "9f0ca8bcef704659820a95c3bbd2c262583a66a1" },
"vim-dadbod-completion": { "branch": "master", "commit": "a8dac0b3cf6132c80dc9b18bef36d4cf7a9e1fe6" },
"vim-dadbod-ui": { "branch": "master", "commit": "685e75b34ee0e12f92ec4507ea8bb7f1aaa936e5" },
"vim-tmux-navigator": { "branch": "master", "commit": "791dacfcfc8ccb7f6eb1c853050883b03e5a22fe" },
"which-key.nvim": { "branch": "main", "commit": "370ec46f710e058c9c1646273e6b225acf47cbed" }
}

26
nvim/lazyvim.json Normal file
View File

@ -0,0 +1,26 @@
{
"extras": [
"lazyvim.plugins.extras.ai.copilot",
"lazyvim.plugins.extras.ai.copilot-chat",
"lazyvim.plugins.extras.coding.mini-surround",
"lazyvim.plugins.extras.dap.core",
"lazyvim.plugins.extras.formatting.prettier",
"lazyvim.plugins.extras.lang.ansible",
"lazyvim.plugins.extras.lang.go",
"lazyvim.plugins.extras.lang.json",
"lazyvim.plugins.extras.lang.markdown",
"lazyvim.plugins.extras.lang.rust",
"lazyvim.plugins.extras.lang.sql",
"lazyvim.plugins.extras.lang.svelte",
"lazyvim.plugins.extras.lang.tailwind",
"lazyvim.plugins.extras.lang.typescript",
"lazyvim.plugins.extras.lang.yaml",
"lazyvim.plugins.extras.linting.eslint",
"lazyvim.plugins.extras.test.core"
],
"install_version": 8,
"news": {
"NEWS.md": "10960"
},
"version": 8
}

View File

@ -0,0 +1,8 @@
-- Autocmds are automatically loaded on the VeryLazy event
-- Default autocmds that are always set: https://github.com/LazyVim/LazyVim/blob/main/lua/lazyvim/config/autocmds.lua
--
-- Add any additional autocmds here
-- with `vim.api.nvim_create_autocmd`
--
-- Or remove existing autocmds by their group name (which is prefixed with `lazyvim_` for the defaults)
-- e.g. vim.api.nvim_del_augroup_by_name("lazyvim_wrap_spell")

View File

@ -0,0 +1,3 @@
-- Keymaps are automatically loaded on the VeryLazy event
-- Default keymaps that are always set: https://github.com/LazyVim/LazyVim/blob/main/lua/lazyvim/config/keymaps.lua
-- Add any additional keymaps here

53
nvim/lua/config/lazy.lua Normal file
View File

@ -0,0 +1,53 @@
local lazypath = vim.fn.stdpath("data") .. "/lazy/lazy.nvim"
if not (vim.uv or vim.loop).fs_stat(lazypath) then
local lazyrepo = "https://github.com/folke/lazy.nvim.git"
local out = vim.fn.system({ "git", "clone", "--filter=blob:none", "--branch=stable", lazyrepo, lazypath })
if vim.v.shell_error ~= 0 then
vim.api.nvim_echo({
{ "Failed to clone lazy.nvim:\n", "ErrorMsg" },
{ out, "WarningMsg" },
{ "\nPress any key to exit..." },
}, true, {})
vim.fn.getchar()
os.exit(1)
end
end
vim.opt.rtp:prepend(lazypath)
require("lazy").setup({
spec = {
-- add LazyVim and import its plugins
{ "LazyVim/LazyVim", import = "lazyvim.plugins" },
-- import/override with your plugins
{ import = "plugins" },
},
defaults = {
-- By default, only LazyVim plugins will be lazy-loaded. Your custom plugins will load during startup.
-- If you know what you're doing, you can set this to `true` to have all your custom plugins lazy-loaded by default.
lazy = false,
-- It's recommended to leave version=false for now, since a lot the plugin that support versioning,
-- have outdated releases, which may break your Neovim install.
version = false, -- always use the latest git commit
-- version = "*", -- try installing the latest stable version for plugins that support semver
},
install = { colorscheme = { "catppuccin-latte" } },
checker = {
enabled = true, -- check for plugin updates periodically
notify = false, -- notify on update
}, -- automatically check for plugin updates
performance = {
rtp = {
-- disable some rtp plugins
disabled_plugins = {
"gzip",
-- "matchit",
-- "matchparen",
-- "netrwPlugin",
"tarPlugin",
"tohtml",
"tutor",
"zipPlugin",
},
},
},
})

View File

@ -0,0 +1,9 @@
-- Options are automatically loaded before lazy.nvim startup
-- Default options that are always set: https://github.com/LazyVim/LazyVim/blob/main/lua/lazyvim/config/options.lua
-- Add any additional options here
-- Minimal number of screen lines to keep above and below the cursor.
vim.opt.scrolloff = 10
-- Only run prettier in directories where there is a config file.
vim.g.lazyvim_prettier_needs_config = true

View File

@ -0,0 +1,6 @@
return {
"LazyVim/LazyVim",
opts = {
colorscheme = "catppuccin-latte",
},
}

View File

@ -0,0 +1,197 @@
-- since this is just an example spec, don't actually load anything here and return an empty spec
-- stylua: ignore
if true then return {} end
-- every spec file under the "plugins" directory will be loaded automatically by lazy.nvim
--
-- In your plugin files, you can:
-- * add extra plugins
-- * disable/enabled LazyVim plugins
-- * override the configuration of LazyVim plugins
return {
-- add gruvbox
{ "ellisonleao/gruvbox.nvim" },
-- Configure LazyVim to load gruvbox
{
"LazyVim/LazyVim",
opts = {
colorscheme = "gruvbox",
},
},
-- change trouble config
{
"folke/trouble.nvim",
-- opts will be merged with the parent spec
opts = { use_diagnostic_signs = true },
},
-- disable trouble
{ "folke/trouble.nvim", enabled = false },
-- override nvim-cmp and add cmp-emoji
{
"hrsh7th/nvim-cmp",
dependencies = { "hrsh7th/cmp-emoji" },
---@param opts cmp.ConfigSchema
opts = function(_, opts)
table.insert(opts.sources, { name = "emoji" })
end,
},
-- change some telescope options and a keymap to browse plugin files
{
"nvim-telescope/telescope.nvim",
keys = {
-- add a keymap to browse plugin files
-- stylua: ignore
{
"<leader>fp",
function() require("telescope.builtin").find_files({ cwd = require("lazy.core.config").options.root }) end,
desc = "Find Plugin File",
},
},
-- change some options
opts = {
defaults = {
layout_strategy = "horizontal",
layout_config = { prompt_position = "top" },
sorting_strategy = "ascending",
winblend = 0,
},
},
},
-- add pyright to lspconfig
{
"neovim/nvim-lspconfig",
---@class PluginLspOpts
opts = {
---@type lspconfig.options
servers = {
-- pyright will be automatically installed with mason and loaded with lspconfig
pyright = {},
},
},
},
-- add tsserver and setup with typescript.nvim instead of lspconfig
{
"neovim/nvim-lspconfig",
dependencies = {
"jose-elias-alvarez/typescript.nvim",
init = function()
require("lazyvim.util").lsp.on_attach(function(_, buffer)
-- stylua: ignore
vim.keymap.set( "n", "<leader>co", "TypescriptOrganizeImports", { buffer = buffer, desc = "Organize Imports" })
vim.keymap.set("n", "<leader>cR", "TypescriptRenameFile", { desc = "Rename File", buffer = buffer })
end)
end,
},
---@class PluginLspOpts
opts = {
---@type lspconfig.options
servers = {
-- tsserver will be automatically installed with mason and loaded with lspconfig
tsserver = {},
},
-- you can do any additional lsp server setup here
-- return true if you don't want this server to be setup with lspconfig
---@type table<string, fun(server:string, opts:_.lspconfig.options):boolean?>
setup = {
-- example to setup with typescript.nvim
tsserver = function(_, opts)
require("typescript").setup({ server = opts })
return true
end,
-- Specify * to use this function as a fallback for any server
-- ["*"] = function(server, opts) end,
},
},
},
-- for typescript, LazyVim also includes extra specs to properly setup lspconfig,
-- treesitter, mason and typescript.nvim. So instead of the above, you can use:
{ import = "lazyvim.plugins.extras.lang.typescript" },
-- add more treesitter parsers
{
"nvim-treesitter/nvim-treesitter",
opts = {
ensure_installed = {
"bash",
"html",
"javascript",
"json",
"lua",
"markdown",
"markdown_inline",
"python",
"query",
"regex",
"tsx",
"typescript",
"vim",
"yaml",
},
},
},
-- since `vim.tbl_deep_extend`, can only merge tables and not lists, the code above
-- would overwrite `ensure_installed` with the new value.
-- If you'd rather extend the default config, use the code below instead:
{
"nvim-treesitter/nvim-treesitter",
opts = function(_, opts)
-- add tsx and treesitter
vim.list_extend(opts.ensure_installed, {
"tsx",
"typescript",
})
end,
},
-- the opts function can also be used to change the default opts:
{
"nvim-lualine/lualine.nvim",
event = "VeryLazy",
opts = function(_, opts)
table.insert(opts.sections.lualine_x, {
function()
return "😄"
end,
})
end,
},
-- or you can return new options to override all the defaults
{
"nvim-lualine/lualine.nvim",
event = "VeryLazy",
opts = function()
return {
--[[add your custom lualine config here]]
}
end,
},
-- use mini.starter instead of alpha
{ import = "lazyvim.plugins.extras.ui.mini-starter" },
-- add jsonls and schemastore packages, and setup treesitter for json, json5 and jsonc
{ import = "lazyvim.plugins.extras.lang.json" },
-- add any tools you want to have installed below
{
"williamboman/mason.nvim",
opts = {
ensure_installed = {
"stylua",
"shellcheck",
"shfmt",
"flake8",
},
},
},
}

View File

@ -0,0 +1,48 @@
-- Resize window to prioritize the focused on.
-- https://github.com/nvim-focus/focus.nvim
return {
"nvim-focus/focus.nvim",
event = "VeryLazy",
opts = {
enable = true,
ui = {
-- Display line numbers in the focused window only.
hybridnumber = true,
-- Display signcolumn in the focused window only.
signcolumn = true,
},
},
config = function()
require("focus").setup({})
local ignore_buftypes = { "dbui", "nofile" }
local ignore_filetypes =
{ "dbui", "dapui_breakpoints", "dapui_stacks", "dapui_scopes", "dap_repl", "dapui_console" }
local augroup = vim.api.nvim_create_augroup("FocusDisable", { clear = true })
vim.api.nvim_create_autocmd("WinEnter", {
group = augroup,
callback = function(_)
if vim.tbl_contains(ignore_buftypes, vim.bo.buftype) then
vim.w.focus_disable = true
else
vim.w.focus_disable = false
end
end,
desc = "Disable focus autoresize for BufType",
})
vim.api.nvim_create_autocmd("FileType", {
group = augroup,
callback = function(_)
if vim.tbl_contains(ignore_filetypes, vim.bo.filetype) then
vim.b.focus_disable = true
else
vim.b.focus_disable = false
end
end,
desc = "Disable focus autoresize for FileType",
})
end,
}

View File

@ -0,0 +1,12 @@
return {
{
"nvim-lualine/lualine.nvim",
opts = function(_, opts)
-- Remove the git branch because it's already shown in tmux.
table.remove(opts.sections.lualine_b)
-- Remove the clock because I don't want it there.
table.remove(opts.sections.lualine_z)
end,
},
}

21
nvim/lua/plugins/test.lua Normal file
View File

@ -0,0 +1,21 @@
return {
{
"nvim-neotest/neotest",
dependencies = {
"haydenmeade/neotest-jest",
},
opts = function(_, opts)
table.insert(
opts.adapters,
require("neotest-jest")({
jestCommand = "npm test",
jestConfigFile = "jest.config.ts",
-- env = { CI = true },
cwd = function()
return vim.fn.getcwd()
end,
})
)
end,
},
}

View File

@ -0,0 +1,18 @@
return {
"christoomey/vim-tmux-navigator",
cmd = {
"TmuxNavigateLeft",
"TmuxNavigateDown",
"TmuxNavigateUp",
"TmuxNavigateRight",
"TmuxNavigatePrevious",
"TmuxNavigatorProcessList",
},
keys = {
{ "<c-h>", "<cmd><C-U>TmuxNavigateLeft<cr>" },
{ "<c-j>", "<cmd><C-U>TmuxNavigateDown<cr>" },
{ "<c-k>", "<cmd><C-U>TmuxNavigateUp<cr>" },
{ "<c-l>", "<cmd><C-U>TmuxNavigateRight<cr>" },
{ "<c-\\>", "<cmd><C-U>TmuxNavigatePrevious<cr>" },
},
}

3
nvim/stylua.toml Normal file
View File

@ -0,0 +1,3 @@
indent_type = "Spaces"
indent_width = 2
column_width = 120

View File

@ -0,0 +1,306 @@
// Place your key bindings in this file to override the defaults
[
// Remove undesired defaults
{
"key": "ctrl+\\",
"command": "-workbench.action.splitEditor"
},
{
"key": "ctrl+k ctrl+\\",
"command": "-workbench.action.splitEditorOrthogonal"
},
{
"key": "ctrl+k ctrl+\\",
"command": "-workbench.action.splitEditorLeft"
},
{
"key": "ctrl+k ctrl+\\",
"command": "-workbench.action.splitEditorUp"
},
{
"key": "ctrl+k ctrl+\\",
"command": "-workbench.action.splitEditorDown"
},
{
"key": "ctrl+k ctrl+\\",
"command": "-workbench.action.splitEditorRight"
},
{
"key": "ctrl+k ctrl+left",
"command": "-workbench.action.focusLeftGroup"
},
{
"key": "ctrl+k ctrl+right",
"command": "-workbench.action.focusRightGroup"
},
{
"key": "ctrl+k ctrl+up",
"command": "-workbench.action.focusAboveGroup"
},
{
"key": "ctrl+k ctrl+down",
"command": "-workbench.action.focusBelowGroup"
},
{
"key": "ctrl+shift+`",
"command": "-workbench.action.terminal.new",
"when": "terminalProcessSupported || terminalWebExtensionContributedProfile"
},
{
"key": "ctrl+t",
"command": "-workbench.action.showAllSymbols"
},
{
"key": "ctrl+j",
"command": "-workbench.action.togglePanel"
},
{
"key": "ctrl+`",
"command": "-workbench.action.terminal.toggleTerminal",
"when": "terminal.active"
},
{
"key": "ctrl+p",
"command": "-extension.vim_ctrl+p",
"when": "editorTextFocus && vim.active && vim.use<C-p> && !inDebugRepl || vim.active && vim.use<C-p> && !inDebugRepl && vim.mode == 'CommandlineInProgress' || vim.active && vim.use<C-p> && !inDebugRepl && vim.mode == 'SearchInProgressMode'"
},
{
"key": "ctrl+h",
"command": "-extension.vim_ctrl+h",
"when": "editorTextFocus && vim.active && vim.use<C-h> && !inDebugRepl"
},
{
"key": "ctrl+l",
"command": "-extension.vim_navigateCtrlL",
"when": "editorTextFocus && vim.active && vim.use<C-l> && !inDebugRepl"
},
{
"key": "ctrl+p",
"command": "-workbench.action.quickOpen"
},
{
"key": "ctrl+e",
"command": "-workbench.action.quickOpen"
},
{
"key": "ctrl+f12",
"command": "-editor.action.revealDefinition",
"when": "editorHasDefinitionProvider && editorTextFocus && isWeb"
},
{
"key": "f12",
"command": "-editor.action.revealDefinition",
"when": "editorHasDefinitionProvider && editorTextFocus"
},
{
"key": "ctrl+shift+m",
"command": "-workbench.actions.view.problems",
"when": "workbench.panel.markers.view.active"
},
{
"key": "alt+left",
"command": "-workbench.action.navigateBack",
"when": "canNavigateBack"
},
{
"key": "alt+right",
"command": "-workbench.action.navigateForward",
"when": "canNavigateForward && editorTextFocus && vim.active"
},
// Editing
{
"key": "shift+k",
"command": "editor.action.showHover",
"when": "editorTextFocus && vim.active && vim.mode != 'Insert'"
},
{
"key": "escape",
"command": "workbench.action.closeSidebar",
"when": "sideBarVisible"
},
// Editor pane navigation and management
{
"key": "ctrl+k",
"command": "workbench.action.focusAboveGroup",
"when": "editorTextFocus && vim.active && !inDebugRepl"
},
{
"key": "ctrl+j",
"command": "workbench.action.focusBelowGroup",
"when": "editorTextFocus && vim.active && !inDebugRepl"
},
{
"key": "ctrl+h",
"command": "workbench.action.focusLeftGroup",
"when": "editorTextFocus && vim.active && !inDebugRepl"
},
{
"key": "ctrl+l",
"command": "workbench.action.focusRightGroup",
"when": "editorTextFocus && vim.active && !inDebugRepl"
},
{
"key": "ctrl+b shift+5",
"command": "workbench.action.newGroupRight",
"when": "editorTextFocus"
},
{
"key": "ctrl+b shift+'",
"command": "workbench.action.newGroupBelow",
"when": "editorTextFocus"
},
{
"key": "ctrl+b z",
"command": "workbench.action.toggleEditorWidths",
"when": "editorTextFocus"
},
// Terminal Tmux pane navigation and management
{
"key": "ctrl+t",
"command": "workbench.action.terminal.toggleTerminal",
"when": "terminal.active"
},
{
"key": "ctrl+shift+`",
"command": "workbench.action.toggleMaximizedPanel"
},
// These escape codes allow sending keyboard shortcuts to tmux
// when normally vs-code would not send any chorded keyboard shortcuts.
// It also is setup so that these keyboard shortcuts work in both the editor
// and the terminal, but have different commands.
// Resources:
// - https://code.visualstudio.com/docs/terminal/advanced#_custom-sequence-keybindings
// - https://stackoverflow.com/questions/61742559/need-vscode-sendsequence-keybindings-for-previous-command-next-command-move-to
// - https://gist.github.com/riipandi/2f304a1cbf7615a8f912473b5f4a7cc3
// - `showkey -a`
{
"key": "ctrl+b p",
"command": "workbench.action.terminal.sendSequence",
"args": {
"text": "\u0002\u0070"
},
"when": "terminalFocus"
},
{
"key": "ctrl+b n",
"command": "workbench.action.terminal.sendSequence",
"args": {
"text": "\u0002\u006e"
},
"when": "terminalFocus"
},
{
"key": "ctrl+b d",
"command": "workbench.action.terminal.sendSequence",
"args": {
"text": "\u0002\u0064"
},
"when": "terminalFocus"
},
{
"key": "ctrl+k",
"command": "workbench.action.terminal.sendSequence",
"args": {
"text": "\u0002\u001b[A"
},
"when": "terminalFocus"
},
{
"key": "ctrl+j",
"command": "workbench.action.terminal.sendSequence",
"args": {
"text": "\u0002\u001b[B"
},
"when": "terminalFocus"
},
{
"key": "ctrl+h",
"command": "workbench.action.terminal.sendSequence",
"args": {
"text": "\u0002\u001b[D"
},
"when": "terminalFocus"
},
{
"key": "ctrl+l",
"command": "workbench.action.terminal.sendSequence",
"args": {
"text": "\u0002\u001b[C"
},
"when": "terminalFocus"
},
{
"key": "ctrl+b shift+5",
"command": "workbench.action.terminal.sendSequence",
"args": {
"text": "\u0002\u0025"
},
"when": "terminalFocus"
},
{
"key": "ctrl+b shift+'",
"command": "workbench.action.terminal.sendSequence",
"args": {
"text": "\u0002\u0022"
},
"when": "terminalFocus"
},
{
"key": "ctrl+b ,",
"command": "workbench.action.terminal.sendSequence",
"args": {
"text": "\u0002\u002c"
},
"when": "terminalFocus"
},
{
"key": "ctrl+b shift+;",
"command": "workbench.action.terminal.sendSequence",
"args": {
"text": "\u0002\u003a"
},
"when": "terminalFocus"
},
{
"key": "ctrl+b c",
"command": "workbench.action.terminal.sendSequence",
"args": {
"text": "\u0002\u0063"
},
"when": "terminalFocus"
},
{
"key": "ctrl+b [",
"command": "workbench.action.terminal.sendSequence",
"args": {
"text": "\u0002\u005b"
},
"when": "terminalFocus"
},
{
"key": "ctrl+b z",
"command": "workbench.action.terminal.sendSequence",
"args": {
"text": "\u0002\u007a"
},
"when": "terminalFocus"
},
{
"key": "ctrl+b g",
"command": "workbench.action.terminal.sendSequence",
"args": {
"text": "\u0002\u0067"
},
"when": "terminalFocus"
},
{
"key": "ctrl+o",
"command": "workbench.action.navigateBack",
"when": "canNavigateBack"
},
{
"key": "ctrl+i",
"command": "workbench.action.navigateForward",
"when": "canNavigateForward && editorTextFocus && vim.active"
}
]

194
vs-code/user-settings.json Normal file
View File

@ -0,0 +1,194 @@
{
//
// Languages
//
"[html]": {
"editor.defaultFormatter": "vscode.html-language-features"
},
"[javascript]": {
"editor.defaultFormatter": "vscode.typescript-language-features"
},
"[json]": {
"editor.defaultFormatter": "vscode.json-language-features"
},
"[jsonc]": {
"editor.defaultFormatter": "vscode.json-language-features"
},
"[templ]": {
"editor.defaultFormatter": "a-h.templ"
},
"[typescript]": {
"editor.codeActionsOnSave": {
"source.fixAll.eslint": "explicit"
},
"editor.defaultFormatter": "vscode.typescript-language-features"
},
"[typescriptreact]": {
"editor.defaultFormatter": "vscode.typescript-language-features"
},
"emmet.includeLanguages": {
"templ": "html"
},
"go.buildTags": "unit",
"go.toolsManagement.autoUpdate": true,
"gopls": {
// Supported by Catppuccin
"ui.semanticTokens": true,
"build.buildFlags": [
"-tags=unit"
]
},
"javascript.updateImportsOnFileMove.enabled": "always",
"tailwindCSS.includeLanguages": {
"templ": "html"
},
"typescript.updateImportsOnFileMove.enabled": "always",
//
// Remote Settings
//
"dev.containers.dockerPath": "docker",
"dev.containers.executeInWSL": true,
"dotfiles.installCommand": "install.sh",
"dotfiles.repository": "https://github.com/tgrosinger/dotfiles.git",
"dotfiles.targetPath": "~/.dotfiles",
//
// Fonts and Appearance
//
"editor.fontFamily": "JetBrainsMono Nerd Font, JetBrains Mono, 'Courier New', monospace",
"editor.fontLigatures": true,
//
// Theme
//
"editor.semanticHighlighting.enabled": true,
// prevent VSCode from modifying the terminal colors
"terminal.integrated.minimumContrastRatio": 1,
// make the window's titlebar use the workbench colors
"window.titleBarStyle": "custom",
//
// Editor Behavior
//
"diffEditor.experimental.showMoves": true,
"editor.accessibilitySupport": "off",
"editor.formatOnSave": true,
"editor.guides.bracketPairs": "active",
"editor.lineNumbers": "relative",
"editor.linkedEditing": true,
"editor.minimap.enabled": false,
"editor.renderWhitespace": "trailing",
"editor.stickyScroll.enabled": true,
"editor.wordWrap": "off",
"files.associations": {
"*.gohtml": "html"
},
"git.ignoreMissingGitWarning": true,
"githubPullRequests.pullBranch": "never",
"githubPullRequests.terminalLinksHandler": "github",
//
// GitLens
//
"gitlens.advanced.telemetry.enabled": false,
"gitlens.hovers.currentLine.over": "line",
"gitlens.telemetry.enabled": false,
"remote.autoForwardPortsSource": "hybrid",
"remote.containers.dotfiles.installCommand": "install.sh",
"remote.containers.dotfiles.repository": "https://github.com/tgrosinger/dotfiles.git",
"remote.containers.dotfiles.targetPath": "~/.dotfiles",
"scm.workingSets.enabled": true,
"settingsSync.ignoredExtensions": [
"bradlc.vscode-tailwindcss"
],
//
// Telemetry
//
"telemetry.telemetryLevel": "off",
"workbench.enableExperiments": false,
"workbench.settings.enableNaturalLanguageSearch": false,
"extensions.ignoreRecommendations": true,
//
// Vim
//
"vim.leader": " ",
"vim.handleKeys": {
// ctrl-o functionality in the plugin is not very reliable or predictable.
"<C-o>": false
},
"vim.normalModeKeyBindings": [
{
"before": [
"leader",
"n"
],
"commands": [
"editor.action.rename"
]
},
{
"before": [
"leader",
"s",
"f"
],
"commands": [
"workbench.action.quickOpen"
]
},
{
"before": [
"leader",
"s",
"g"
],
"commands": [
"workbench.action.findInFiles"
]
},
{
"before": [
"leader",
"g",
"r"
],
"commands": [
"editor.action.goToReferences"
]
},
{
"before": [
"leader",
"r",
"n"
],
"commands": [
"editor.action.rename"
]
},
{
"before": [
"leader",
"q"
],
"commands": [
"workbench.actions.view.problems"
]
},
{
"before": [
"leader",
"c",
"a"
],
"commands": [
"editor.action.quickFix"
]
}
],
//
// Window
//
"window.newWindowDimensions": "inherit",
"workbench.colorTheme": "Catppuccin Latte",
"workbench.editor.empty.hint": "hidden",
"workbench.sideBar.location": "right",
"workbench.iconTheme": "catppuccin-latte",
"lazygit-vscode.autoMaximizeWindow": true
}