commit 3ddf817de07b0547142cf939c21244fa9b42ac27
parent f6bdea68173909b2140561962a969b16fd836ea8
Author: Jake Koroman <jakekoroman@proton.me>
Date: Wed, 20 Nov 2024 17:20:47 -0500
New nvim config and updated tmux config.
Diffstat:
6 files changed, 67 insertions(+), 127 deletions(-)
diff --git a/.config/nvim/init.lua b/.config/nvim/init.lua
@@ -1,24 +0,0 @@
-require('plugins')
-require('settings')
-require('keybinds')
-
-local api = vim.api
-
--- Auto save when running :make
-api.nvim_create_autocmd({ "QuickFixCmdPre" }, {
- callback = function()
- vim.cmd ":w"
- end,
-})
-
-require('nvim-highlight-colors').setup {}
-
--- Snippet settings
-require('snippets').snippets = {
- _global = {
- todo = "/* TODO(jake): $0 */";
- note = "/* NOTE(jake): $0 */";
- inc = "#include <$0>";
- incq = "#include \"$0\"";
- }
-}
diff --git a/.config/nvim/init.vim b/.config/nvim/init.vim
@@ -0,0 +1,60 @@
+set relativenumber
+set mouse=a
+set ts=4
+set sw=4
+
+colo retrobox
+
+set clipboard=unnamedplus
+set cindent
+set cino="l1,t0,(0,:0" " :0 will align case to the switch statement
+set makeprg=./build.sh
+
+let mapleader = " "
+
+nnoremap <leader>ff <cmd>Telescope find_files<cr>
+nnoremap <leader>fg <cmd>Telescope live_grep<cr>
+nnoremap <leader>fb <cmd>Telescope buffers<cr>
+nnoremap <leader>fh <cmd>Telescope help_tags<cr>
+nnoremap <leader>fm <cmd>Telescope marks<cr>
+
+" Colemak DH binds
+noremap n h
+noremap e j
+noremap i k
+noremap o l
+
+noremap l i
+noremap L I
+
+noremap j e
+
+noremap k n
+noremap K N
+
+noremap h o
+noremap H O
+
+noremap <leader>wn <C-w>h
+noremap <leader>we <C-w>j
+noremap <leader>wi <C-w>k
+noremap <leader>wo <C-w>l
+noremap <leader>ww <C-w>w
+noremap <leader>wo <C-w>o
+noremap <leader>wc <C-w>c
+
+noremap <leader>cc <cmd>make<cr>
+noremap <leader>cn <cmd>cnext<cr>
+noremap <leader>cp <cmd>cprev<cr>
+
+call plug#begin()
+
+Plug 'nvim-lua/plenary.nvim'
+Plug 'nvim-telescope/telescope.nvim'
+Plug 'garbas/vim-snipmate'
+Plug 'MarcWeber/vim-addon-mw-utils'
+Plug 'honza/vim-snippets'
+Plug 'tpope/vim-surround'
+Plug 'tpope/vim-commentary'
+
+call plug#end()
diff --git a/.config/nvim/lua/keybinds.lua b/.config/nvim/lua/keybinds.lua
@@ -1,36 +0,0 @@
-local snippets = require('snippets')
-
-local change_scale_factor = function(delta)
- vim.g.neovide_scale_factor = vim.g.neovide_scale_factor * delta
-end
-
--- General Editor binds
-vim.keymap.set('n', '<M-j>', '}')
-vim.keymap.set('n', '<M-k>', '{')
-vim.keymap.set('v', '<M-j>', '}')
-vim.keymap.set('v', '<M-k>', '{')
-vim.keymap.set('i', '<C-k>', snippets.expand_or_advance)
-vim.keymap.set('n', '<leader>e', '<CMD>Lexplore<CR>')
-
--- Compilation bind
-vim.keymap.set('n', '<leader>c', '<CMD>make<CR>')
-vim.keymap.set('n', '<M-n>', '<CMD>cn<CR>')
-vim.keymap.set('n', '<M-p>', '<CMD>cp<CR>')
-vim.keymap.set('n', '<M-l>', '<CMD>cl<CR>')
-
--- Buffer binds
-vim.keymap.set('n', '<leader>bp', '<CMD>bn<CR>')
-vim.keymap.set('n', '<leader>bn', '<CMD>bp<CR>')
-
--- Window binds
-vim.keymap.set('n', '<leader>ww', '<C-w>w')
-vim.keymap.set('n', '<leader>wn', '<C-w>n')
-vim.keymap.set('n', '<leader>wv', '<C-w>v')
-vim.keymap.set('n', '<leader>wm', '<CMD>only<CR>')
-vim.keymap.set('n', '<M-o>', '<C-w>w')
-vim.keymap.set('n', '<leader>wc', '<CMD>close<CR>')
-
-vim.keymap.set('n', '<C-j>', '<CMD>move .+1<CR>')
-vim.keymap.set('n', '<C-k>', '<CMD>move .-2<CR>')
-vim.keymap.set('v', '<C-j>', ":move '>+1<CR>gv=gv")
-vim.keymap.set('v', '<C-k>', ":move '<-2<CR>gv=gv")
diff --git a/.config/nvim/lua/plugins.lua b/.config/nvim/lua/plugins.lua
@@ -1,27 +0,0 @@
-local ensure_packer = function()
- local fn = vim.fn
- local install_path = fn.stdpath('data')..'/site/pack/packer/start/packer.nvim'
- if fn.empty(fn.glob(install_path)) > 0 then
- fn.system({'git', 'clone', '--depth', '1', 'https://github.com/wbthomason/packer.nvim', install_path})
- vim.cmd [[packadd packer.nvim]]
- return true
- end
- return false
-end
-
-local packer_bootstrap = ensure_packer()
-
-return require('packer').startup({
- function(use)
- use('wbthomason/packer.nvim')
- use('nvim-lua/plenary.nvim')
-
- use('tpope/vim-commentary')
- use('rhysd/clever-f.vim')
-
- use('norcalli/snippets.nvim')
- use('zekzekus/menguless')
- use('brenoprata10/nvim-highlight-colors')
- use ('Tetralux/odin.vim')
- end
-})
diff --git a/.config/nvim/lua/settings.lua b/.config/nvim/lua/settings.lua
@@ -1,29 +0,0 @@
-local o = vim.o
-local g = vim.g
-
-g.mapleader = " "
-g.netrw_keepdir = 0
-g.netrw_banner = 0
-g.netrw_winsize = 15
-g.netrw_localcopydircmd = 'cp -r'
-
-o.termguicolors = false
-g.zig_fmt_autosave = 0
-
-vim.cmd('set wrap!')
-vim.cmd('set makeprg=./build.sh')
-
-o.mouse = 'a'
-o.tabstop = 4
-o.shiftwidth = 4
-o.autochdir = true
-
--- my super cool c indentation style
-o.cindent = true
-o.cino = "l1,t0,(0,:0" -- :0 will align case to the switch statement
-
-o.swapfile = false
-o.backup = false
-
-osmartcase = true
-o.clipboard = 'unnamedplus'
diff --git a/.config/tmux/tmux.conf b/.config/tmux/tmux.conf
@@ -1,7 +1,3 @@
-unbind C-b
-set -g prefix C-x
-bind C-x send-prefix
-
set -g mouse on
set-option -g history-limit 10000
set -s escape-time 0
@@ -12,11 +8,11 @@ setw -g pane-base-index 1
set -g default-terminal "xterm-256color"
set-option -ga terminal-overrides ",xterm-256color:Tc"
-set-option -g status-position "bottom"
-set-option -g status-style bg=default,fg=default
-set-option -g status-justify centre
+#set-option -g status-position "bottom"
+#set-option -g status-style bg=default,fg=default
+#set-option -g status-justify centre
# set-option -g status-left '#[bg=default,fg=default,bold]#{?client_prefix,, (._.) }#[bg=#ffff00,fg=black,bold]#{?client_prefix, (._.) ,}'
-set-option -g status-left '#[bg=default,fg=default,bold]#{?client_prefix,, (._.) }#[bg=default,fg=red,bold]#{?client_prefix, (._.) ,}'
-set-option -g status-right '#H:#S'
-set-option -g window-status-format ' #I:#W '
-set-option -g window-status-current-format '#[bg=#ffff00,fg=#000000] #I:#W#{?window_zoomed_flag, , }'
+#set-option -g status-left '#[bg=default,fg=default,bold]#{?client_prefix,, (._.) }#[bg=default,fg=red,bold]#{?client_prefix, (._.) ,}'
+#set-option -g status-right '#H:#S'
+#set-option -g window-status-format ' #I:#W '
+#set-option -g window-status-current-format '#[bg=#ffff00,fg=#000000] #I:#W#{?window_zoomed_flag, , }'