Mercurial > dotfiles
comparison dot_config/nvim/init.vim @ 324:64a0c6cec54c
Use packer for plugin management in lua
author | zegervdv <zegervdv@me.com> |
---|---|
date | Tue, 22 Dec 2020 15:42:45 +0100 |
parents | 4daaf43a2b28 |
children | ce396166d009 |
comparison
equal
deleted
inserted
replaced
323:3b25f3aa7014 | 324:64a0c6cec54c |
---|---|
1 " vim:fdm=marker:ts=2:sw=2 | 1 " vim:fdm=marker:ts=2:sw=2 |
2 | 2 |
3 let s:darwin = has('mac') | 3 let s:darwin = has('mac') |
4 let s:windows = has('win32') | 4 let s:windows = has('win32') |
5 | |
6 " Include Vim-Plug {{{ | |
7 if !s:windows | |
8 if has('nvim') | |
9 if empty(glob('~/.config/nvim/autoload/plug.vim')) | |
10 silent !mkdir -p ~/.config/nvim/autoload | |
11 silent !curl -fLo ~/.config/nvim/autoload/plug.vim | |
12 \ https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim | |
13 autocmd VimEnter * PlugInstall | |
14 endif | |
15 else | |
16 if empty(glob('~/.vim/autoload/plug.vim')) | |
17 silent !mkdir -p ~/.vim/autoload | |
18 silent !curl -fLo ~/.vim/autoload/plug.vim | |
19 \ https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim | |
20 autocmd VimEnter * PlugInstall | |
21 endif | |
22 endif | |
23 endif | |
24 | |
25 " }}} | |
26 " Vim-Plug {{{ | |
27 let g:plug_window='topleft new' | |
28 | |
29 if has('nvim') | |
30 call plug#begin('~/.config/nvim/plugged') | |
31 else | |
32 call plug#begin('~/.vim/plugged') | |
33 endif | |
34 | |
35 " General Plugins | |
36 Plug 'tpope/vim-sensible' | |
37 | |
38 if s:darwin | |
39 Plug 'vim-scripts/gitignore' | |
40 endif | |
41 | |
42 Plug 'sjl/splice.vim' | |
43 | |
44 Plug 'tpope/vim-repeat' | |
45 Plug 'tpope/vim-rsi' | |
46 Plug 'einfachtoll/didyoumean' | |
47 | |
48 " Session Management | |
49 Plug 'tpope/vim-obsession' | |
50 | |
51 " Spelling | |
52 Plug 'tpope/vim-abolish' | |
53 | |
54 " Settings | |
55 Plug 'sgur/vim-editorconfig' | |
56 | |
57 " Brackets | |
58 Plug 'tpope/vim-surround' | |
59 Plug 'raimondi/delimitMate' | |
60 Plug 'zegervdv/vim-endwise' | |
61 | |
62 " Formatting | |
63 Plug 'junegunn/vim-easy-align', { 'on' : [] } | |
64 augroup load_easy_align | |
65 autocmd! | |
66 autocmd CursorHold,CursorHoldI * call plug#load('vim-easy-align') | autocmd! load_easy_align | |
67 augroup END | |
68 | |
69 " Comments | |
70 Plug 'tpope/vim-commentary' | |
71 | |
72 " Moving in files | |
73 Plug 'wellle/targets.vim', { 'on': [] } | |
74 augroup load_targets | |
75 autocmd! | |
76 autocmd InsertEnter * call plug#load('targets.vim') | autocmd! load_targets | |
77 augroup END | |
78 Plug 'mhinz/vim-grepper', { 'on' : 'Grepper' } | |
79 | |
80 " Indentation | |
81 " Plug 'nathanaelkane/vim-indent-guides' | |
82 Plug 'Yggdroot/indentline' | |
83 Plug 'lukas-reineke/indent-blankline.nvim', { 'branch': 'lua' } | |
84 | |
85 " Command line | |
86 Plug 'tpope/vim-eunuch', { 'on' : ['Remove', 'Unlink', 'Move', 'Rename', 'Mkdir', 'Chmod', 'Find', 'Locate', 'SudoEdit', 'SudoWrite']} | |
87 | |
88 " Undoing | |
89 Plug 'sjl/gundo.vim', { 'on': 'GundoToggle' } | |
90 | |
91 " Tabs | |
92 Plug 'gcmt/taboo.vim' | |
93 | |
94 " Other | |
95 Plug 'yuttie/comfortable-motion.vim' | |
96 Plug 'tpope/vim-apathy' | |
97 | |
98 " Tmux | |
99 Plug 'christoomey/vim-tmux-navigator' | |
100 Plug 'tmux-plugins/vim-tmux-focus-events' | |
101 | |
102 " Background make | |
103 Plug 'tpope/vim-dispatch' | |
104 | |
105 " Completing and snippets | |
106 Plug 'sirver/ultisnips' | |
107 Plug 'honza/vim-snippets' | |
108 if has('nvim') | |
109 Plug 'neovim/nvim-lsp' | |
110 Plug 'nvim-lua/completion-nvim' | |
111 Plug 'nvim-treesitter/nvim-treesitter' | |
112 Plug 'nvim-treesitter/nvim-treesitter-refactor' | |
113 Plug 'nvim-treesitter/nvim-treesitter-textobjects' | |
114 Plug 'nvim-treesitter/playground' | |
115 Plug 'steelsojka/completion-buffers' | |
116 Plug 'nvim-treesitter/completion-treesitter' | |
117 Plug 'nvim-lua/popup.nvim' | |
118 Plug 'nvim-lua/plenary.nvim' | |
119 Plug 'nvim-telescope/telescope.nvim' | |
120 endif | |
121 | |
122 " Copying | |
123 Plug 'ShikChen/osc52.vim' | |
124 | |
125 " Vim file navigation | |
126 Plug 'justinmk/vim-dirvish' | |
127 Plug 'tpope/vim-projectionist' | |
128 | |
129 " Theme | |
130 Plug 'NLKNguyen/papercolor-theme' | |
131 Plug 'zegervdv/nvcode-color-schemes.vim' | |
132 | |
133 "Tcl | |
134 Plug 'vim-scripts/tcl.vim--smithfield-indent', { 'for': 'tcl'} | |
135 | |
136 Plug 'sbdchd/neoformat' | |
137 | |
138 Plug 'Glench/Vim-Jinja2-Syntax' | |
139 | |
140 if s:darwin | |
141 " Ruby | |
142 Plug 'tpope/vim-rails', { 'for': 'ruby' } | |
143 Plug 'vim-ruby/vim-ruby', { 'for': 'ruby' } | |
144 Plug 'tpope/vim-bundler', { 'for': 'ruby' } | |
145 Plug 'tpope/vim-rake', { 'for': 'ruby' } | |
146 Plug 'slim-template/vim-slim', { 'for': 'ruby' } | |
147 Plug 'duwanis/tomdoc.vim', { 'for': 'ruby' } | |
148 Plug 'keith/rspec.vim', { 'for': 'rspec' } | |
149 | |
150 " Markdown | |
151 Plug 'tpope/vim-markdown', { 'for': 'markdown' } | |
152 | |
153 " Jade | |
154 Plug 'digitaltoad/vim-jade', { 'for': 'jade' } | |
155 | |
156 " Latex | |
157 Plug 'lervag/vimtex', { 'for': 'tex' } | |
158 endif | |
159 | |
160 " Coffeescript | |
161 Plug 'kchmck/vim-coffee-script', { 'for': 'coffee' } | |
162 | |
163 " C | |
164 Plug 'NLKNguyen/c-syntax.vim', { 'for': 'c' } | |
165 | |
166 " Python | |
167 Plug 'Vimjas/vim-python-pep8-indent', { 'for': 'python' } | |
168 Plug 'vim-python/python-syntax', { 'for': 'python' } | |
169 | |
170 " Git | |
171 Plug 'tpope/vim-git' | |
172 call plug#end() | |
173 " }}} | |
174 | 5 |
175 " Activate built in plugins {{{ | 6 " Activate built in plugins {{{ |
176 if !has('nvim') | 7 if !has('nvim') |
177 if has('packages') | 8 if has('packages') |
178 packadd! matchit | 9 packadd! matchit |