Add a git plugin to vi and enable mouse support
diff --git a/src/apps/personal/vim.nix b/src/apps/personal/vim.nix
index aba9d68..16481de 100644
--- a/src/apps/personal/vim.nix
+++ b/src/apps/personal/vim.nix
@@ -17,6 +17,7 @@
set number
set cursorline
set expandtab
+ set mouse=a
colorscheme onehalfdark
if exists('+termguicolors')
@@ -42,6 +43,16 @@
set statusline+=%l/%L "cursor line/total lines
set statusline+=\ %P "percent through file
+ nnoremap <silent> K :call <SID>show_documentation()<CR>
+
+ function! s:show_documentation()
+ if (index(['vim','help'], &filetype) >= 0)
+ execute 'h '.expand('<cword>')
+ else
+ call CocAction('doHover')
+ endif
+ endfunction
+
lua << EOF
require('neorg').setup {
load = {
@@ -64,6 +75,7 @@
'';
plugins = [
+ pkgs.vimPlugins.git-conflict-nvim
pkgs.vimPlugins.vim-nix
pkgs.vimPlugins.copilot-vim
pkgs.vimPlugins.coc-tsserver
diff --git a/src/overlays/vim.nix b/src/overlays/vim.nix
new file mode 100644
index 0000000..ba39a4d
--- /dev/null
+++ b/src/overlays/vim.nix
@@ -0,0 +1,13 @@
+final: prev: {
+ vimPlugins = prev.lib.recursiveUpdate prev.vimPlugins {
+ git-conflict-nvim = final.vimUtils.buildVimPlugin {
+ name = "git-conflict-nvim";
+ src = final.fetchFromGitHub {
+ owner = "akinsho";
+ repo = "git-conflict.nvim";
+ rev = "80bc8931d4ed8c8c4d289a08e1838fcf4741408d";
+ hash = "sha256-tBKGjzKK/SftivTgdujk4NaIxz8sUNyd9ULlGKAL8x8=";
+ };
+ };
+ };
+}