-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathinit.lua
42 lines (38 loc) · 909 Bytes
/
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
local plugin_err, plugins = pcall(require, "plugin")
local vimopts_err, _ = pcall(require, "vimopts")
local keymap_err, _ = pcall(require, "keymap")
-- Ensure install lazy package 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)
if not plugin_err then
return print(plugin_err)
end
if not vimopts_err then
return print(vimopts_err)
end
if not keymap_err then
return print(keymap_err)
end
vim.api.nvim_create_autocmd({ "CursorHold" }, {
callback = function()
vim.diagnostic.open_float(nil, { focuseable = false })
end,
})
require("lazy").setup(plugins, {
install = {
colorscheme = { "onedark" },
},
ui = {
border = "rounded",
},
})