From 270b84655f76ac2d3ea347dddd4998a4a5cc7e61 Mon Sep 17 00:00:00 2001 From: Ivar Fatland Date: Tue, 7 Oct 2025 13:16:27 +0200 Subject: [PATCH 01/12] remove roslyn Probably could have made this a for-loop --- nvim/.config/nvim/init.lua | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/nvim/.config/nvim/init.lua b/nvim/.config/nvim/init.lua index 216ba26..167d0e8 100644 --- a/nvim/.config/nvim/init.lua +++ b/nvim/.config/nvim/init.lua @@ -435,12 +435,7 @@ require'lazy'.setup{ --{{{1 'williamboman/mason-lspconfig.nvim', }, config = function() - require'mason'.setup{ - registries = { - "github:mason-org/mason-registry", - "github:Crashdummyy/mason-registry", - }, - } + require'mason'.setup() require'mason-lspconfig'.setup() vim.lsp.config.zls = { From 71ba1dce14c1b5672366dbb5e20e1321bcf5dae4 Mon Sep 17 00:00:00 2001 From: Ivar Fatland Date: Wed, 8 Oct 2025 20:21:48 +0200 Subject: [PATCH 02/12] make marks jump to the last known position in a file, not it's exact position --- vim/.vimrc | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) diff --git a/vim/.vimrc b/vim/.vimrc index 036baad..c03ea61 100644 --- a/vim/.vimrc +++ b/vim/.vimrc @@ -58,3 +58,30 @@ xnoremap L $ if has('clipboard') set clipboard^=unnamed,unnamedplus endif + +nnoremap 'A 'A'" +nnoremap 'B 'B'" +nnoremap 'C 'C'" +nnoremap 'D 'D'" +nnoremap 'E 'E'" +nnoremap 'F 'F'" +nnoremap 'G 'G'" +nnoremap 'H 'H'" +nnoremap 'I 'I'" +nnoremap 'J 'J'" +nnoremap 'K 'K'" +nnoremap 'L 'L'" +nnoremap 'M 'M'" +nnoremap 'N 'N'" +nnoremap 'O 'O'" +nnoremap 'P 'P'" +nnoremap 'Q 'Q'" +nnoremap 'R 'R'" +nnoremap 'S 'S'" +nnoremap 'T 'T'" +nnoremap 'U 'U'" +nnoremap 'V 'V'" +nnoremap 'W 'W'" +nnoremap 'X 'X'" +nnoremap 'Y 'Y'" +nnoremap 'Z 'Z'" From 1d8df9d31040d0654d4553a0b21e8eda528e5ab3 Mon Sep 17 00:00:00 2001 From: Ivar Fatland Date: Thu, 9 Oct 2025 18:42:16 +0200 Subject: [PATCH 03/12] add persistent undo functionality to both neovim and vim --- nvim/.config/nvim/init.lua | 6 ++++++ vim/.vimrc | 7 +++++++ 2 files changed, 13 insertions(+) diff --git a/nvim/.config/nvim/init.lua b/nvim/.config/nvim/init.lua index 167d0e8..220866e 100644 --- a/nvim/.config/nvim/init.lua +++ b/nvim/.config/nvim/init.lua @@ -70,6 +70,12 @@ vim.cmd [[ set errorformat^=[----]\ %f:%l:\ %m ]] +vim.o.undofile = true +vim.o.undodir = vim.fn.expand("~/.vim/neoundodir") +if vim.fn.isdirectory(vim.o.undodir) == 0 then + vim.fn.mkdir(vim.o.undodir, "p") +end + vim.keymap.set('n', ',cf', function() local qf = vim.fn.getqflist() for i, item in ipairs(qf) do diff --git a/vim/.vimrc b/vim/.vimrc index c03ea61..d6e392e 100644 --- a/vim/.vimrc +++ b/vim/.vimrc @@ -33,6 +33,13 @@ nnoremap H ^ nnoremap L $ set autoindent set cursorline +set undofile +set undodir=~/.vim/undodir +if !isdirectory(expand('~/.vim/undodir')) + call mkdir(expand('~/.vim/undodir'), 'p') +endif +set undodir=~/.vim/undodir +set undofile set errorformat^=[----]\ %f:%l:\ %m set expandtab set exrc From 565f7c71dcdbc80e0c4d342bbe79775be914bdce Mon Sep 17 00:00:00 2001 From: Ivar Fatland Date: Thu, 9 Oct 2025 18:46:29 +0200 Subject: [PATCH 04/12] cooler backup defaults autoread changes from other programs, and keep persistent undo information between sessions. --- nvim/.config/nvim/init.lua | 4 ++++ vim/.vimrc | 6 ++++++ 2 files changed, 10 insertions(+) diff --git a/nvim/.config/nvim/init.lua b/nvim/.config/nvim/init.lua index 220866e..61daef7 100644 --- a/nvim/.config/nvim/init.lua +++ b/nvim/.config/nvim/init.lua @@ -70,6 +70,10 @@ vim.cmd [[ set errorformat^=[----]\ %f:%l:\ %m ]] +vim.o.backup = false +vim.o.writebackup = false +vim.o.swapfile = false +vim.o.autoread = true vim.o.undofile = true vim.o.undodir = vim.fn.expand("~/.vim/neoundodir") if vim.fn.isdirectory(vim.o.undodir) == 0 then diff --git a/vim/.vimrc b/vim/.vimrc index d6e392e..4a8dd6e 100644 --- a/vim/.vimrc +++ b/vim/.vimrc @@ -33,11 +33,17 @@ nnoremap H ^ nnoremap L $ set autoindent set cursorline + +set nobackup +set nowritebackup +set noswapfile +set autoread set undofile set undodir=~/.vim/undodir if !isdirectory(expand('~/.vim/undodir')) call mkdir(expand('~/.vim/undodir'), 'p') endif + set undodir=~/.vim/undodir set undofile set errorformat^=[----]\ %f:%l:\ %m From d135735cb175fbbb76f523792dbb9f7f1433c1da Mon Sep 17 00:00:00 2001 From: Ivar Fatland Date: Thu, 9 Oct 2025 19:30:25 +0200 Subject: [PATCH 05/12] nice looking default config --- tmux/.tmux.conf | 41 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 41 insertions(+) create mode 100644 tmux/.tmux.conf diff --git a/tmux/.tmux.conf b/tmux/.tmux.conf new file mode 100644 index 0000000..6d15f06 --- /dev/null +++ b/tmux/.tmux.conf @@ -0,0 +1,41 @@ +# Rebind prefix key to Ctrl+a for easier access +unbind C-b +set-option -g prefix C-a +bind-key C-a send-prefix + +# Reload config with Prefix + r +bind r source-file ~/.tmux.conf \; display "Reloaded!" + +# Enable mouse support for pane selection and scrolling +set -g mouse on + +# Use Vim-like keys for pane navigation +bind h select-pane -L +bind j select-pane -D +bind k select-pane -U +bind l select-pane -R + +# Split windows with Prefix + | (vertical) and Prefix + - (horizontal) +bind | split-window -h +bind - split-window -v + +# Set default terminal to 256 colors +set -g default-terminal "screen-256color" + +black="#000000" +gray_light="#D8DEE9" +gray_medium="#ABB2BF" +gray_dark="#3B4252" +green_soft="#A3BE8C" +blue_muted="#81A1C1" +cyan_soft="#88C0D0" +set -g status-position top +set -g status-left-length 100 +set -g status-style "fg=${gray_light},bg=default" +set -g status-left "#[fg=${green_soft},bold] #S #[fg=${gray_light},nobold]| " +set -g window-status-current-format "#[fg=${cyan_soft}]#[fg=${black},bg=${cyan_soft},bold]#I:#W#[fg=${cyan_soft},bg=default]" +set -g window-status-format " #I:#W " +set -g message-style "fg=${gray_light},bg=default" +set -g mode-style "fg=${gray_dark},bg=${blue_muted}" +set -g pane-border-style "fg=${gray_dark}" +set -g pane-active-border-style "fg=${gray_medium}" From aa362a7a35b81e225227e49567bcb4a8cb7ce8b1 Mon Sep 17 00:00:00 2001 From: Ivar Fatland Date: Thu, 9 Oct 2025 19:49:06 +0200 Subject: [PATCH 06/12] lazygit floating window --- tmux/.tmux.conf | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/tmux/.tmux.conf b/tmux/.tmux.conf index 6d15f06..37c135d 100644 --- a/tmux/.tmux.conf +++ b/tmux/.tmux.conf @@ -19,8 +19,10 @@ bind l select-pane -R bind | split-window -h bind - split-window -v -# Set default terminal to 256 colors -set -g default-terminal "screen-256color" +bind g popup -E -w 80% -h 90% -d "#{pane_current_path}" lazygit + +set -g default-terminal "tmux-256color" +set -as terminal-overrides ",xterm-256color:Tc" black="#000000" gray_light="#D8DEE9" From 30bc19efcd6059c47ec8c759b71ac701906a2dd7 Mon Sep 17 00:00:00 2001 From: Ivar Fatland Date: Thu, 9 Oct 2025 20:00:52 +0200 Subject: [PATCH 07/12] default to make new windows in the same working directory --- tmux/.tmux.conf | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/tmux/.tmux.conf b/tmux/.tmux.conf index 37c135d..968be8c 100644 --- a/tmux/.tmux.conf +++ b/tmux/.tmux.conf @@ -3,23 +3,22 @@ unbind C-b set-option -g prefix C-a bind-key C-a send-prefix -# Reload config with Prefix + r +unbind c +bind c new-window -c "#{pane_current_path}" + bind r source-file ~/.tmux.conf \; display "Reloaded!" -# Enable mouse support for pane selection and scrolling set -g mouse on -# Use Vim-like keys for pane navigation bind h select-pane -L bind j select-pane -D bind k select-pane -U bind l select-pane -R -# Split windows with Prefix + | (vertical) and Prefix + - (horizontal) bind | split-window -h bind - split-window -v -bind g popup -E -w 80% -h 90% -d "#{pane_current_path}" lazygit +bind g popup -E -w 80% -h 90% -d "#{pane_current_path}" -B lazygit set -g default-terminal "tmux-256color" set -as terminal-overrides ",xterm-256color:Tc" From f0ec0b2fc8333f08a2e8019ded853e67d177b5fe Mon Sep 17 00:00:00 2001 From: Ivar Fatland Date: Thu, 9 Oct 2025 20:39:55 +0200 Subject: [PATCH 08/12] slightly larger font in alacritty --- alacritty/.config/alacritty/alacritty.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/alacritty/.config/alacritty/alacritty.toml b/alacritty/.config/alacritty/alacritty.toml index 211b6fb..7abc69a 100644 --- a/alacritty/.config/alacritty/alacritty.toml +++ b/alacritty/.config/alacritty/alacritty.toml @@ -19,4 +19,4 @@ action = "DecreaseFontSize" [font] normal.family = "GoMono Nerd Font" -size=12 +size=14 From ba8fff1069939e5122198aa2522d460bfd64119f Mon Sep 17 00:00:00 2001 From: Ivar Fatland Date: Thu, 9 Oct 2025 20:40:22 +0200 Subject: [PATCH 09/12] fix vim and neovim configs so I can use ctrl-a for tmux --- nvim/.config/nvim/init.lua | 14 ++++++-------- vim/.vimrc | 7 +++++++ 2 files changed, 13 insertions(+), 8 deletions(-) diff --git a/nvim/.config/nvim/init.lua b/nvim/.config/nvim/init.lua index 61daef7..2413627 100644 --- a/nvim/.config/nvim/init.lua +++ b/nvim/.config/nvim/init.lua @@ -38,6 +38,10 @@ vim.cmd [[ nnoremap L $ xnoremap H ^ xnoremap L $ + nnoremap + nnoremap + nnoremap ,a + nnoremap ,x nnoremap ,cD :call setqflist(filter(getqflist(), 'v:val != getqflist()[getqflist({"idx": 0}).idx - 1]')) @@ -360,13 +364,13 @@ require'lazy'.setup{ --{{{1 end, }, { 'f-person/git-blame.nvim', --{{{2 - keys = {',a'}, + keys = {',g'}, config = function () require'gitblame'.setup{ enabled = false, } vim.cmd[[ - nnoremap ,a :GitBlameToggle + nnoremap ,g :GitBlameToggle ]] end }, @@ -539,12 +543,6 @@ require'lazy'.setup{ --{{{1 } end, }, - { 'kdheepak/lazygit.nvim', --{{{2 - lazy = true, - cmd = { 'LazyGit', 'LazyGitConfig', 'LazyGitCurrentFile', 'LazyGitFilter', 'LazyGitFilterCurrentFile', }, - dependencies = { 'nvim-lua/plenary.nvim', }, - keys = { { ',g', 'LazyGit', desc = 'LazyGit' }, }, - }, { 'mfussenegger/nvim-dap', --{{{2 dependencies = { 'nvim-treesitter/nvim-treesitter', diff --git a/vim/.vimrc b/vim/.vimrc index 4a8dd6e..72a2139 100644 --- a/vim/.vimrc +++ b/vim/.vimrc @@ -31,6 +31,13 @@ nnoremap :cprevious nnoremap zz nnoremap H ^ nnoremap L $ + +" i use ctrl-a for the tmux prefix key +nnoremap +nnoremap +nnoremap ,a +nnoremap ,x + set autoindent set cursorline From 89ea082fe660575a878a6388f44d48d5e87a9466 Mon Sep 17 00:00:00 2001 From: Ivar Fatland Date: Thu, 9 Oct 2025 20:40:38 +0200 Subject: [PATCH 10/12] change right status to be less distracting --- tmux/.tmux.conf | 1 + 1 file changed, 1 insertion(+) diff --git a/tmux/.tmux.conf b/tmux/.tmux.conf index 968be8c..d246dda 100644 --- a/tmux/.tmux.conf +++ b/tmux/.tmux.conf @@ -34,6 +34,7 @@ set -g status-position top set -g status-left-length 100 set -g status-style "fg=${gray_light},bg=default" set -g status-left "#[fg=${green_soft},bold] #S #[fg=${gray_light},nobold]| " +set -g status-right "#[fg=${gray_dark}]%H:%M" set -g window-status-current-format "#[fg=${cyan_soft}]#[fg=${black},bg=${cyan_soft},bold]#I:#W#[fg=${cyan_soft},bg=default]" set -g window-status-format " #I:#W " set -g message-style "fg=${gray_light},bg=default" From b5307bbc3138a3614872d79586be35d9bd4f2a94 Mon Sep 17 00:00:00 2001 From: Ivar Fatland Date: Thu, 9 Oct 2025 21:21:29 +0200 Subject: [PATCH 11/12] change vim colorscheme --- vim/.vimrc | 2 ++ 1 file changed, 2 insertions(+) diff --git a/vim/.vimrc b/vim/.vimrc index 72a2139..c3fde5f 100644 --- a/vim/.vimrc +++ b/vim/.vimrc @@ -1,3 +1,5 @@ +colorscheme unokai + autocmd BufEnter *__virtual* setlocal buftype=nofile bufhidden=hide noswapfile autocmd BufNewFile,BufRead *.h set filetype=c autocmd BufWinEnter *.* silent! loadview From 4e77886cb2bc9271dd97864c4467f8c18fe9d561 Mon Sep 17 00:00:00 2001 From: Ivar Fatland Date: Thu, 9 Oct 2025 21:21:50 +0200 Subject: [PATCH 12/12] make lazygit popup fullscreen --- tmux/.tmux.conf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tmux/.tmux.conf b/tmux/.tmux.conf index d246dda..d1e4a3f 100644 --- a/tmux/.tmux.conf +++ b/tmux/.tmux.conf @@ -18,7 +18,7 @@ bind l select-pane -R bind | split-window -h bind - split-window -v -bind g popup -E -w 80% -h 90% -d "#{pane_current_path}" -B lazygit +bind g popup -E -w 100% -h 100% -d "#{pane_current_path}" -B lazygit set -g default-terminal "tmux-256color" set -as terminal-overrides ",xterm-256color:Tc"