From c4c20c16788a722ec22176c5b9bd7bb10d5f3212 Mon Sep 17 00:00:00 2001 From: Michael Yockey Date: Sat, 23 Mar 2024 19:26:21 -0400 Subject: [PATCH] Adding TMUX I'm also a full-time dark mode user now, it seems. --- README.md | 2 +- dependencies/homebrew.txt | 1 + install.zsh | 6 +++++ nvim/.config/nvim/lazy-lock.json | 20 ++++++++-------- nvim/.config/nvim/lua/yock/plugins/colors.lua | 23 +++++++----------- .../lua/yock/plugins/nvim-tmux-navigator.lua | 13 ++++++++++ .../nvim/lua/yock/plugins/treesitter.lua | 2 +- nvim/.config/nvim/lua/yock/remap.lua | 7 ------ tmux/.config/tmux/plugins/tmux | 1 + tmux/.config/tmux/plugins/tmux-dark-notify | 1 + tmux/.config/tmux/plugins/tmux-sensible | 1 + tmux/.config/tmux/plugins/tpm | 1 + tmux/.config/tmux/plugins/vim-tmux-navigator | 1 + tmux/.config/tmux/tmux.conf | 24 +++++++++++++++++++ tpm | 1 + 15 files changed, 70 insertions(+), 34 deletions(-) create mode 100644 nvim/.config/nvim/lua/yock/plugins/nvim-tmux-navigator.lua create mode 160000 tmux/.config/tmux/plugins/tmux create mode 160000 tmux/.config/tmux/plugins/tmux-dark-notify create mode 160000 tmux/.config/tmux/plugins/tmux-sensible create mode 160000 tmux/.config/tmux/plugins/tpm create mode 160000 tmux/.config/tmux/plugins/vim-tmux-navigator create mode 100644 tmux/.config/tmux/tmux.conf create mode 160000 tpm diff --git a/README.md b/README.md index 7650102..1418a0d 100644 --- a/README.md +++ b/README.md @@ -4,4 +4,4 @@ Local customizations with the goal of maintaining a 1-step install. ## Install -With ZSH installed, clone this repository anywhere and run `install.zsh`. Files will be copied into `$HOME/.files` and `.zshrc` will be symlinked into `$HOME`. +With ZSH installed, clone this repository anywhere and run `install.zsh`. diff --git a/dependencies/homebrew.txt b/dependencies/homebrew.txt index 80731ea..35a8725 100644 --- a/dependencies/homebrew.txt +++ b/dependencies/homebrew.txt @@ -7,6 +7,7 @@ pinentry-mac rbenv ruby-build stow +tmux wget zoxide zsh diff --git a/install.zsh b/install.zsh index 184b3c8..40efe9d 100755 --- a/install.zsh +++ b/install.zsh @@ -19,8 +19,14 @@ pushd zsh/dot-scripts git -C geometry pull || git clone git@github.com:geometry-zsh/geometry.git geometry popd +echo "Installing TMUX plugins" +pushd ~/.tmux/plugins +git -C tpm pull || git clone git@github.com:tmux-plugins/tpm.git tpm +popd + echo "Linking files" stow --dotfiles -t ~ zsh stow --dotfiles -t ~ ruby stow --dotfiles -t ~ nvim +stow --dotfiles -t ~ tmux diff --git a/nvim/.config/nvim/lazy-lock.json b/nvim/.config/nvim/lazy-lock.json index 9feb812..b661dad 100644 --- a/nvim/.config/nvim/lazy-lock.json +++ b/nvim/.config/nvim/lazy-lock.json @@ -1,27 +1,27 @@ { - "auto-dark-mode.nvim": { "branch": "master", "commit": "e328dc463d238cb7d690fb4daf068eba732a5a14" }, - "cloak.nvim": { "branch": "main", "commit": "462e84e1659d984196d09f7d16690b19b9aee804" }, + "cloak.nvim": { "branch": "main", "commit": "6e5bcd50bebc5cdb7cd3a00eb3d97ab7c4cc3b94" }, "copilot.vim": { "branch": "release", "commit": "9484e35cf222e9360e05450622a884f95c662c4c" }, "flexoki": { "branch": "main", "commit": "975654bce67514114db89373539621cff42befb5" }, - "flexoki-neovim": { "branch": "main", "commit": "975654bce67514114db89373539621cff42befb5" }, "friendly-snippets": { "branch": "main", "commit": "dcd4a586439a1c81357d5b9d26319ae218cc9479" }, "git-blame.nvim": { "branch": "master", "commit": "a0282d05adbee80aaf4e2ff35b81b52940b67bed" }, - "lazy.nvim": { "branch": "main", "commit": "83493db50a434a4c5c648faf41e2ead80f96e478" }, + "lazy.nvim": { "branch": "main", "commit": "af6afefbb46ab29a8a1db69536b04290a9403876" }, "lualine.nvim": { "branch": "master", "commit": "b5e8bb642138f787a2c1c5aedc2a78cb2cebbd67" }, - "mason-lspconfig.nvim": { "branch": "main", "commit": "2ba17cecfde8b8c7c7c287909a1e4de895223df6" }, + "mason-lspconfig.nvim": { "branch": "main", "commit": "9dfcf2036c223920826140f0151d929a43f9eceb" }, "mason.nvim": { "branch": "main", "commit": "751b1fcbf3d3b783fcf8d48865264a9bcd8f9b10" }, + "nvim": { "branch": "main", "commit": "56fb98218d22d5c326387bf9e4076227e7372e6b" }, "nvim-dap": { "branch": "master", "commit": "c1695e500c7d552a0a19953a9aefcc89178fb1af" }, "nvim-dap-ruby": { "branch": "main", "commit": "a2248b7b31f6f096b9e847e769afd00060e0aae4" }, "nvim-dap-ui": { "branch": "master", "commit": "edfa93f60b189e5952c016eee262d0685d838450" }, - "nvim-lspconfig": { "branch": "master", "commit": "d67715d3b746a19e951b6b0a99663fa909bb9e64" }, - "nvim-nio": { "branch": "master", "commit": "7054695117581bdb0183b8d27d8d82b4a2ac8958" }, + "nvim-lspconfig": { "branch": "master", "commit": "24662f92c18edd397ef12d635b11dbdedef2d094" }, + "nvim-nio": { "branch": "master", "commit": "33c62b3eadd8154169e42144de16ba4db6784bec" }, "nvim-surround": { "branch": "main", "commit": "84a26afce16cffa7e3322cfa80a42cddf60616eb" }, - "nvim-treesitter": { "branch": "master", "commit": "722617e6726c1508adadf83d531f54987c703be0" }, - "nvim-web-devicons": { "branch": "master", "commit": "cb0c967c9723a76ccb1be0cc3a9a10e577d2f6ec" }, + "nvim-tmux-navigation": { "branch": "main", "commit": "4898c98702954439233fdaf764c39636681e2861" }, + "nvim-treesitter": { "branch": "master", "commit": "8532b1d941b5859b4844310fa71d6db0f633be33" }, + "nvim-web-devicons": { "branch": "master", "commit": "585b2dc4bba2b5973f2b1d3e576709af5ac34fb6" }, "plenary.nvim": { "branch": "master", "commit": "f7adfc4b3f4f91aab6caebf42b3682945fbc35be" }, "rspec.nvim": { "branch": "main", "commit": "304682100b152071c2186994690c9646a5d46e05" }, "telescope-fzf-native.nvim": { "branch": "main", "commit": "9ef21b2e6bb6ebeaf349a0781745549bbb870d27" }, - "telescope.nvim": { "branch": "master", "commit": "221778e93bfaa58bce4be4e055ed2edecc26f799" }, + "telescope.nvim": { "branch": "master", "commit": "1e591885751d255b12c3649253cb6c2838e2c724" }, "todo-comments.nvim": { "branch": "main", "commit": "833d8dd8b07eeda37a09e99460f72a02616935cb" }, "undotree": { "branch": "master", "commit": "aa93a7e5890dbbebbc064cd22260721a6db1a196" }, "which-key.nvim": { "branch": "main", "commit": "4433e5ec9a507e5097571ed55c02ea9658fb268a" } diff --git a/nvim/.config/nvim/lua/yock/plugins/colors.lua b/nvim/.config/nvim/lua/yock/plugins/colors.lua index 69979d0..f397871 100644 --- a/nvim/.config/nvim/lua/yock/plugins/colors.lua +++ b/nvim/.config/nvim/lua/yock/plugins/colors.lua @@ -1,18 +1,11 @@ return { - 'f-person/auto-dark-mode.nvim', - dependencies = { 'kepano/flexoki-neovim' }, - opts = { - update_interval = 1000, - set_dark_mode = function() - vim.api.nvim_set_option('background', 'dark') - vim.cmd('colorscheme flexoki-dark') - end, - set_light_mode = function() - vim.api.nvim_set_option('background', 'light') - vim.cmd('colorscheme flexoki-light') - end, + 'catppuccin/nvim', + priority = 1000, + config = function() + require('catppuccin').setup({ + flavour = 'mocha' + }) - }, - lazy = false, - priority = 100, + vim.cmd.colorscheme('catppuccin') + end, } diff --git a/nvim/.config/nvim/lua/yock/plugins/nvim-tmux-navigator.lua b/nvim/.config/nvim/lua/yock/plugins/nvim-tmux-navigator.lua new file mode 100644 index 0000000..03fa72a --- /dev/null +++ b/nvim/.config/nvim/lua/yock/plugins/nvim-tmux-navigator.lua @@ -0,0 +1,13 @@ +return { + 'alexghergh/nvim-tmux-navigation', + lazy = false, + opts = { + disable_when_zoomed = true, + keybindings = { + left = '', + down = '', + up = '', + right = '', + } + }, +} diff --git a/nvim/.config/nvim/lua/yock/plugins/treesitter.lua b/nvim/.config/nvim/lua/yock/plugins/treesitter.lua index d2800bc..6d5a169 100644 --- a/nvim/.config/nvim/lua/yock/plugins/treesitter.lua +++ b/nvim/.config/nvim/lua/yock/plugins/treesitter.lua @@ -3,7 +3,7 @@ return { build = ':TSUpdate', opts = { -- A list of parser names, or "all" (the five listed parsers should always be installed) - ensure_installed = { "lua", "ruby", "javascript", "typescript" }, + ensure_installed = { "lua", "ruby", "javascript", "typescript", "c" }, -- Install parsers synchronously (only applied to `ensure_installed`) sync_install = false, diff --git a/nvim/.config/nvim/lua/yock/remap.lua b/nvim/.config/nvim/lua/yock/remap.lua index 581a95b..179cde7 100644 --- a/nvim/.config/nvim/lua/yock/remap.lua +++ b/nvim/.config/nvim/lua/yock/remap.lua @@ -12,13 +12,6 @@ vim.keymap.set('n', 'y', "\"+y") vim.keymap.set('v', 'y', "\"+y") vim.keymap.set('n', 'Y', "\"+Y") --- Split navigation -vim.keymap.set('n', '', 'h') -vim.keymap.set('n', '', 'j') -vim.keymap.set('n', '', 'k') -vim.keymap.set('n', '', 'l') - --- Diagnostics vim.keymap.set('n', '[d', vim.diagnostic.goto_prev, { desc = 'Go to previous diagnostic' }) vim.keymap.set('n', ']d', vim.diagnostic.goto_next, { desc = 'Go to next diagnostic' }) vim.keymap.set('n', 'dl', vim.diagnostic.setloclist, { desc = 'Show diagnostic error messages' }) diff --git a/tmux/.config/tmux/plugins/tmux b/tmux/.config/tmux/plugins/tmux new file mode 160000 index 0000000..e80cb73 --- /dev/null +++ b/tmux/.config/tmux/plugins/tmux @@ -0,0 +1 @@ +Subproject commit e80cb735bbcd264ff971fdf7e58b219b60286c81 diff --git a/tmux/.config/tmux/plugins/tmux-dark-notify b/tmux/.config/tmux/plugins/tmux-dark-notify new file mode 160000 index 0000000..4a205f8 --- /dev/null +++ b/tmux/.config/tmux/plugins/tmux-dark-notify @@ -0,0 +1 @@ +Subproject commit 4a205f86b64cfd45448be791ce133172c3f11c56 diff --git a/tmux/.config/tmux/plugins/tmux-sensible b/tmux/.config/tmux/plugins/tmux-sensible new file mode 160000 index 0000000..25cb91f --- /dev/null +++ b/tmux/.config/tmux/plugins/tmux-sensible @@ -0,0 +1 @@ +Subproject commit 25cb91f42d020f675bb0a2ce3fbd3a5d96119efa diff --git a/tmux/.config/tmux/plugins/tpm b/tmux/.config/tmux/plugins/tpm new file mode 160000 index 0000000..99469c4 --- /dev/null +++ b/tmux/.config/tmux/plugins/tpm @@ -0,0 +1 @@ +Subproject commit 99469c4a9b1ccf77fade25842dc7bafbc8ce9946 diff --git a/tmux/.config/tmux/plugins/vim-tmux-navigator b/tmux/.config/tmux/plugins/vim-tmux-navigator new file mode 160000 index 0000000..38b1d04 --- /dev/null +++ b/tmux/.config/tmux/plugins/vim-tmux-navigator @@ -0,0 +1 @@ +Subproject commit 38b1d0402c4600543281dc85b3f51884205674b6 diff --git a/tmux/.config/tmux/tmux.conf b/tmux/.config/tmux/tmux.conf new file mode 100644 index 0000000..cebfb42 --- /dev/null +++ b/tmux/.config/tmux/tmux.conf @@ -0,0 +1,24 @@ +# TMUX color settings https://paulgessinger.com/posts/2020/full-gui-colors-in-iterm-tmux-and-vim/ +set-option -g default-terminal 'tmux-256color' +set-option -g terminal-overrides ',xterm-256color:RGB' + +set -g mouse on + +# Index windows and panes at 1 instead of 0 +set -g base-index 1 +set -g pane-base-index 1 +set-window-option -g pane-base-index 1 +set-option -g renumber-windows on + +set -g @plugin 'tmux-plugins/tpm' +set -g @plugin 'tmux-plugins/tmux-sensible' +set -g @plugin 'catppuccin/tmux' +set -g @plugin 'christoomey/vim-tmux-navigator' + +run '~/.tmux/plugins/tpm/tpm' + +set-window-option -g mode-keys vi +bind-key -T copy-mode-vi v send-keys -X begin-selection +bind-key -T copy-mode-vi y send-keys -X copy-pipe-and-cancel +bind-key -T copy-mode-vi C-v send-keys -X rectangle-toggle + diff --git a/tpm b/tpm new file mode 160000 index 0000000..99469c4 --- /dev/null +++ b/tpm @@ -0,0 +1 @@ +Subproject commit 99469c4a9b1ccf77fade25842dc7bafbc8ce9946