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
|
|
|
|
require("options")
|
2023-09-02 22:09:00 +02:00
|
|
|
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
|
|
|
|
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",
|
|
|
|
"--branch=stable", -- latest stable release
|
|
|
|
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()
|
|
|
|
local plugins, lazy = require("plugins"), require("lazy")
|
|
|
|
lazy.setup(plugins)
|
|
|
|
vim.keymap.set('n', '<leader>pm', lazy.home, { desc = "Package manager: open" })
|
|
|
|
end)
|
|
|
|
|
|
|
|
if not ok then
|
|
|
|
-- save my eyes
|
|
|
|
vim.cmd("colorscheme slate")
|
|
|
|
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
|
|
|
|