diff --git a/vim/.vim/plug.d/autocomplete.vim b/vim/.vim/plug.d/autocomplete.vim new file mode 100644 index 0000000..64e8611 --- /dev/null +++ b/vim/.vim/plug.d/autocomplete.vim @@ -0,0 +1 @@ +Plug 'neoclide/coc.nvim', { 'branch': 'release' } diff --git a/vim/.vim/plug.d/core.vim b/vim/.vim/plug.d/core.vim new file mode 100644 index 0000000..a40fd55 --- /dev/null +++ b/vim/.vim/plug.d/core.vim @@ -0,0 +1,3 @@ +Plug 'SirVer/ultisnips', { 'tag': '3.2' } +Plug 'editorconfig/editorconfig-vim', { 'tag': 'v1.1.1' } +Plug 'tpope/vim-surround' diff --git a/vim/.vim/plug.d/fzf.vim b/vim/.vim/plug.d/fzf.vim new file mode 100644 index 0000000..95ebb75 --- /dev/null +++ b/vim/.vim/plug.d/fzf.vim @@ -0,0 +1,2 @@ +Plug 'junegunn/fzf', { 'tag': '0.24.4' } +Plug 'junegunn/fzf.vim' diff --git a/vim/.vim/plug.d/lang.vim b/vim/.vim/plug.d/lang.vim new file mode 100644 index 0000000..1f00980 --- /dev/null +++ b/vim/.vim/plug.d/lang.vim @@ -0,0 +1,4 @@ +Plug 'cespare/vim-toml', { 'for': 'toml' } +Plug 'fatih/vim-go', { 'tag': 'v1.24', 'for': [ 'go' ] } +Plug 'hashivim/vim-hashicorp-tools' +Plug 'rust-lang/rust.vim', { 'for': 'rust' } diff --git a/vim/.vim/plug.d/lint.vim b/vim/.vim/plug.d/lint.vim new file mode 100644 index 0000000..ad35286 --- /dev/null +++ b/vim/.vim/plug.d/lint.vim @@ -0,0 +1,57 @@ +Plug 'dense-analysis/ale', { + \ 'tag': 'v3.0.0', + \ 'for': [ + \ 'bash', + \ 'css', + \ 'dockerfile', + \ 'go', + \ 'graphql', + \ 'html', + \ 'javascript', + \ 'json', + \ 'less', + \ 'make', + \ 'markdown', + \ 'php', + \ 'python', + \ 'ruby', + \ 'rust', + \ 'scss', + \ 'sh', + \ 'sql', + \ 'tcl', + \ 'toml', + \ 'typescript', + \ 'vim', + \ 'vue', + \ 'xml', + \ 'yaml' + \ ] +\ } + +Plug 'prettier/vim-prettier', { + \ 'branch': 'release/1.x', + \ 'do': 'npm install', + \ 'for': [ + \ 'css', + \ 'graphql', + \ 'html', + \ 'javascript', + \ 'json', + \ 'less', + \ 'markdown', + \ 'package', + \ 'php', + \ 'pug', + \ 'python', + \ 'ruby', + \ 'scss', + \ 'sh', + \ 'swift', + \ 'toml', + \ 'typescript', + \ 'vue', + \ 'xml', + \ 'yaml' + \ ] +\ } diff --git a/vim/.vim/plugin/nerdtree.vim b/vim/.vim/plug.d/nerdtree.vim similarity index 88% rename from vim/.vim/plugin/nerdtree.vim rename to vim/.vim/plug.d/nerdtree.vim index cec26b1..58a8b92 100644 --- a/vim/.vim/plugin/nerdtree.vim +++ b/vim/.vim/plug.d/nerdtree.vim @@ -1,5 +1,5 @@ -" Nerdtree settings -" +Plug 'preservim/nerdtree', { 'on': 'NERDTreeToggle', 'tag': '6.9.8' } + " Close all open buffers on entering a window if the only " buffer that's left is the NERDTree buffer function! s:CloseIfOnlyNerdTreeLeft() @@ -17,5 +17,6 @@ let g:NERDTreeDirArrowCollapsible = '▾' let NERDTreeDirArrows=1 let NERDTreeIgnore = ['\.pyc$', '\.swp$'] + map nt :NERDTreeToggle autocmd WinEnter * call s:CloseIfOnlyNerdTreeLeft() diff --git a/vim/.vim/plug.d/pgsql.vim b/vim/.vim/plug.d/pgsql.vim new file mode 100644 index 0000000..65ce9fb --- /dev/null +++ b/vim/.vim/plug.d/pgsql.vim @@ -0,0 +1,2 @@ +Plug 'lifepillar/pgsql.vim', { 'for': [ 'sql' ] } +let g:sql_type_default = 'pgsql' diff --git a/vim/.vim/plug.d/themes.vim b/vim/.vim/plug.d/themes.vim new file mode 100644 index 0000000..4e55886 --- /dev/null +++ b/vim/.vim/plug.d/themes.vim @@ -0,0 +1,2 @@ +Plug 'NLKNguyen/papercolor-theme' +Plug 'sheerun/vim-wombat-scheme' diff --git a/vim/.vim/plugin/sql.vim b/vim/.vim/plugin/sql.vim deleted file mode 100644 index 0a9f572..0000000 --- a/vim/.vim/plugin/sql.vim +++ /dev/null @@ -1 +0,0 @@ -let g:sql_type_default = 'pgsql' diff --git a/vim/.vimrc b/vim/.vimrc index 200cdb2..c09e4af 100644 --- a/vim/.vimrc +++ b/vim/.vimrc @@ -1,72 +1,7 @@ call plug#begin('~/.vim/plugged') -Plug 'NLKNguyen/papercolor-theme' -Plug 'SirVer/ultisnips', { 'tag': '3.2' } -Plug 'cespare/vim-toml', { 'for': 'toml' } -Plug 'editorconfig/editorconfig-vim', { 'tag': 'v1.1.1' } -Plug 'fatih/vim-go', { 'tag': 'v1.24', 'for': [ 'go' ] } -Plug 'hashivim/vim-hashicorp-tools' -Plug 'lifepillar/pgsql.vim', { 'for': [ 'sql' ] } -Plug 'neoclide/coc.nvim', { 'branch': 'release' } -Plug 'preservim/nerdtree', { 'on': 'NERDTreeToggle', 'tag': '6.9.8' } -Plug 'dense-analysis/ale', { - \ 'tag': 'v3.0.0', - \ 'for': [ - \ 'bash', - \ 'css', - \ 'dockerfile', - \ 'go', - \ 'graphql', - \ 'html', - \ 'javascript', - \ 'json', - \ 'less', - \ 'make', - \ 'markdown', - \ 'php', - \ 'python', - \ 'ruby', - \ 'rust', - \ 'scss', - \ 'sh', - \ 'sql', - \ 'tcl', - \ 'toml', - \ 'typescript', - \ 'vim', - \ 'vue', - \ 'xml', - \ 'yaml' - \ ] -\ } -Plug 'prettier/vim-prettier', { - \ 'branch': 'release/1.x', - \ 'do': 'npm install', - \ 'for': [ - \ 'css', - \ 'graphql', - \ 'html', - \ 'javascript', - \ 'json', - \ 'less', - \ 'markdown', - \ 'package', - \ 'php', - \ 'pug', - \ 'python', - \ 'ruby', - \ 'scss', - \ 'sh', - \ 'swift', - \ 'toml', - \ 'typescript', - \ 'vue', - \ 'xml', - \ 'yaml' - \ ] -\ } -Plug 'rust-lang/rust.vim', { 'for': 'rust' } -Plug 'sheerun/vim-wombat-scheme' -Plug 'tpope/vim-surround' +for f in split(glob('~/.vim/plug.d/*.vim'), '\n') + exe 'source' f +endfor call plug#end()