feat(nvim): disable lazy for vscode
This commit is contained in:
parent
b7b6c40c01
commit
65f182862a
|
@ -1,15 +1,19 @@
|
||||||
if vim.loader then vim.loader.enable() end
|
-- Is new loader available?
|
||||||
|
if vim.loader then
|
||||||
|
vim.loader.enable()
|
||||||
|
end
|
||||||
|
|
||||||
-- Setup global config
|
-- Setup default options
|
||||||
require("global")
|
require("options")
|
||||||
|
|
||||||
-- Only run this if inside Neovide
|
-- Are we inside Neovide?
|
||||||
if vim.g.neovide then
|
if vim.g.neovide then
|
||||||
require("neovide")
|
require("neovide")
|
||||||
end
|
end
|
||||||
|
|
||||||
-- Bootstrap Lazy
|
-- Are we outside VSCode?
|
||||||
do
|
if not vim.g.vscode then
|
||||||
|
-- Bootstrap Lazy
|
||||||
local lazypath = vim.fn.stdpath("data") .. "/lazy/lazy.nvim"
|
local lazypath = vim.fn.stdpath("data") .. "/lazy/lazy.nvim"
|
||||||
if not vim.loop.fs_stat(lazypath) then
|
if not vim.loop.fs_stat(lazypath) then
|
||||||
vim.fn.system({
|
vim.fn.system({
|
||||||
|
@ -22,15 +26,20 @@ do
|
||||||
})
|
})
|
||||||
end
|
end
|
||||||
vim.opt.rtp:prepend(lazypath)
|
vim.opt.rtp:prepend(lazypath)
|
||||||
end
|
|
||||||
|
|
||||||
-- Load lazy
|
-- Load lazy
|
||||||
local lazy_ok, lazy = pcall(require, "lazy")
|
local ok, err = pcall(function()
|
||||||
if lazy_ok then
|
local plugins, lazy = require("plugins"), require("lazy")
|
||||||
local plugins = require("plugins")
|
|
||||||
lazy.setup(plugins)
|
lazy.setup(plugins)
|
||||||
vim.keymap.set('n', '<leader>pm', lazy.home, { desc = "Package manager: open" })
|
vim.keymap.set('n', '<leader>pm', lazy.home, { desc = "Package manager: open" })
|
||||||
else
|
end)
|
||||||
print("(init) Couldn't load Lazy")
|
|
||||||
|
if not ok then
|
||||||
|
-- save my eyes
|
||||||
|
vim.cmd("colorscheme slate")
|
||||||
|
vim.schedule(function()
|
||||||
|
vim.notify(err, vim.log.levels.ERROR)
|
||||||
|
end)
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,5 @@
|
||||||
local U = require("utils")
|
local U = require("utils")
|
||||||
|
|
||||||
|
|
||||||
return {
|
return {
|
||||||
|
|
||||||
-- Editor theme
|
-- Editor theme
|
||||||
|
|
Loading…
Reference in a new issue