From 8de21f2484388bb25b50146d570e8a3a982487be Mon Sep 17 00:00:00 2001 From: asnev Date: Sun, 5 Jul 2026 06:04:57 +0700 Subject: [PATCH] vim-plug configurting plugins via hm doesn't work for me? maybe i'm just stupid. anyway using vim-plug this way feels pretty ok and it's declarative too so why not --- users/coyote/dotfiles/vim/vim-lisp | 4 ---- users/coyote/dotfiles/vim/vimrc | 16 ++++++++++++++++ users/coyote/home.nix | 3 +-- 3 files changed, 17 insertions(+), 6 deletions(-) diff --git a/users/coyote/dotfiles/vim/vim-lisp b/users/coyote/dotfiles/vim/vim-lisp index fa7b19f..b2038a5 100644 --- a/users/coyote/dotfiles/vim/vim-lisp +++ b/users/coyote/dotfiles/vim/vim-lisp @@ -8,7 +8,3 @@ setlocal autoindent setlocal showmatch setlocal lispwords+=defmacro,defmethod,define-syntax,let,let*,letre,cond - -if exists('*rainbow#load') - call rainbow#load() -endif diff --git a/users/coyote/dotfiles/vim/vimrc b/users/coyote/dotfiles/vim/vimrc index aa21a43..075bfbc 100644 --- a/users/coyote/dotfiles/vim/vimrc +++ b/users/coyote/dotfiles/vim/vimrc @@ -30,3 +30,19 @@ set incsearch set ignorecase set smartcase set showmatch + +" vim-plug auto-install & config +let data_dir = has('nvim') ? stdpath('data') . '/site' : '~/.vim' +if empty(glob(data_dir . '/autoload/plug.vim')) + silent execute '!curl -fLo '.data_dir.'/autoload/plug.vim --create-dirs https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim' + autocmd VimEnter * PlugInstall --sync | source $MYVIMRC +endif + +call plug#begin() + Plug 'junegunn/vim-plug' + Plug 'luochen1990/rainbow' + Plug 'mhinz/vim-signify' + Plug 'vim-airline/vim-airline' +call plug#end() + +let g:rainbow_active = 1 diff --git a/users/coyote/home.nix b/users/coyote/home.nix index 749e3cc..67f2156 100644 --- a/users/coyote/home.nix +++ b/users/coyote/home.nix @@ -53,7 +53,7 @@ in { recursive = true; }; } - (mkVimFt ./dotfiles/vim/vim-tab2 ["javascript" "typescript" "html" "css" "json" "nix"]) + (mkVimFt ./dotfiles/vim/vim-tab2 ["javascript" "typescript" "html" "css" "json" "nix" "vim"]) (mkVimFt ./dotfiles/vim/vim-tab4 ["python" "rust" "java" "lua" "c" "cpp" "h" "hpp"]) (mkVimFt ./dotfiles/vim/vim-tabs ["go" "make"]) (mkVimFt ./dotfiles/vim/vim-lisp ["lisp" "scheme" "clojure" "racket"]) @@ -64,7 +64,6 @@ in { vim = { enable = true; packageConfigurable = pkgs.unstable.vim-full; - plugins = with pkgs.unstable.vimPlugins; [rainbow]; defaultEditor = true; }; neovim = {