2023-08-21 20:52:44 +02:00
|
|
|
-- Is new loader available?
|
|
|
|
if vim.loader then
|
|
|
|
vim.loader.enable()
|
|
|
|
end
|
2023-08-19 21:48:52 +02:00
|
|
|
|
2023-08-21 20:52:44 +02:00
|
|
|
-- Setup default options
|
2023-11-15 21:39:37 +01:00
|
|
|
require "options"
|
|
|
|
require "keymaps"
|
2023-07-10 13:46:48 +02:00
|
|
|
|
2023-08-21 20:52:44 +02:00
|
|
|
-- Are we inside Neovide?
|
2023-07-29 21:15:17 +02:00
|
|
|
if vim.g.neovide then
|
2023-11-15 21:39:37 +01:00
|
|
|
require "neovide"
|
2023-07-10 13:46:48 +02:00
|
|
|
end
|
|
|
|
|
2023-08-21 20:52:44 +02:00
|
|
|
-- Are we outside VSCode?
|
|
|
|
if not vim.g.vscode then
|
|
|
|
-- Bootstrap Lazy
|
2023-07-29 21:15:17 +02:00
|
|
|
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",
|
2023-11-15 21:39:37 +01:00
|
|
|
"--branch=stable",
|
2023-07-29 21:15:17 +02:00
|
|
|
lazypath,
|
|
|
|
})
|
|
|
|
end
|
|
|
|
vim.opt.rtp:prepend(lazypath)
|
2023-07-10 13:46:48 +02:00
|
|
|
|
2023-08-21 20:52:44 +02:00
|
|
|
-- Load lazy
|
|
|
|
local ok, err = pcall(function()
|
2023-11-15 21:39:37 +01:00
|
|
|
local plugins = require "plugins"
|
|
|
|
local lazy = require "lazy"
|
|
|
|
|
2023-08-21 20:52:44 +02:00
|
|
|
lazy.setup(plugins)
|
|
|
|
end)
|
|
|
|
|
2023-11-15 21:39:37 +01:00
|
|
|
if not ok and err then
|
|
|
|
vim.cmd "colorscheme slate"
|
|
|
|
|
2023-08-21 20:52:44 +02:00
|
|
|
vim.schedule(function()
|
|
|
|
vim.notify(err, vim.log.levels.ERROR)
|
|
|
|
end)
|
|
|
|
end
|
2023-07-29 21:15:17 +02:00
|
|
|
end
|
2023-07-10 13:46:48 +02:00
|
|
|
|