Retheme vim-visual-multi
diff --git a/scripts/rebuild-home.sh b/scripts/rebuild-home.sh
index b212206..186d37c 100755
--- a/scripts/rebuild-home.sh
+++ b/scripts/rebuild-home.sh
@@ -9,8 +9,12 @@
/usr/bin/env git commit -am "$changes"
fi
+echo "Rebuilding..."
+
nix build .#homeConfigurations.${USER}.activationPackage $1 || exit 1
+echo "Removing old profiles..."
+
nix profile list \
| { grep 'home-manager-path$' || test $? = 1; } \
| awk -F ' ' '{ print $4 }' \
@@ -18,5 +22,7 @@
| xargs -t $DRY_RUN_CMD nix profile remove $VERBOSE_ARG
# ^ Remove old profiles; from https://github.com/nix-community/home-manager/blob/8d38ca886880265d523a66fe3da4d42e92ab0748/modules/home-environment.nix#L582
+echo "Activating"
+
result/activate
unlink result
diff --git a/scripts/rebuild-system.sh b/scripts/rebuild-system.sh
index 8d251b2..35aff8f 100755
--- a/scripts/rebuild-system.sh
+++ b/scripts/rebuild-system.sh
@@ -9,4 +9,6 @@
/usr/bin/env git commit -am "$changes"
fi
+echo "Rebuilding and activating..."
+
sudo nixos-rebuild switch --flake .#default $1
diff --git a/src/apps/personal/vim.nix b/src/apps/personal/vim.nix
index f53e536..556c6fe 100644
--- a/src/apps/personal/vim.nix
+++ b/src/apps/personal/vim.nix
@@ -30,10 +30,13 @@
set termguicolors
endif
- highlight ExtraWhitespace ctermbg=red guibg=red
- match ExtraWhitespace /\s\+$/
- " highlight Tab ctermbg=red guibg=red
- " match Tab /\t/
+ let g:better_whitespace_enabled=1
+ let g:strip_whitespace_on_save=1
+ let g:strip_only_modified_lines=1
+ let g:strip_whitelines_at_eof=1
+ let g:show_spaces_that_precede_tabs=1
+ nnoremap ]w :NextTrailingWhitespace<CR>
+ nnoremap [w :PrevTrailingWhitespace<CR>
set statusline=%t "tail of the filename
set statusline+=[%{strlen(&fenc)?&fenc:'none'}, "file encoding
@@ -47,6 +50,12 @@
set statusline+=%l/%L "cursor line/total lines
set statusline+=\ %P "percent through file
+ let g:VM_theme_set_by_colorscheme = 1
+ highlight VM_Extend ctermfg=NONE guifg=NONE ctermbg=239 guibg=#474e5d
+ highlight VM_Cursor ctermfg=188 guifg=#dcdfe4 ctermbg=168 guibg=#e06c75
+ highlight VM_Insert ctermfg=236 guifg=#282c34 ctermbg=176 guibg=#c678dd
+ highlight VM_Mono ctermfg=236 guifg=#282c34 ctermbg=75 guibg=#61afef
+
nnoremap <silent> K :call <SID>show_documentation()<CR>
function! s:show_documentation()
@@ -71,6 +80,11 @@
enable = true,
additional_vim_regex_highlighting = {'org'},
},
+ rainbow = {
+ enable = true,
+ extended_mode = true,
+ max_file_lines = nil,
+ },
indent = {
enable = true,
},
@@ -92,6 +106,7 @@
pkgs.vimPlugins.orgmode
pkgs.vimPlugins.vim-sleuth
pkgs.vimPlugins.vim-visual-multi
+ pkgs.vimPlugins.vim-better-whitespace
(pkgs.vimPlugins.nvim-treesitter.withPlugins (plugins: [
pkgs.tree-sitter-grammars.tree-sitter-go
pkgs.tree-sitter-grammars.tree-sitter-nix
@@ -109,6 +124,7 @@
pkgs.tree-sitter-grammars.tree-sitter-org-nvim
pkgs.tree-sitter-grammars.tree-sitter-typescript
pkgs.tree-sitter-grammars.tree-sitter-javascript
+ pkgs.vimPlugins.nvim-ts-rainbow
]))
];
};