summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorShubham Saini <me@ubh.sh>2023-02-17 07:40:20 +0000
committerShubham Saini <me@ubh.sh>2023-02-17 07:40:20 +0000
commit1fde6ce2467b2ba036fade82f8ba9b71bbffd545 (patch)
treea1324691f4aa9b1c3fb653bc0d8933e47eb7b5af
parent1b40ceffc094d7d76db61e29f9dd58bb2af7b96a (diff)
nvim: lua config
-rw-r--r--nvim/.config/nvim/after/plugin/lsp.lua69
-rw-r--r--nvim/.config/nvim/after/plugin/treesitter.lua23
-rwxr-xr-xnvim/.config/nvim/coc-settings.json14
-rwxr-xr-xnvim/.config/nvim/colors/jellybeans.vim748
-rw-r--r--[-rwxr-xr-x]nvim/.config/nvim/colors/pencil.vim0
-rw-r--r--nvim/.config/nvim/colors/plain.vim85
-rw-r--r--nvim/.config/nvim/init.lua3
-rwxr-xr-xnvim/.config/nvim/init.vim281
-rw-r--r--nvim/.config/nvim/lua/map.lua47
-rw-r--r--nvim/.config/nvim/lua/plugins.lua40
-rw-r--r--nvim/.config/nvim/lua/set.lua55
-rw-r--r--nvim/.config/nvim/lua/statusline/git.lua45
-rw-r--r--nvim/.config/nvim/lua/statusline/line.lua32
-rw-r--r--nvim/.config/nvim/lua/utils.lua18
-rw-r--r--nvim/.config/nvim/plugin/packer_compiled.lua194
15 files changed, 578 insertions, 1076 deletions
diff --git a/nvim/.config/nvim/after/plugin/lsp.lua b/nvim/.config/nvim/after/plugin/lsp.lua
new file mode 100644
index 0000000..675c2bd
--- /dev/null
+++ b/nvim/.config/nvim/after/plugin/lsp.lua
@@ -0,0 +1,69 @@
1local lsp = require("lsp-zero")
2
3lsp.preset("recommended")
4
5lsp.ensure_installed({
6 'rust_analyzer',
7})
8
9-- Fix Undefined global 'vim'
10lsp.configure('sumneko_lua', {
11 settings = {
12 Lua = {
13 diagnostics = {
14 globals = { 'vim' }
15 }
16 }
17 }
18})
19
20
21local cmp = require('cmp')
22local cmp_select = {behavior = cmp.SelectBehavior.Select}
23local cmp_mappings = lsp.defaults.cmp_mappings({
24 ['<C-p>'] = cmp.mapping.select_prev_item(cmp_select),
25 ['<C-n>'] = cmp.mapping.select_next_item(cmp_select),
26 ['<C-y>'] = cmp.mapping.confirm({ select = true }),
27 ["<C-Space>"] = cmp.mapping.complete(),
28})
29
30-- disable completion with tab
31-- this helps with copilot setup
32cmp_mappings['<Tab>'] = nil
33cmp_mappings['<S-Tab>'] = nil
34
35lsp.setup_nvim_cmp({
36 mapping = cmp_mappings
37})
38
39lsp.set_preferences({
40 suggest_lsp_servers = false,
41 sign_icons = {
42 error = 'E',
43 warn = 'W',
44 hint = 'H',
45 info = 'I'
46 }
47})
48
49lsp.on_attach(function(client, bufnr)
50 local opts = {buffer = bufnr, remap = false}
51
52 vim.keymap.set("n", "gd", function() vim.lsp.buf.definition() end, opts)
53 vim.keymap.set("n", "K", function() vim.lsp.buf.hover() end, opts)
54 vim.keymap.set("n", "<leader>vws", function() vim.lsp.buf.workspace_symbol() end, opts)
55 vim.keymap.set("n", "<leader>vd", function() vim.diagnostic.open_float() end, opts)
56 vim.keymap.set("n", "[d", function() vim.diagnostic.goto_next() end, opts)
57 vim.keymap.set("n", "]d", function() vim.diagnostic.goto_prev() end, opts)
58 vim.keymap.set("n", "<leader>vca", function() vim.lsp.buf.code_action() end, opts)
59 vim.keymap.set("n", "<leader>vrr", function() vim.lsp.buf.references() end, opts)
60 vim.keymap.set("n", "<leader>vrn", function() vim.lsp.buf.rename() end, opts)
61 vim.keymap.set("i", "<C-h>", function() vim.lsp.buf.signature_help() end, opts)
62end)
63
64lsp.setup()
65
66vim.diagnostic.config({
67 virtual_text = true,
68})
69
diff --git a/nvim/.config/nvim/after/plugin/treesitter.lua b/nvim/.config/nvim/after/plugin/treesitter.lua
new file mode 100644
index 0000000..9d5d923
--- /dev/null
+++ b/nvim/.config/nvim/after/plugin/treesitter.lua
@@ -0,0 +1,23 @@
1require'nvim-treesitter.configs'.setup {
2 -- A list of parser names, or "all"
3 ensure_installed = { "help", "javascript", "typescript", "c", "lua", "rust" },
4
5 -- Install parsers synchronously (only applied to `ensure_installed`)
6 sync_install = false,
7
8 -- Automatically install missing parsers when entering buffer
9 -- Recommendation: set to false if you don't have `tree-sitter` CLI installed locally
10 auto_install = true,
11
12 highlight = {
13 -- `false` will disable the whole extension
14 enable = true,
15
16 -- Setting this to true will run `:h syntax` and tree-sitter at the same time.
17 -- Set this to `true` if you depend on 'syntax' being enabled (like for indentation).
18 -- Using this option may slow down your editor, and you may see some duplicate highlights.
19 -- Instead of true it can also be a list of languages
20 additional_vim_regex_highlighting = false,
21 },
22}
23
diff --git a/nvim/.config/nvim/coc-settings.json b/nvim/.config/nvim/coc-settings.json
deleted file mode 100755
index 90df22a..0000000
--- a/nvim/.config/nvim/coc-settings.json
+++ /dev/null
@@ -1,14 +0,0 @@
1{
2 "pairs.enableCharacters": ["(", "[", "{", "'", "\"", "`"],
3 "suggest.noselect": false,
4 "coc.preferences.formatOnSaveFiletypes": [
5 "javascript",
6 "typescript",
7 "typescriptreact",
8 "json",
9 "javascriptreact",
10 "typescript.tsx",
11 "graphql"
12 ],
13 "clangd.path": "/home/x/.config/coc/extensions/coc-clangd-data/install/10.0.0/clangd_10.0.0/bin/clangd"
14}
diff --git a/nvim/.config/nvim/colors/jellybeans.vim b/nvim/.config/nvim/colors/jellybeans.vim
deleted file mode 100755
index bae6c69..0000000
--- a/nvim/.config/nvim/colors/jellybeans.vim
+++ /dev/null
@@ -1,748 +0,0 @@
1" Vim color file
2"
3" " __ _ _ _ "
4" " \ \ ___| | |_ _| |__ ___ __ _ _ __ ___ "
5" " \ \/ _ \ | | | | | _ \ / _ \/ _ | _ \/ __| "
6" " /\_/ / __/ | | |_| | |_| | __/ |_| | | | \__ \ "
7" " \___/ \___|_|_|\__ |____/ \___|\____|_| |_|___/ "
8" " \___/ "
9"
10" "A colorful, dark color scheme for Vim."
11"
12" File: jellybeans.vim
13" URL: github.com/nanotech/jellybeans.vim
14" Scripts URL: vim.org/scripts/script.php?script_id=2555
15" Maintainer: NanoTech (nanotech.nanotechcorp.net)
16" Version: 1.7
17" Last Change: June 21st, 2019
18" License: MIT
19" Contributors: Andrew Wong (w0ng)
20" Benjamin R. Haskell (benizi)
21" Brian Marshall (bmars)
22" Daniel Herbert (pocketninja)
23" David Liang <bmdavll at gmail dot com>
24" Filipe Silva (ninrod)
25" Henry So, Jr. <henryso@panix.com>
26" Ihor Kalnytskyi (ikalnytskyi)
27" Joe Doherty (docapotamus)
28" Karl Litterfeldt (Litterfeldt)
29" Keith Pitt (keithpitt)
30" Mike Schreifels (schreifels)
31" Philipp Rustemeier (12foo)
32" Rafael Bicalho (rbika)
33" Rich Healey (richo)
34" Siwen Yu (yusiwen)
35" Tim Willis (willist)
36" Tom McLaughlin (tmcoma)
37"
38" Copyright (c) 2009-2019 NanoTech
39"
40" Permission is hereby granted, free of charge, to any per‐
41" son obtaining a copy of this software and associated doc‐
42" umentation files (the “Software”), to deal in the Soft‐
43" ware without restriction, including without limitation
44" the rights to use, copy, modify, merge, publish, distrib‐
45" ute, sublicense, and/or sell copies of the Software, and
46" to permit persons to whom the Software is furnished to do
47" so, subject to the following conditions:
48"
49" The above copyright notice and this permission notice
50" shall be included in all copies or substantial portions
51" of the Software.
52"
53" THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY
54" KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO
55" THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICU‐
56" LAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
57" AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
58" DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CON‐
59" TRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CON‐
60" NECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
61" THE SOFTWARE.
62
63set background=dark
64
65hi clear
66
67if exists("syntax_on")
68 syntax reset
69endif
70
71let colors_name = "jellybeans"
72
73if has("gui_running") || (has('termguicolors') && &termguicolors)
74 let s:true_color = 1
75else
76 let s:true_color = 0
77endif
78
79if s:true_color || &t_Co >= 88
80 let s:low_color = 0
81else
82 let s:low_color = 1
83endif
84
85" Configuration Variables:
86" - g:jellybeans_overrides (default = {})
87" - g:jellybeans_use_lowcolor_black (default = 0)
88" - g:jellybeans_use_gui_italics (default = 1)
89" - g:jellybeans_use_term_italics (default = 0)
90
91let s:background_color = "NONE"
92let s:background_color = "000000"
93
94if exists("g:jellybeans_overrides")
95 let s:overrides = g:jellybeans_overrides
96else
97 let s:overrides = {}
98endif
99
100" Backwards compatibility
101if exists("g:jellybeans_background_color")
102 \ || exists("g:jellybeans_background_color_256")
103 \ || exists("g:jellybeans_use_term_background_color")
104
105 let s:overrides = deepcopy(s:overrides)
106
107 if !has_key(s:overrides, "background")
108 let s:overrides["background"] = {}
109 endif
110
111 if exists("g:jellybeans_background_color")
112 let s:overrides["background"]["guibg"] = g:jellybeans_background_color
113 endif
114
115 if exists("g:jellybeans_background_color_256")
116 let s:overrides["background"]["256ctermbg"] = g:jellybeans_background_color_256
117 endif
118
119 if exists("g:jellybeans_use_term_background_color")
120 \ && g:jellybeans_use_term_background_color
121 let s:overrides["background"]["ctermbg"] = "NONE"
122 let s:overrides["background"]["256ctermbg"] = "NONE"
123 endif
124endif
125
126if exists("g:jellybeans_use_lowcolor_black") && g:jellybeans_use_lowcolor_black
127 let s:termBlack = "Black"
128else
129 let s:termBlack = "Grey"
130endif
131
132" When `termguicolors` is set, Vim[^1] ignores `hi Normal guibg=NONE`
133" after Normal's `guibg` is already set to a color. See:
134"
135" - https://github.com/vim/vim/issues/981
136" - https://github.com/nanotech/jellybeans.vim/issues/64
137"
138" To work around this, ensure we don't set the default background
139" color before an override changes it to `NONE` by ensuring that the
140" background color isn't set to a value different from its override.
141"
142" [^1]: Tested on 8.0.567. Does not apply to Neovim.
143"
144if has_key(s:overrides, "background") && has_key(s:overrides["background"], "guibg")
145 let s:background_color = s:overrides["background"]["guibg"]
146endif
147
148" Color approximation functions by Henry So, Jr. and David Liang {{{
149" Added to jellybeans.vim by Daniel Herbert
150
151if &t_Co == 88
152
153 " returns an approximate grey index for the given grey level
154 fun! s:grey_number(x)
155 if a:x < 23
156 return 0
157 elseif a:x < 69
158 return 1
159 elseif a:x < 103
160 return 2
161 elseif a:x < 127
162 return 3
163 elseif a:x < 150
164 return 4
165 elseif a:x < 173
166 return 5
167 elseif a:x < 196
168 return 6
169 elseif a:x < 219
170 return 7
171 elseif a:x < 243
172 return 8
173 else
174 return 9
175 endif
176 endfun
177
178 " returns the actual grey level represented by the grey index
179 fun! s:grey_level(n)
180 if a:n == 0
181 return 0
182 elseif a:n == 1
183 return 46
184 elseif a:n == 2
185 return 92
186 elseif a:n == 3
187 return 115
188 elseif a:n == 4
189 return 139
190 elseif a:n == 5
191 return 162
192 elseif a:n == 6
193 return 185
194 elseif a:n == 7
195 return 208
196 elseif a:n == 8
197 return 231
198 else
199 return 255
200 endif
201 endfun
202
203 " returns the palette index for the given grey index
204 fun! s:grey_color(n)
205 if a:n == 0
206 return 16
207 elseif a:n == 9
208 return 79
209 else
210 return 79 + a:n
211 endif
212 endfun
213
214 " returns an approximate color index for the given color level
215 fun! s:rgb_number(x)
216 if a:x < 69
217 return 0
218 elseif a:x < 172
219 return 1
220 elseif a:x < 230
221 return 2
222 else
223 return 3
224 endif
225 endfun
226
227 " returns the actual color level for the given color index
228 fun! s:rgb_level(n)
229 if a:n == 0
230 return 0
231 elseif a:n == 1
232 return 139
233 elseif a:n == 2
234 return 205
235 else
236 return 255
237 endif
238 endfun
239
240 " returns the palette index for the given R/G/B color indices
241 fun! s:rgb_color(x, y, z)
242 return 16 + (a:x * 16) + (a:y * 4) + a:z
243 endfun
244
245else " assuming &t_Co == 256
246
247 " returns an approximate grey index for the given grey level
248 fun! s:grey_number(x)
249 if a:x < 14
250 return 0
251 else
252 let l:n = (a:x - 8) / 10
253 let l:m = (a:x - 8) % 10
254 if l:m < 5
255 return l:n
256 else
257 return l:n + 1
258 endif
259 endif
260 endfun
261
262 " returns the actual grey level represented by the grey index
263 fun! s:grey_level(n)
264 if a:n == 0
265 return 0
266 else
267 return 8 + (a:n * 10)
268 endif
269 endfun
270
271 " returns the palette index for the given grey index
272 fun! s:grey_color(n)
273 if a:n == 0
274 return 16
275 elseif a:n == 25
276 return 231
277 else
278 return 231 + a:n
279 endif
280 endfun
281
282 " returns an approximate color index for the given color level
283 fun! s:rgb_number(x)
284 if a:x < 75
285 return 0
286 else
287 let l:n = (a:x - 55) / 40
288 let l:m = (a:x - 55) % 40
289 if l:m < 20
290 return l:n
291 else
292 return l:n + 1
293 endif
294 endif
295 endfun
296
297 " returns the actual color level for the given color index
298 fun! s:rgb_level(n)
299 if a:n == 0
300 return 0
301 else
302 return 55 + (a:n * 40)
303 endif
304 endfun
305
306 " returns the palette index for the given R/G/B color indices
307 fun! s:rgb_color(x, y, z)
308 return 16 + (a:x * 36) + (a:y * 6) + a:z
309 endfun
310
311endif
312
313" returns the palette index to approximate the given R/G/B color levels
314fun! s:color(r, g, b)
315 " map greys directly (see xterm's 256colres.pl)
316 if &t_Co == 256 && a:r == a:g && a:g == a:b && a:r > 3 && a:r < 243
317 return (a:r - 8) / 10 + 232
318 endif
319
320 " get the closest grey
321 let l:gx = s:grey_number(a:r)
322 let l:gy = s:grey_number(a:g)
323 let l:gz = s:grey_number(a:b)
324
325 " get the closest color
326 let l:x = s:rgb_number(a:r)
327 let l:y = s:rgb_number(a:g)
328 let l:z = s:rgb_number(a:b)
329
330 if l:gx == l:gy && l:gy == l:gz
331 " there are two possibilities
332 let l:dgr = s:grey_level(l:gx) - a:r
333 let l:dgg = s:grey_level(l:gy) - a:g
334 let l:dgb = s:grey_level(l:gz) - a:b
335 let l:dgrey = (l:dgr * l:dgr) + (l:dgg * l:dgg) + (l:dgb * l:dgb)
336 let l:dr = s:rgb_level(l:gx) - a:r
337 let l:dg = s:rgb_level(l:gy) - a:g
338 let l:db = s:rgb_level(l:gz) - a:b
339 let l:drgb = (l:dr * l:dr) + (l:dg * l:dg) + (l:db * l:db)
340 if l:dgrey < l:drgb
341 " use the grey
342 return s:grey_color(l:gx)
343 else
344 " use the color
345 return s:rgb_color(l:x, l:y, l:z)
346 endif
347 else
348 " only one possibility
349 return s:rgb_color(l:x, l:y, l:z)
350 endif
351endfun
352
353fun! s:is_empty_or_none(str)
354 return empty(a:str) || a:str ==? "NONE"
355endfun
356
357" returns the palette index to approximate the 'rrggbb' hex string
358fun! s:rgb(rgb)
359 if s:is_empty_or_none(a:rgb)
360 return "NONE"
361 endif
362 let l:r = ("0x" . strpart(a:rgb, 0, 2)) + 0
363 let l:g = ("0x" . strpart(a:rgb, 2, 2)) + 0
364 let l:b = ("0x" . strpart(a:rgb, 4, 2)) + 0
365 return s:color(l:r, l:g, l:b)
366endfun
367
368fun! s:prefix_highlight_value_with(prefix, color)
369 if s:is_empty_or_none(a:color)
370 return "NONE"
371 else
372 return a:prefix . a:color
373 endif
374endfun
375
376fun! s:remove_italic_attr(attr)
377 let l:attr = join(filter(split(a:attr, ","), "v:val !=? 'italic'"), ",")
378 if empty(l:attr)
379 let l:attr = "NONE"
380 endif
381 return l:attr
382endfun
383
384" sets the highlighting for the given group
385fun! s:X(group, fg, bg, attr, lcfg, lcbg)
386 if s:low_color
387 let l:cmd = "hi ".a:group.
388 \ " ctermfg=".s:prefix_highlight_value_with("", a:lcfg).
389 \ " ctermbg=".s:prefix_highlight_value_with("", a:lcbg)
390 else
391 let l:cmd = "hi ".a:group.
392 \ " guifg=".s:prefix_highlight_value_with("#", a:fg).
393 \ " guibg=".s:prefix_highlight_value_with("#", a:bg)
394 if !s:true_color
395 let l:cmd = l:cmd.
396 \ " ctermfg=".s:rgb(a:fg).
397 \ " ctermbg=".s:rgb(a:bg)
398 endif
399 endif
400
401 let l:attr = s:prefix_highlight_value_with("", a:attr)
402
403 if exists("g:jellybeans_use_term_italics") && g:jellybeans_use_term_italics
404 let l:cterm_attr = l:attr
405 else
406 let l:cterm_attr = s:remove_italic_attr(l:attr)
407 endif
408
409 if !exists("g:jellybeans_use_gui_italics") || g:jellybeans_use_gui_italics
410 let l:gui_attr = l:attr
411 else
412 let l:gui_attr = s:remove_italic_attr(l:attr)
413 endif
414
415 let l:cmd = l:cmd." gui=".l:gui_attr." cterm=".l:cterm_attr
416 exec l:cmd
417endfun
418" }}}
419
420call s:X("Normal","e8e8d3",s:background_color,"","White","")
421set background=dark
422
423call s:X("CursorLine","","1c1c1c","","",s:termBlack)
424call s:X("CursorColumn","","1c1c1c","","",s:termBlack)
425
426" Some of Terminal.app's default themes have a cursor color
427" too close to Jellybeans' preferred MatchParen background
428" color to be easily distinguishable. Other terminals tend
429" to use a brighter cursor color.
430"
431" Use a more distinct color in Terminal.app, and also in
432" low-color terminals if the preferred background color is
433" not available.
434if !has('gui_running') && $TERM_PROGRAM == "Apple_Terminal"
435 let s:matchParenGuiFg = "dd0093"
436 let s:matchParenGuiBg = "000000"
437else
438 let s:matchParenGuiFg = "ffffff"
439 let s:matchParenGuiBg = "556779"
440endif
441if s:termBlack != "Black"
442 let s:matchParenTermFg = "Magenta"
443 let s:matchParenTermBg = ""
444else
445 let s:matchParenTermFg = ""
446 let s:matchParenTermBg = s:termBlack
447endif
448call s:X("MatchParen",s:matchParenGuiFg,s:matchParenGuiBg,"bold",
449\ s:matchParenTermFg,s:matchParenTermBg)
450
451call s:X("TabLine","000000","b0b8c0","italic","",s:termBlack)
452call s:X("TabLineFill","9098a0","","","",s:termBlack)
453call s:X("TabLineSel","000000","f0f0f0","italic,bold",s:termBlack,"White")
454
455" Auto-completion
456call s:X("Pmenu","ffffff","606060","","White",s:termBlack)
457call s:X("PmenuSel","101010","eeeeee","",s:termBlack,"White")
458
459call s:X("Visual","","404040","","",s:termBlack)
460call s:X("Cursor",s:background_color,"b0d0f0","","","")
461
462call s:X("LineNr","605958",s:background_color,"NONE",s:termBlack,"")
463call s:X("CursorLineNr","ccc5c4","","NONE","White","")
464call s:X("Comment","888888","","italic","Grey","")
465call s:X("Todo","c7c7c7","","bold","White",s:termBlack)
466
467call s:X("StatusLine","000000","dddddd","italic","","White")
468call s:X("StatusLineNC","ffffff","403c41","italic","White","Black")
469call s:X("VertSplit","282828","403c41","",s:termBlack,s:termBlack)
470call s:X("WildMenu","f0a0c0","302028","","Magenta","")
471
472call s:X("Folded","a0a8b0","384048","italic",s:termBlack,"")
473call s:X("FoldColumn","535D66","1f1f1f","","",s:termBlack)
474call s:X("SignColumn","777777","333333","","",s:termBlack)
475call s:X("ColorColumn","","000000","","",s:termBlack)
476
477call s:X("Title","70b950","","bold","Green","")
478
479call s:X("Constant","cf6a4c","","","Red","")
480call s:X("Special","799d6a","","","Green","")
481call s:X("Delimiter","668799","","","Grey","")
482
483call s:X("String","99ad6a","","","Green","")
484call s:X("StringDelimiter","556633","","","DarkGreen","")
485
486call s:X("Identifier","c6b6ee","","","LightCyan","")
487call s:X("Structure","8fbfdc","","","LightCyan","")
488call s:X("Function","fad07a","","","Yellow","")
489call s:X("Statement","8197bf","","","DarkBlue","")
490call s:X("PreProc","8fbfdc","","","LightBlue","")
491
492hi! link Operator Structure
493hi! link Conceal Operator
494
495call s:X("Type","ffb964","","","Yellow","")
496call s:X("NonText","606060",s:background_color,"",s:termBlack,"")
497
498call s:X("SpecialKey","444444","1c1c1c","",s:termBlack,"")
499
500call s:X("Search","f0a0c0","302028","underline","Magenta","")
501
502call s:X("Directory","dad085","","","Yellow","")
503call s:X("ErrorMsg","","a03949","","","DarkRed")
504hi! link Error ErrorMsg
505hi! link MoreMsg Special
506call s:X("Question","65C254","","","Green","")
507
508
509" Spell Checking
510
511call s:X("SpellBad","","902020","underline","","DarkRed")
512call s:X("SpellCap","","0000df","underline","","Blue")
513call s:X("SpellRare","","540063","underline","","DarkMagenta")
514call s:X("SpellLocal","","2D7067","underline","","Green")
515
516" Diff
517
518hi! link diffRemoved Constant
519hi! link diffAdded String
520
521" VimDiff
522
523call s:X("DiffAdd","D2EBBE","437019","","White","DarkGreen")
524call s:X("DiffDelete","40000A","700009","","DarkRed","DarkRed")
525call s:X("DiffChange","","2B5B77","","White","DarkBlue")
526call s:X("DiffText","8fbfdc","000000","reverse","Yellow","")
527
528" PHP
529
530hi! link phpFunctions Function
531call s:X("StorageClass","c59f6f","","","Red","")
532hi! link phpSuperglobal Identifier
533hi! link phpQuoteSingle StringDelimiter
534hi! link phpQuoteDouble StringDelimiter
535hi! link phpBoolean Constant
536hi! link phpNull Constant
537hi! link phpArrayPair Operator
538hi! link phpOperator Normal
539hi! link phpRelation Normal
540hi! link phpVarSelector Identifier
541
542" Python
543
544hi! link pythonOperator Statement
545
546" Ruby
547
548hi! link rubySharpBang Comment
549call s:X("rubyClass","447799","","","DarkBlue","")
550call s:X("rubyIdentifier","c6b6fe","","","Cyan","")
551hi! link rubyConstant Type
552hi! link rubyFunction Function
553
554call s:X("rubyInstanceVariable","c6b6fe","","","Cyan","")
555call s:X("rubySymbol","7697d6","","","Blue","")
556hi! link rubyGlobalVariable rubyInstanceVariable
557hi! link rubyModule rubyClass
558call s:X("rubyControl","7597c6","","","Blue","")
559
560hi! link rubyString String
561hi! link rubyStringDelimiter StringDelimiter
562hi! link rubyInterpolationDelimiter Identifier
563
564call s:X("rubyRegexpDelimiter","540063","","","Magenta","")
565call s:X("rubyRegexp","dd0093","","","DarkMagenta","")
566call s:X("rubyRegexpSpecial","a40073","","","Magenta","")
567
568call s:X("rubyPredefinedIdentifier","de5577","","","Red","")
569
570" Erlang
571
572hi! link erlangAtom rubySymbol
573hi! link erlangBIF rubyPredefinedIdentifier
574hi! link erlangFunction rubyPredefinedIdentifier
575hi! link erlangDirective Statement
576hi! link erlangNode Identifier
577
578" Elixir
579
580hi! link elixirAtom rubySymbol
581
582
583" JavaScript
584
585hi! link javaScriptValue Constant
586hi! link javaScriptRegexpString rubyRegexp
587hi! link javaScriptTemplateVar StringDelim
588hi! link javaScriptTemplateDelim Identifier
589hi! link javaScriptTemplateString String
590
591" CoffeeScript
592
593hi! link coffeeRegExp javaScriptRegexpString
594
595" Lua
596
597hi! link luaOperator Conditional
598
599" C
600
601hi! link cFormat Identifier
602hi! link cOperator Constant
603
604" Objective-C/Cocoa
605
606hi! link objcClass Type
607hi! link cocoaClass objcClass
608hi! link objcSubclass objcClass
609hi! link objcSuperclass objcClass
610hi! link objcDirective rubyClass
611hi! link objcStatement Constant
612hi! link cocoaFunction Function
613hi! link objcMethodName Identifier
614hi! link objcMethodArg Normal
615hi! link objcMessageName Identifier
616
617" Vimscript
618
619hi! link vimOper Normal
620
621" HTML
622
623hi! link htmlTag Statement
624hi! link htmlEndTag htmlTag
625hi! link htmlTagName htmlTag
626
627" XML
628
629hi! link xmlTag Statement
630hi! link xmlEndTag xmlTag
631hi! link xmlTagName xmlTag
632hi! link xmlEqual xmlTag
633hi! link xmlEntity Special
634hi! link xmlEntityPunct xmlEntity
635hi! link xmlDocTypeDecl PreProc
636hi! link xmlDocTypeKeyword PreProc
637hi! link xmlProcessingDelim xmlAttrib
638
639" Debugger.vim
640
641call s:X("DbgCurrent","DEEBFE","345FA8","","White","DarkBlue")
642call s:X("DbgBreakPt","","4F0037","","","DarkMagenta")
643
644" vim-indent-guides
645
646if !exists("g:indent_guides_auto_colors")
647 let g:indent_guides_auto_colors = 0
648endif
649call s:X("IndentGuidesOdd","","232323","","","")
650call s:X("IndentGuidesEven","","1b1b1b","","","")
651
652" Plugins, etc.
653
654hi! link TagListFileName Directory
655call s:X("PreciseJumpTarget","B9ED67","405026","","White","Green")
656
657" Manual overrides for 256-color terminals. Dark colors auto-map badly.
658if !s:low_color
659 hi StatusLineNC ctermbg=235
660 hi Folded ctermbg=236
661 hi DiffText ctermfg=81
662 hi DbgBreakPt ctermbg=53
663 hi IndentGuidesOdd ctermbg=235
664 hi IndentGuidesEven ctermbg=234
665endif
666
667if !empty("s:overrides")
668 fun! s:current_attr(group)
669 let l:synid = synIDtrans(hlID(a:group))
670 let l:attrs = []
671 for l:attr in ["bold", "italic", "reverse", "standout", "underline", "undercurl"]
672 if synIDattr(l:synid, l:attr, "gui") == 1
673 call add(l:attrs, l:attr)
674 endif
675 endfor
676 return join(l:attrs, ",")
677 endfun
678 fun! s:current_color(group, what, mode)
679 let l:color = synIDattr(synIDtrans(hlID(a:group)), a:what, a:mode)
680 if l:color == -1
681 return ""
682 else
683 return substitute(l:color, "^#", "", "")
684 endif
685 endfun
686 fun! s:load_color_def(group, def)
687 call s:X(a:group, get(a:def, "guifg", s:current_color(a:group, "fg", "gui")),
688 \ get(a:def, "guibg", s:current_color(a:group, "bg", "gui")),
689 \ get(a:def, "attr", s:current_attr(a:group)),
690 \ get(a:def, "ctermfg", s:current_color(a:group, "fg", "cterm")),
691 \ get(a:def, "ctermbg", s:current_color(a:group, "bg", "cterm")))
692 if !s:low_color
693 for l:prop in ["ctermfg", "ctermbg"]
694 let l:override_key = "256".l:prop
695 if has_key(a:def, l:override_key)
696 exec "hi ".a:group." ".l:prop."=".a:def[l:override_key]
697 endif
698 endfor
699 endif
700 endfun
701 fun! s:load_colors(defs)
702 for [l:group, l:def] in items(a:defs)
703 if l:group == "background"
704 call s:load_color_def("LineNr", l:def)
705 call s:load_color_def("NonText", l:def)
706 call s:load_color_def("Normal", l:def)
707 else
708 call s:load_color_def(l:group, l:def)
709 endif
710 unlet l:group
711 unlet l:def
712 endfor
713 endfun
714 call s:load_colors(s:overrides)
715 delf s:load_colors
716 delf s:load_color_def
717 delf s:current_color
718 delf s:current_attr
719endif
720
721" delete functions {{{
722delf s:X
723delf s:remove_italic_attr
724delf s:prefix_highlight_value_with
725delf s:rgb
726delf s:is_empty_or_none
727delf s:color
728delf s:rgb_color
729delf s:rgb_level
730delf s:rgb_number
731delf s:grey_color
732delf s:grey_level
733delf s:grey_number
734" }}}
735
736" extras
737hi NERDTreeHelp guifg=#eeeeee ctermfg=255 guibg=NONE ctermbg=NONE gui=NONE cterm=NONE
738hi NERDTreeHelpKey guifg=#c9d05c ctermfg=185 guibg=NONE ctermbg=NONE gui=NONE cterm=NONE
739hi NERDTreeHelpCommand guifg=#ffc24b ctermfg=215 guibg=NONE ctermbg=NONE gui=NONE cterm=NONE
740hi NERDTreeHelpTitle guifg=#b3deef ctermfg=153 guibg=NONE ctermbg=NONE gui=NONE cterm=NONE
741hi NERDTreeUp guifg=#c9d05c ctermfg=185 guibg=NONE ctermbg=NONE gui=NONE cterm=NONE
742hi NERDTreeCWD guifg=#73cef4 ctermfg=81 guibg=NONE ctermbg=NONE gui=NONE cterm=NONE
743hi NERDTreeOpenable guifg=#f43753 ctermfg=203 guibg=NONE ctermbg=NONE gui=NONE cterm=NONE
744hi NERDTreeClosable guifg=#ffc24b ctermfg=215 guibg=NONE ctermbg=NONE gui=NONE cterm=NONE
745hi GitGutterAdd guifg=#c9d05c ctermfg=185 guibg=NONE ctermbg=NONE gui=NONE cterm=NONE
746hi GitGutterChange guifg=#b3deef ctermfg=153 guibg=NONE ctermbg=NONE gui=NONE cterm=NONE
747hi GitGutterDelete guifg=#f43753 ctermfg=203 guibg=NONE ctermbg=NONE gui=NONE cterm=NONE
748hi GitGutterChangeDelete guifg=#f43753 ctermfg=203 guibg=NONE ctermbg=NONE gui=NONE cterm=NONE
diff --git a/nvim/.config/nvim/colors/pencil.vim b/nvim/.config/nvim/colors/pencil.vim
index 6ec59a5..6ec59a5 100755..100644
--- a/nvim/.config/nvim/colors/pencil.vim
+++ b/nvim/.config/nvim/colors/pencil.vim
diff --git a/nvim/.config/nvim/colors/plain.vim b/nvim/.config/nvim/colors/plain.vim
index 4b712bd..80f0b0e 100644
--- a/nvim/.config/nvim/colors/plain.vim
+++ b/nvim/.config/nvim/colors/plain.vim
@@ -1,3 +1,17 @@
1" Name: plain.vim
2" Version: 0.1
3" Maintainer: github.com/andreypopp
4" License: The MIT License (MIT)
5"
6" Based on
7"
8" https://github.com/pbrisbin/vim-colors-off (MIT License)
9"
10" which in turn based on
11"
12" https://github.com/reedes/vim-colors-pencil (MIT License)
13"
14"""
1hi clear 15hi clear
2 16
3if exists('syntax on') 17if exists('syntax on')
@@ -10,8 +24,8 @@ let s:black = { "gui": "#222222", "cterm": "0" }
10let s:medium_gray = { "gui": "#767676", "cterm": "8" } 24let s:medium_gray = { "gui": "#767676", "cterm": "8" }
11let s:white = { "gui": "#F1F1F1", "cterm": "7" } 25let s:white = { "gui": "#F1F1F1", "cterm": "7" }
12let s:actual_white = { "gui": "#FFFFFF", "cterm": "15" } 26let s:actual_white = { "gui": "#FFFFFF", "cterm": "15" }
13let s:light_black = { "gui": "#424242", "cterm": "11" } 27let s:light_black = { "gui": "#424242", "cterm": "8" }
14let s:lighter_black = { "gui": "#545454", "cterm": "12" } 28let s:lighter_black = { "gui": "#545454", "cterm": "8" }
15let s:subtle_black = { "gui": "#303030", "cterm": "11" } 29let s:subtle_black = { "gui": "#303030", "cterm": "11" }
16let s:light_gray = { "gui": "#999999", "cterm": "12" } 30let s:light_gray = { "gui": "#999999", "cterm": "12" }
17let s:lighter_gray = { "gui": "#CCCCCC", "cterm": "7" } 31let s:lighter_gray = { "gui": "#CCCCCC", "cterm": "7" }
@@ -34,25 +48,6 @@ let s:light_yellow = { "gui": "#F3E430", "cterm": "3" }
34let s:dark_yellow = { "gui": "#A89C14", "cterm": "3" } 48let s:dark_yellow = { "gui": "#A89C14", "cterm": "3" }
35 49
36if &background == "dark" 50if &background == "dark"
37 let s:bg = s:white
38 let s:bg_subtle = s:lighter_gray
39 let s:bg_very_subtle = s:light_gray
40 let s:norm = s:light_black
41 let s:norm_subtle = s:lighter_black
42 let s:purple = s:dark_purple
43 let s:cyan = s:dark_cyan
44 let s:green = s:dark_green
45 let s:red = s:dark_red
46 let s:yellow = s:dark_yellow
47 let s:visual = s:light_blue
48 let s:cursor_line = s:medium_gray
49 let s:status_line = s:lighter_gray
50 let s:status_line_nc = s:lighter_black
51 let s:constant = s:dark_blue
52 let s:comment = s:light_gray
53 let s:selection = s:light_yellow
54 let s:warning = s:yellow
55else
56 let s:bg = s:black 51 let s:bg = s:black
57 let s:bg_subtle = s:light_black 52 let s:bg_subtle = s:light_black
58 let s:bg_very_subtle = s:subtle_black 53 let s:bg_very_subtle = s:subtle_black
@@ -71,6 +66,25 @@ else
71 let s:comment = s:lighter_black 66 let s:comment = s:lighter_black
72 let s:selection = s:light_purple 67 let s:selection = s:light_purple
73 let s:warning = s:yellow 68 let s:warning = s:yellow
69else
70 let s:bg = s:white
71 let s:bg_subtle = s:lighter_gray
72 let s:bg_very_subtle = s:light_gray
73 let s:norm = s:light_black
74 let s:norm_subtle = s:lighter_black
75 let s:purple = s:dark_purple
76 let s:cyan = s:dark_cyan
77 let s:green = s:dark_green
78 let s:red = s:dark_red
79 let s:yellow = s:dark_yellow
80 let s:visual = s:light_blue
81 let s:cursor_line = s:medium_gray
82 let s:status_line = s:lighter_gray
83 let s:status_line_nc = s:lighter_black
84 let s:constant = s:dark_blue
85 let s:comment = s:light_gray
86 let s:selection = s:light_yellow
87 let s:warning = s:yellow
74endif 88endif
75 89
76" https://github.com/noahfrederick/vim-hemisu/ 90" https://github.com/noahfrederick/vim-hemisu/
@@ -93,7 +107,6 @@ call s:h("Noise", {"fg": s:norm_subtle})
93call s:h("Cursor", {"bg": s:green, "fg": s:norm}) 107call s:h("Cursor", {"bg": s:green, "fg": s:norm})
94call s:h("Comment", {"fg": s:comment, "cterm": "italic"}) 108call s:h("Comment", {"fg": s:comment, "cterm": "italic"})
95call s:h("Function", {"fg": s:norm, "cterm": "bold"}) 109call s:h("Function", {"fg": s:norm, "cterm": "bold"})
96call s:h("FloatWin", {"fg": s:norm, "bg": s:black})
97 110
98hi! link Constant firstAccent 111hi! link Constant firstAccent
99hi! link Character Constant 112hi! link Character Constant
@@ -193,7 +206,7 @@ call s:h("StatusLineOk", {"gui": "underline", "bg": s:bg, "fg": s:green})
193call s:h("StatusLineError", {"gui": "underline", "bg": s:bg, "fg": s:pink}) 206call s:h("StatusLineError", {"gui": "underline", "bg": s:bg, "fg": s:pink})
194call s:h("StatusLineWarning", {"gui": "underline", "bg": s:bg, "fg": s:warning}) 207call s:h("StatusLineWarning", {"gui": "underline", "bg": s:bg, "fg": s:warning})
195 208
196call s:h("Pmenu", {"fg": s:norm, "bg": s:bg_subtle}) 209call s:h("Pmenu", {"fg": s:norm, "bg": s:bg_very_subtle})
197call s:h("PmenuSel", {"fg": s:green, "bg": s:bg_very_subtle, "gui": "bold"}) 210call s:h("PmenuSel", {"fg": s:green, "bg": s:bg_very_subtle, "gui": "bold"})
198call s:h("PmenuSbar", {"fg": s:norm, "bg": s:bg_subtle}) 211call s:h("PmenuSbar", {"fg": s:norm, "bg": s:bg_subtle})
199call s:h("PmenuThumb", {"fg": s:norm, "bg": s:bg_subtle}) 212call s:h("PmenuThumb", {"fg": s:norm, "bg": s:bg_subtle})
@@ -239,7 +252,7 @@ hi link TSBoolean Constant
239hi link TSCharacter Constant 252hi link TSCharacter Constant
240hi link TSComment Comment 253hi link TSComment Comment
241hi link TSConstructor Normal 254hi link TSConstructor Normal
242hi link TSConditional Statement 255hi link TSConditional Normal
243hi link TSConstant Constant 256hi link TSConstant Constant
244hi link TSConstBuiltin secondAccent 257hi link TSConstBuiltin secondAccent
245hi link TSConstMacro secondAccent 258hi link TSConstMacro secondAccent
@@ -248,18 +261,18 @@ hi link TSException Error
248hi link TSField Normal 261hi link TSField Normal
249hi link TSFloat Constant 262hi link TSFloat Constant
250hi link TSFunction Normal 263hi link TSFunction Normal
251hi link TSFuncBuiltin secondAccent 264hi link TSFuncBuiltin Noise
252hi link TSFuncMacro secondAccent 265hi link TSFuncMacro secondAccent
253hi link TSInclude Noise 266hi link TSInclude Noise
254hi link TSKeyword Statement 267hi link TSKeyword Noise
255hi link TSKeywordFunction Statement 268hi link TSKeywordFunction Noise
256hi link TSLabel Noise 269hi link TSLabel Noise
257hi link TSMethod Normal 270hi link TSMethod Normal
258hi link TSNamespace Noise 271hi link TSNamespace Noise
259hi link TSNone Noise 272hi link TSNone Noise
260hi link TSNumber Constant 273hi link TSNumber Constant
261hi link TSOperator Normal 274hi link TSOperator Normal
262hi link TSParameter Noise 275hi link TSParameter Statement
263hi link TSParameterReference Statement 276hi link TSParameterReference Statement
264hi link TSProperty TSField 277hi link TSProperty TSField
265hi link TSPunctDelimiter Noise 278hi link TSPunctDelimiter Noise
@@ -269,6 +282,7 @@ hi link TSRepeat Normal
269hi link TSString Constant 282hi link TSString Constant
270hi link TSStringRegex secondAccent 283hi link TSStringRegex secondAccent
271hi link TSStringEscape secondAccent 284hi link TSStringEscape secondAccent
285hi link TSStringSpecial secondAccent
272hi link TSTag Statement 286hi link TSTag Statement
273hi link TSTagDelimiter Noise 287hi link TSTagDelimiter Noise
274hi link TSText Normal 288hi link TSText Normal
@@ -278,11 +292,10 @@ hi link TSStrike Underlined
278hi link TSTitle Statement 292hi link TSTitle Statement
279hi link TSLiteral Noise 293hi link TSLiteral Noise
280hi link TSURI Constant 294hi link TSURI Constant
281hi link TSType Noise 295hi link TSType secondAccent
282hi link TSTypeBuiltin secondAccent 296hi link TSTypeBuiltin secondAccent
283hi link TSVariable Normal 297hi link TSVariable Normal
284hi link TSVariableBuiltin Normal 298hi link TSVariableBuiltin Normal
285hi link TSRepeat Statement
286 299
287" nvim-lsp diagnostics 300" nvim-lsp diagnostics
288hi link LspDiagnosticsDefaultError Error 301hi link LspDiagnosticsDefaultError Error
@@ -332,6 +345,15 @@ hi link cFormat secondAccent
332hi link nixBuiltin secondAccent 345hi link nixBuiltin secondAccent
333hi link nixNamespacedBuiltin secondAccent 346hi link nixNamespacedBuiltin secondAccent
334 347
348hi link awkPatterns secondAccent
349hi link awkVariables Normal
350hi link awkOperator Normal
351hi link awkExpression Noise
352hi link awkArrayElement Noise
353hi link awkFieldVars firstAccent
354hi link awkSpecialPrintf secondAccent
355hi link awkSpecialCharacter Noise
356
335hi link sqlSpecial firstAccent 357hi link sqlSpecial firstAccent
336hi link sqlKeyword secondAccent 358hi link sqlKeyword secondAccent
337 359
@@ -364,6 +386,3 @@ hi link markdownHeadingDelimiter Constant
364call s:h("cssBraces", {"bg": s:bg, "fg": s:selection}) 386call s:h("cssBraces", {"bg": s:bg, "fg": s:selection})
365hi link cssTextProp Noise 387hi link cssTextProp Noise
366hi link cssTagName Normal 388hi link cssTagName Normal
367
368" floatwin
369hi link NormalFloat FloatWin
diff --git a/nvim/.config/nvim/init.lua b/nvim/.config/nvim/init.lua
new file mode 100644
index 0000000..af18fe3
--- /dev/null
+++ b/nvim/.config/nvim/init.lua
@@ -0,0 +1,3 @@
1require("map")
2require("set")
3require("plugins")
diff --git a/nvim/.config/nvim/init.vim b/nvim/.config/nvim/init.vim
deleted file mode 100755
index 31f8aa2..0000000
--- a/nvim/.config/nvim/init.vim
+++ /dev/null
@@ -1,281 +0,0 @@
1" vimplug
2call plug#begin()
3Plug 'neoclide/coc.nvim', {'branch': 'release'}
4Plug 'junegunn/fzf', { 'do': { -> fzf#install() } }
5Plug 'junegunn/fzf.vim'
6Plug 'Shougo/deol.nvim'
7Plug 'ap/vim-css-color'
8Plug 'tpope/vim-eunuch'
9Plug 'tpope/vim-commentary'
10Plug 'scrooloose/nerdtree'
11Plug 'junegunn/goyo.vim'
12Plug 'airblade/vim-gitgutter'
13Plug 'godlygeek/tabular'
14Plug 'plasticboy/vim-markdown'
15Plug 'sh-ubh/vim-bujo'
16Plug 'lervag/vimtex'
17Plug 'metakirby5/codi.vim'
18Plug 'hashivim/vim-terraform'
19call plug#end()
20
21" sets
22set guicursor=
23set number relativenumber
24set mouse=a
25set background=dark
26syntax enable
27set cursorline
28set ignorecase
29set smartcase
30set wildmenu " Tab autocomplete in command mode
31set autoread " Auto reload changed files
32
33" Spaces & Tabs
34set tabstop=4 " number of visual spaces per TAB
35set softtabstop=4 " number of spaces in tab when editing
36set shiftwidth=4 " number of spaces to use for autoindent
37set expandtab " tabs are space
38set autoindent
39set copyindent " copy indent from the previous line
40colorscheme pencil
41"hi Normal ctermbg=16 guibg=#000000
42"hi LineNr ctermbg=16 guibg=#000000
43
44" Change background based on macos theme
45" let output = system("defaults read -g AppleInterfaceStyle")
46" if v:shell_error != 0
47" set background=light
48" colorscheme plain
49" else
50" set background=dark
51" colorscheme pencil
52" endif
53
54let mapleader=" "
55
56" Reload vimrc
57nnoremap <leader>sv :source $VIMRC<CR>
58
59" Alias write and quit to Q
60nnoremap <leader>q :wq<CR>
61nnoremap <leader>w :w<CR>
62
63" toggle fzf
64nnoremap <leader><tab> :FZF<CR>
65
66" Save file as sudo when no sudo permissions
67cmap w!! w !sudo tee > /dev/null %
68
69" vim-bujo
70nmap <C-N> <Plug>BujoAddnormal
71imap <C-N> <Plug>BujoAddinsert
72nmap <C-P> <Plug>BujoChecknormal
73imap <C-P> <Plug>BujoCheckinsert
74
75" nerdtree
76let g:NERDTreeWinPos = "right"
77map <leader>n :NERDTreeToggle<CR>
78autocmd StdinReadPre * let s:std_in=1
79autocmd VimEnter * if argc() == 0 && !exists("s:std_in") | NERDTree | endif
80autocmd bufenter * if (winnr("$") == 1 && exists("b:NERDTree") && b:NERDTree.isTabTree()) | q | endif
81
82" system clipboard
83" set clipboard+=unnamedplus
84
85" Fix indenting visual block
86vmap < <gv
87vmap > >gv
88
89" git gutter settings
90highlight GitGutterAdd guifg=#009900 ctermfg=Green
91highlight GitGutterChange guifg=#bbbb00 ctermfg=Yellow
92highlight GitGutterDelete guifg=#ff2222 ctermfg=Red
93nmap ) <Plug>(GitGutterNextHunk)
94nmap ( <Plug>(GitGutterPrevHunk)
95let g:gitgutter_enabled = 1
96let g:gitgutter_map_keys = 0
97let g:gitgutter_highlight_linenrs = 1
98
99" vim-markdown
100let g:vim_markdown_no_default_key_mappings=1
101let g:vim_markdown_toml_frontmatter=1
102let g:vim_markdown_yaml_frontmatter=1
103let g:vim_markdown_folding_disabled=1
104let g:vim_markdown_conceal=0
105
106" vimtex
107let g:tex_flavor = 'latex'
108
109" insert centered
110autocmd InsertEnter * norm zz
111
112" shortcut split navigation
113map <C-h> <C-w>h
114map <C-j> <C-w>j
115map <C-k> <C-w>k
116map <C-l> <C-w>l
117
118" replace all using S
119nnoremap S :%s//gI<Left><Left><Left>
120
121" italic comments
122hi Comment cterm=italic
123
124" statusbar
125scriptencoding utf-8
126
127" templates
128autocmd BufNewFile * silent! 0r $HOME/.config/nvim/templates/skelton.%:e
129
130" statusline
131hi PrimaryBlock ctermbg=NONE ctermfg=237
132hi ModeBlock ctermbg=NONE ctermfg=2
133hi SecondaryBlock ctermbg=NONE ctermfg=237
134hi TeritaryBlock ctermbg=NONE ctermfg=9
135hi Blanks ctermbg=NONE
136hi statusline ctermbg=NONE
137let g:currentmode={
138 \ 'n' : 'NORMAL ',
139 \ 'no' : 'N·OPERATOR PENDING ',
140 \ 'v' : 'VISUAL ',
141 \ 'V' : 'V·LINE ',
142 \ '' : 'V·BLOCK ',
143 \ 's' : 'SELECT ',
144 \ 'S' : 'S·LINE ',
145 \ '' : 'S·BLOCK ',
146 \ 'i' : 'INSERT ',
147 \ 'R' : 'REPLACE ',
148 \ 'Rv' : 'V·REPLACE ',
149 \ 'c' : 'COMMAND ',
150 \ 'cv' : 'VIM EX ',
151 \ 'ce' : 'EX ',
152 \ 'r' : 'PROMPT ',
153 \ 'rm' : 'MORE ',
154 \ 'r?' : 'CONFIRM ',
155 \ '!' : 'SHELL ',
156 \ 't' : 'TERMINAL '}
157set statusline=
158set statusline+=%#ModeBlock#
159set statusline+=\ %{g:currentmode[mode()]}
160set statusline+=%#TeritaryBlock#
161set statusline+=\ %f\
162set statusline+=%M\
163set statusline+=%#Blanks#
164set statusline+=%=
165set statusline+=%#PrimaryBlock#
166set statusline+=\ %Y\
167set statusline+=%#SecondaryBlock#
168set statusline+=\ %P\
169
170" ------COC SETTINGS------
171" prettier command for coc
172command! -nargs=0 Prettier :CocCommand prettier.formatFile
173let g:coc_global_extensions = [
174 \ 'coc-snippets',
175 \ 'coc-pairs',
176 \ 'coc-prettier',
177 \ 'coc-tsserver',
178 \ 'coc-html',
179 \ 'coc-css',
180 \ 'coc-json',
181 \ 'coc-clangd',
182 \ 'coc-python',
183 \ 'coc-sh',
184 \ 'coc-vimtex',
185 \ 'coc-go'
186 \ ]
187
188" From Coc Readme
189set updatetime=300
190
191" Some servers have issues with backup files, see #649
192set nobackup
193set nowritebackup
194
195" don't give |ins-completion-menu| messages.
196set shortmess+=c
197
198" always show signcolumns
199set signcolumn=yes
200
201" Use tab for trigger completion with characters ahead and navigate.
202" Use command ':verbose imap <tab>' to make sure tab is not mapped by other plugin.
203inoremap <silent><expr> <TAB>
204 \ pumvisible() ? "\<C-n>" :
205 \ <SID>check_back_space() ? "\<TAB>" :
206 \ coc#refresh()
207inoremap <expr><S-TAB> pumvisible() ? "\<C-p>" : "\<C-h>"
208
209function! s:check_back_space() abort
210 let col = col('.') - 1
211 return !col || getline('.')[col - 1] =~# '\s'
212endfunction
213
214" Use <c-space> to trigger completion.
215inoremap <silent><expr> <c-space> coc#refresh()
216
217" Use <cr> to confirm completion, `<C-g>u` means break undo chain at current position.
218" Coc only does snippet and additional edit on confirm.
219inoremap <expr> <cr> pumvisible() ? "\<C-y>" : "\<C-g>u\<CR>"
220" Or use `complete_info` if your vim support it, like:
221" inoremap <expr> <cr> complete_info()["selected"] != "-1" ? "\<C-y>" : "\<C-g>u\<CR>"
222
223" Use `[g` and `]g` to navigate diagnostics
224nmap <silent> [g <Plug>(coc-diagnostic-prev)
225nmap <silent> ]g <Plug>(coc-diagnostic-next)
226
227" Remap keys for gotos
228nmap <silent> gd <Plug>(coc-definition)
229nmap <silent> gy <Plug>(coc-type-definition)
230nmap <silent> gi <Plug>(coc-implementation)
231nmap <silent> gr <Plug>(coc-references)
232
233function! s:show_documentation()
234 if (index(['vim','help'], &filetype) >= 0)
235 execute 'h '.expand('<cword>')
236 else
237 call CocAction('doHover')
238 endif
239endfunction
240
241" Remap for rename current word
242nmap <rn> <Plug>(coc-rename)
243
244" Remap for format selected region
245xmap <leader>f <Plug>(coc-format-selected)
246nmap <leader>f <Plug>(coc-format-selected)
247
248augroup mygroup
249 autocmd!
250 " Setup formatexpr specified filetype(s).
251 autocmd FileType typescript,json setl formatexpr=CocAction('formatSelected')
252 " Update signature help on jump placeholder
253 autocmd User CocJumpPlaceholder call CocActionAsync('showSignatureHelp')
254augroup end
255
256" Remap for do codeAction of selected region, ex: `<leader>aap` for current paragraph
257xmap <leader>a <Plug>(coc-codeaction-selected)
258nmap <leader>a <Plug>(coc-codeaction-selected)
259
260" Remap for do codeAction of current line
261nmap <leader>ac <Plug>(coc-codeaction)
262" Fix autofix problem of current line
263nmap <leader>qf <Plug>(coc-fix-current)
264
265" Create mappings for function text object, requires document symbols feature of languageserver.
266xmap if <Plug>(coc-funcobj-i)
267xmap af <Plug>(coc-funcobj-a)
268omap if <Plug>(coc-funcobj-i)
269omap af <Plug>(coc-funcobj-a)
270
271" Use `:Format` to format current buffer
272command! -nargs=0 Format :call CocAction('format')
273
274" Use `:Fold` to fold current buffer
275command! -nargs=? Fold :call CocAction('fold', <f-args>)
276
277" use `:OR` for organize import of current buffer
278command! -nargs=0 OR :call CocAction('runCommand', 'editor.action.organizeImport')
279
280" Add status line support, for integration with other plugin, checkout `:h coc-status`
281set statusline^=%{coc#status()}%{get(b:,'coc_current_function','')}
diff --git a/nvim/.config/nvim/lua/map.lua b/nvim/.config/nvim/lua/map.lua
new file mode 100644
index 0000000..b158332
--- /dev/null
+++ b/nvim/.config/nvim/lua/map.lua
@@ -0,0 +1,47 @@
1vim.g.mapleader = " "
2vim.keymap.set("n", "<leader>n", vim.cmd.Ex)
3
4vim.keymap.set("v", "J", ":m '>+1<CR>gv=gv")
5vim.keymap.set("v", "K", ":m '<-2<CR>gv=gv")
6
7vim.keymap.set("n", "J", "mzJ`z")
8vim.keymap.set("n", "<C-d>", "<C-d>zz")
9vim.keymap.set("n", "<C-u>", "<C-u>zz")
10vim.keymap.set("n", "n", "nzzzv")
11vim.keymap.set("n", "N", "Nzzzv")
12
13-- greatest remap ever
14vim.keymap.set("x", "<leader>p", [["_dP]])
15
16-- next greatest remap ever : asbjornHaland
17vim.keymap.set({"n", "v"}, "<leader>y", [["+y]])
18vim.keymap.set("n", "<leader>Y", [["+Y]])
19
20vim.keymap.set({"n", "v"}, "<leader>d", [["_d]])
21
22vim.keymap.set("n", "<leader>f", vim.lsp.buf.format)
23
24vim.keymap.set("n", "<C-k>", "<cmd>cnext<CR>zz")
25vim.keymap.set("n", "<C-j>", "<cmd>cprev<CR>zz")
26vim.keymap.set("n", "<leader>k", "<cmd>lnext<CR>zz")
27vim.keymap.set("n", "<leader>j", "<cmd>lprev<CR>zz")
28
29vim.keymap.set("n", "<leader>s", [[:%s/\<<C-r><C-w>\>/<C-r><C-w>/gI<Left><Left><Left>]])
30vim.keymap.set("n", "<leader>x", "<cmd>!chmod +x %<CR>", { silent = true })
31
32vim.keymap.set("n", "<leader><tab>", ":FZF<CR>")
33vim.keymap.set("n", "<leader>q", ":wq<CR>")
34vim.keymap.set("n", "<leader>w", ":w<CR>")
35
36vim.keymap.set("n", "<C-h>", "<C-w>h")
37vim.keymap.set("n", "<C-j>", "<C-w>j")
38vim.keymap.set("n", "<C-k>", "<C-w>k")
39vim.keymap.set("n", "<C-l>", "<C-w>l")
40
41vim.keymap.set("n", "S", ":%s//gI<Left><Left><Left>")
42
43-- bujo
44vim.keymap.set("n", "<C-n>", "<Plug>BujoAddnormal")
45vim.keymap.set("i", "<C-n>", "<Plug>BujoAddinsert")
46vim.keymap.set("n", "<C-p>", "<Plug>BujoChecknormal")
47vim.keymap.set("i", "<C-p>", "<Plug>BujoCheckinsert")
diff --git a/nvim/.config/nvim/lua/plugins.lua b/nvim/.config/nvim/lua/plugins.lua
new file mode 100644
index 0000000..569a7fc
--- /dev/null
+++ b/nvim/.config/nvim/lua/plugins.lua
@@ -0,0 +1,40 @@
1-- This file can be loaded by calling `lua require('plugins')` from your init.vim
2
3-- Only required if you have packer configured as `opt`
4vim.cmd [[packadd packer.nvim]]
5
6return require('packer').startup(function(use)
7 -- Packer can manage itself
8 use 'wbthomason/packer.nvim'
9 use({'nvim-treesitter/nvim-treesitter', run = ':TSUpdate'})
10 use {
11 'VonHeikemen/lsp-zero.nvim',
12 requires = {
13 -- LSP Support
14 {'neovim/nvim-lspconfig'},
15 {'williamboman/mason.nvim'},
16 {'williamboman/mason-lspconfig.nvim'},
17
18 -- Autocompletion
19 {'hrsh7th/nvim-cmp'},
20 {'hrsh7th/cmp-buffer'},
21 {'hrsh7th/cmp-path'},
22 {'saadparwaiz1/cmp_luasnip'},
23 {'hrsh7th/cmp-nvim-lsp'},
24 {'hrsh7th/cmp-nvim-lua'},
25
26 -- Snippets
27 {'L3MON4D3/LuaSnip'},
28 {'rafamadriz/friendly-snippets'},
29 }
30 }
31 use { "junegunn/fzf", run = ":call fzf#install()" }
32 use 'airblade/vim-gitgutter'
33 use 'tpope/vim-commentary'
34 use 'sh-ubh/vim-bujo'
35 use {
36 'windwp/nvim-autopairs',
37 config = function() require("nvim-autopairs").setup {} end
38 }
39
40end)
diff --git a/nvim/.config/nvim/lua/set.lua b/nvim/.config/nvim/lua/set.lua
new file mode 100644
index 0000000..923eb9a
--- /dev/null
+++ b/nvim/.config/nvim/lua/set.lua
@@ -0,0 +1,55 @@
1vim.opt.guicursor = ""
2
3vim.opt.nu = true
4vim.opt.relativenumber = true
5
6vim.opt.tabstop = 4
7vim.opt.softtabstop = 4
8vim.opt.shiftwidth = 4
9vim.opt.expandtab = true
10
11vim.opt.smartindent = true
12
13vim.opt.wrap = false
14
15vim.opt.swapfile = false
16vim.opt.backup = false
17vim.opt.undodir = os.getenv("HOME") .. "/.cache/nvim/undodir"
18vim.opt.undofile = true
19
20vim.opt.hlsearch = false
21vim.opt.incsearch = true
22
23vim.opt.termguicolors = true
24
25vim.opt.scrolloff = 8
26vim.opt.signcolumn = "yes"
27vim.opt.isfname:append("@-@")
28
29vim.opt.updatetime = 50
30
31vim.opt.syntax = "enable"
32vim.opt.cursorline = true
33vim.opt.ignorecase = true
34vim.opt.smartcase = true
35vim.opt.wildmenu = true
36vim.opt.autoread = true
37
38vim.cmd('colorscheme plain')
39
40-- gitgutter options
41vim.g.gitgutter_override_sign_column_highlight = 0
42vim.g.gitgutter_sign_added = '+'
43vim.g.gitgutter_sign_modified = '±'
44vim.g.gitgutter_sign_removed = '-'
45vim.g.gitgutter_sign_removed_first_line = '^'
46vim.g.gitgutter_sign_modified_removed = '#'
47
48-- netrw options
49vim.g.netrw_browse_split = 0
50vim.g.netrw_banner = 0
51vim.g.netrw_winsize = 25
52
53-- set statusline
54stl = require('statusline.line')
55vim.opt.statusline = '%!luaeval("stl.statusline()")'
diff --git a/nvim/.config/nvim/lua/statusline/git.lua b/nvim/.config/nvim/lua/statusline/git.lua
new file mode 100644
index 0000000..4d3492c
--- /dev/null
+++ b/nvim/.config/nvim/lua/statusline/git.lua
@@ -0,0 +1,45 @@
1local M = {}
2
3local sep = package.config:sub(1,1)
4
5local function find_git_dir()
6 local file_dir = vim.fn.expand('%:p:h') .. ';'
7 local git_dir = vim.fn.finddir('.git', file_dir)
8 if #git_dir > 0 then
9 M.in_git = true
10 end
11 return git_dir
12end
13
14local function get_git_head(head_file)
15 local f_head = io.open(head_file)
16 if f_head then
17 local HEAD = f_head:read()
18 f_head:close()
19 local branch = HEAD:match('ref: refs/heads/(.+)$')
20 if branch then M.git_branch = branch
21 else M.git_branch = HEAD:sub(1,7) end
22 end
23 return nil
24end
25
26-- event watcher to watch head file
27local file_changed = vim.loop.new_fs_event()
28local function watch_head()
29 file_changed:stop()
30 local git_dir = find_git_dir()
31 if #git_dir > 0 then
32 local head_file = git_dir..sep..'HEAD'
33 get_git_head(head_file)
34 file_changed:start(head_file, {}, vim.schedule_wrap(function()
35 -- reset file-watch
36 watch_head()
37 end))
38 else
39 M.git_branch = ''
40 end
41end
42
43watch_head()
44
45return M
diff --git a/nvim/.config/nvim/lua/statusline/line.lua b/nvim/.config/nvim/lua/statusline/line.lua
new file mode 100644
index 0000000..f70c2f8
--- /dev/null
+++ b/nvim/.config/nvim/lua/statusline/line.lua
@@ -0,0 +1,32 @@
1local git = require('statusline.git')
2local utils = require('utils')
3local M = {}
4
5-- set highlights for statusline sections
6vim.api.nvim_exec(
7[[
8 hi PrimaryBlock ctermfg=06 ctermbg=00
9 hi SecondaryBlock ctermfg=07 ctermbg=00
10 hi Blanks ctermfg=08 ctermbg=00
11 hi GitClean ctermfg=02 ctermbg=00
12 hi GitDirty ctermfg=01 ctermbg=00
13]], false)
14
15function M.statusline()
16 local stl = {
17 '%#PrimaryBlock#',
18 '%f',
19 '%#Blanks#',
20 '%m',
21 '%#SecondaryBlock#',
22 ' '..git.git_branch,
23 '%=',
24 '%#SecondaryBlock#',
25 '%l,%c ',
26 '%#PrimaryBlock#',
27 '%{&filetype}',
28 }
29 return table.concat(stl)
30end
31
32return M
diff --git a/nvim/.config/nvim/lua/utils.lua b/nvim/.config/nvim/lua/utils.lua
new file mode 100644
index 0000000..84b4b8d
--- /dev/null
+++ b/nvim/.config/nvim/lua/utils.lua
@@ -0,0 +1,18 @@
1local M = {}
2local cmd = vim.cmd
3
4function M.create_augroup(autocmds, name)
5 cmd('augroup ' .. name)
6 cmd('autocmd!')
7 for _, autocmd in ipairs(autocmds) do
8 cmd('autocmd ' .. table.concat(autocmd, ' '))
9 end
10 cmd('augroup END')
11end
12
13function M.iabbrev(a, b)
14 cmd(string.format('iabbrev %s %s', a, b))
15end
16
17return M
18
diff --git a/nvim/.config/nvim/plugin/packer_compiled.lua b/nvim/.config/nvim/plugin/packer_compiled.lua
new file mode 100644
index 0000000..9d2bf07
--- /dev/null
+++ b/nvim/.config/nvim/plugin/packer_compiled.lua
@@ -0,0 +1,194 @@
1-- Automatically generated packer.nvim plugin loader code
2
3if vim.api.nvim_call_function('has', {'nvim-0.5'}) ~= 1 then
4 vim.api.nvim_command('echohl WarningMsg | echom "Invalid Neovim version for packer.nvim! | echohl None"')
5 return
6end
7
8vim.api.nvim_command('packadd packer.nvim')
9
10local no_errors, error_msg = pcall(function()
11
12_G._packer = _G._packer or {}
13_G._packer.inside_compile = true
14
15local time
16local profile_info
17local should_profile = false
18if should_profile then
19 local hrtime = vim.loop.hrtime
20 profile_info = {}
21 time = function(chunk, start)
22 if start then
23 profile_info[chunk] = hrtime()
24 else
25 profile_info[chunk] = (hrtime() - profile_info[chunk]) / 1e6
26 end
27 end
28else
29 time = function(chunk, start) end
30end
31
32local function save_profiles(threshold)
33 local sorted_times = {}
34 for chunk_name, time_taken in pairs(profile_info) do
35 sorted_times[#sorted_times + 1] = {chunk_name, time_taken}
36 end
37 table.sort(sorted_times, function(a, b) return a[2] > b[2] end)
38 local results = {}
39 for i, elem in ipairs(sorted_times) do
40 if not threshold or threshold and elem[2] > threshold then
41 results[i] = elem[1] .. ' took ' .. elem[2] .. 'ms'
42 end
43 end
44 if threshold then
45 table.insert(results, '(Only showing plugins that took longer than ' .. threshold .. ' ms ' .. 'to load)')
46 end
47
48 _G._packer.profile_output = results
49end
50
51time([[Luarocks path setup]], true)
52local package_path_str = "/var/home/shubh/.cache/nvim/packer_hererocks/2.1.0-beta3/share/lua/5.1/?.lua;/var/home/shubh/.cache/nvim/packer_hererocks/2.1.0-beta3/share/lua/5.1/?/init.lua;/var/home/shubh/.cache/nvim/packer_hererocks/2.1.0-beta3/lib/luarocks/rocks-5.1/?.lua;/var/home/shubh/.cache/nvim/packer_hererocks/2.1.0-beta3/lib/luarocks/rocks-5.1/?/init.lua"
53local install_cpath_pattern = "/var/home/shubh/.cache/nvim/packer_hererocks/2.1.0-beta3/lib/lua/5.1/?.so"
54if not string.find(package.path, package_path_str, 1, true) then
55 package.path = package.path .. ';' .. package_path_str
56end
57
58if not string.find(package.cpath, install_cpath_pattern, 1, true) then
59 package.cpath = package.cpath .. ';' .. install_cpath_pattern
60end
61
62time([[Luarocks path setup]], false)
63time([[try_loadstring definition]], true)
64local function try_loadstring(s, component, name)
65 local success, result = pcall(loadstring(s), name, _G.packer_plugins[name])
66 if not success then
67 vim.schedule(function()
68 vim.api.nvim_notify('packer.nvim: Error running ' .. component .. ' for ' .. name .. ': ' .. result, vim.log.levels.ERROR, {})
69 end)
70 end
71 return result
72end
73
74time([[try_loadstring definition]], false)
75time([[Defining packer_plugins]], true)
76_G.packer_plugins = {
77 LuaSnip = {
78 loaded = true,
79 path = "/var/home/shubh/.local/share/nvim/site/pack/packer/start/LuaSnip",
80 url = "https://github.com/L3MON4D3/LuaSnip"
81 },
82 ["cmp-buffer"] = {
83 loaded = true,
84 path = "/var/home/shubh/.local/share/nvim/site/pack/packer/start/cmp-buffer",
85 url = "https://github.com/hrsh7th/cmp-buffer"
86 },
87 ["cmp-nvim-lsp"] = {
88 loaded = true,
89 path = "/var/home/shubh/.local/share/nvim/site/pack/packer/start/cmp-nvim-lsp",
90 url = "https://github.com/hrsh7th/cmp-nvim-lsp"
91 },
92 ["cmp-nvim-lua"] = {
93 loaded = true,
94 path = "/var/home/shubh/.local/share/nvim/site/pack/packer/start/cmp-nvim-lua",
95 url = "https://github.com/hrsh7th/cmp-nvim-lua"
96 },
97 ["cmp-path"] = {
98 loaded = true,
99 path = "/var/home/shubh/.local/share/nvim/site/pack/packer/start/cmp-path",
100 url = "https://github.com/hrsh7th/cmp-path"
101 },
102 cmp_luasnip = {
103 loaded = true,
104 path = "/var/home/shubh/.local/share/nvim/site/pack/packer/start/cmp_luasnip",
105 url = "https://github.com/saadparwaiz1/cmp_luasnip"
106 },
107 ["friendly-snippets"] = {
108 loaded = true,
109 path = "/var/home/shubh/.local/share/nvim/site/pack/packer/start/friendly-snippets",
110 url = "https://github.com/rafamadriz/friendly-snippets"
111 },
112 fzf = {
113 loaded = true,
114 path = "/var/home/shubh/.local/share/nvim/site/pack/packer/start/fzf",
115 url = "https://github.com/junegunn/fzf"
116 },
117 ["lsp-zero.nvim"] = {
118 loaded = true,
119 path = "/var/home/shubh/.local/share/nvim/site/pack/packer/start/lsp-zero.nvim",
120 url = "https://github.com/VonHeikemen/lsp-zero.nvim"
121 },
122 ["mason-lspconfig.nvim"] = {
123 loaded = true,
124 path = "/var/home/shubh/.local/share/nvim/site/pack/packer/start/mason-lspconfig.nvim",
125 url = "https://github.com/williamboman/mason-lspconfig.nvim"
126 },
127 ["mason.nvim"] = {
128 loaded = true,
129 path = "/var/home/shubh/.local/share/nvim/site/pack/packer/start/mason.nvim",
130 url = "https://github.com/williamboman/mason.nvim"
131 },
132 ["nvim-autopairs"] = {
133 config = { "\27LJ\2\n@\0\0\3\0\3\0\a6\0\0\0'\2\1\0B\0\2\0029\0\2\0004\2\0\0B\0\2\1K\0\1\0\nsetup\19nvim-autopairs\frequire\0" },
134 loaded = true,
135 path = "/var/home/shubh/.local/share/nvim/site/pack/packer/start/nvim-autopairs",
136 url = "https://github.com/windwp/nvim-autopairs"
137 },
138 ["nvim-cmp"] = {
139 loaded = true,
140 path = "/var/home/shubh/.local/share/nvim/site/pack/packer/start/nvim-cmp",
141 url = "https://github.com/hrsh7th/nvim-cmp"
142 },
143 ["nvim-lspconfig"] = {
144 loaded = true,
145 path = "/var/home/shubh/.local/share/nvim/site/pack/packer/start/nvim-lspconfig",
146 url = "https://github.com/neovim/nvim-lspconfig"
147 },
148 ["nvim-treesitter"] = {
149 loaded = true,
150 path = "/var/home/shubh/.local/share/nvim/site/pack/packer/start/nvim-treesitter",
151 url = "https://github.com/nvim-treesitter/nvim-treesitter"
152 },
153 ["packer.nvim"] = {
154 loaded = true,
155 path = "/var/home/shubh/.local/share/nvim/site/pack/packer/start/packer.nvim",
156 url = "https://github.com/wbthomason/packer.nvim"
157 },
158 ["vim-bujo"] = {
159 loaded = true,
160 path = "/var/home/shubh/.local/share/nvim/site/pack/packer/start/vim-bujo",
161 url = "https://github.com/sh-ubh/vim-bujo"
162 },
163 ["vim-commentary"] = {
164 loaded = true,
165 path = "/var/home/shubh/.local/share/nvim/site/pack/packer/start/vim-commentary",
166 url = "https://github.com/tpope/vim-commentary"
167 },
168 ["vim-gitgutter"] = {
169 loaded = true,
170 path = "/var/home/shubh/.local/share/nvim/site/pack/packer/start/vim-gitgutter",
171 url = "https://github.com/airblade/vim-gitgutter"
172 }
173}
174
175time([[Defining packer_plugins]], false)
176-- Config for: nvim-autopairs
177time([[Config for nvim-autopairs]], true)
178try_loadstring("\27LJ\2\n@\0\0\3\0\3\0\a6\0\0\0'\2\1\0B\0\2\0029\0\2\0004\2\0\0B\0\2\1K\0\1\0\nsetup\19nvim-autopairs\frequire\0", "config", "nvim-autopairs")
179time([[Config for nvim-autopairs]], false)
180
181_G._packer.inside_compile = false
182if _G._packer.needs_bufread == true then
183 vim.cmd("doautocmd BufRead")
184end
185_G._packer.needs_bufread = false
186
187if should_profile then save_profiles() end
188
189end)
190
191if not no_errors then
192 error_msg = error_msg:gsub('"', '\\"')
193 vim.api.nvim_command('echohl ErrorMsg | echom "Error in packer_compiled: '..error_msg..'" | echom "Please check your config for correctness" | echohl None')
194end