-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathinit.lua
86 lines (79 loc) · 1.96 KB
/
init.lua
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
-- BaSS (neo)vimrc's since 2007
-- Load base options
require('options')
-- Initialize Lazy.nvim (plugin manager)
local lazypath = vim.fn.stdpath('data') .. '/lazy/lazy.nvim'
if not vim.loop.fs_stat(lazypath) then
vim.fn.system({
'git',
'clone',
'--filter=blob:none',
'https://github.com/folke/lazy.nvim.git',
'--branch=stable', -- latest stable release
lazypath,
})
end
vim.opt.rtp:prepend(lazypath)
-- Lazy.nvim setup options
local lazy_opts = {
defaults = { lazy = true },
checker = { enabled = false },
colorscheme = 'cyberdream',
change_detection = {
notify = false,
},
ui = { border = 'rounded' },
performance = {
rtp = {
disabled_plugins = {
'gzip',
-- "matchit",
-- "matchparen",
'netrwPlugin',
'tarPlugin',
'tohtml',
'tutor',
'zipPlugin',
'rplugin',
'spellfile',
'2html_plugin',
'man',
},
},
},
-- This reads pkg/plugin definition from the plugin itself if available, good for deps.
pkg = {
enabled = true,
cache = vim.fn.stdpath('state') .. '/lazy/pkg-cache.lua',
-- The first package source that is found for a plugin will be used.
sources = {
'lazy',
'rockspec',
'packspec',
},
},
rocks = {
root = vim.fn.stdpath('data') .. '/lazy-rocks',
server = 'https://nvim-neorocks.github.io/rocks-binaries/',
},
}
-- Setup Lazy.nvim
local ok, lazy = pcall(require, 'lazy')
if not ok then
vim.notify('Failed to load lazy.nvim', vim.log.levels.ERROR)
return
end
-- Load plugins from 'lua/plugins.lua' and 'lua/plugins/*.lua'
lazy.setup('plugins', lazy_opts)
-- Set colorscheme
vim.opt.termguicolors = true
vim.opt.background = 'dark'
vim.cmd.colorscheme('cyberdream')
-- Load keymaps and autocommands after all plugins are loaded
vim.api.nvim_create_autocmd('User', {
pattern = 'VeryLazy',
callback = function()
require('keys')
require('autocommands')
end,
})