config/.config/nvim/lua/lazyvim/init.lua
2023-01-16 10:58:35 +10:30

42 lines
953 B
Lua

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",
lazypath,
})
end
vim.opt.rtp:prepend(vim.env.LAZY or lazypath)
if not vim.g.vscode then
require("lazy").setup({
spec = "lazyvim.plugins",
defaults = { lazy = true, version = "*" },
checker = { enabled = true },
})
end
-- map leader and register keymap for Lazy.
vim.g.mapleader = " "
vim.g.maplocalleader = " "
vim.api.nvim_set_keymap("n", "<leader>L", "<cmd>:Lazy<cr>", { desc = "Lazy GUI" })
-- This might not be best, but it allows for easy resetting
ColorMe = function()
local colorscheme = "gruvbox-material"
local okay, _ = pcall(vim.cmd, "colorscheme " .. colorscheme)
if not okay then
vim.notify("Colorscheme " .. colorscheme .. " not found!")
vim.cmd("colorsheme habamax")
end
end
ColorMe()