71 lines
2.2 KiB
Lua
71 lines
2.2 KiB
Lua
local function make_transparent()
|
|
local groups = {
|
|
"Normal","NormalNC","NormalFloat","FloatBorder",
|
|
"SignColumn","EndOfBuffer","LineNr","CursorLineNr",
|
|
"StatusLine","MsgArea","WinSeparator",
|
|
-- common plugin groups:
|
|
"TelescopeNormal","TelescopeBorder",
|
|
"NvimTreeNormal","NvimTreeNormalNC",
|
|
"NeoTreeNormal","NeoTreeNormalNC",
|
|
}
|
|
for _, g in ipairs(groups) do
|
|
pcall(vim.api.nvim_set_hl, 0, g, { bg = "NONE" })
|
|
end
|
|
end
|
|
|
|
vim.api.nvim_create_autocmd({ "ColorScheme", "VimEnter" }, {
|
|
callback = make_transparent,
|
|
desc = "Force transparent background after any colorscheme loads",
|
|
})
|
|
|
|
local lazypath = vim.fn.stdpath("data") .. "/lazy/lazy.nvim"
|
|
if not (vim.uv or vim.loop).fs_stat(lazypath) then
|
|
local lazyrepo = "https://github.com/folke/lazy.nvim.git"
|
|
local out = vim.fn.system({ "git", "clone", "--filter=blob:none", "--branch=stable", lazyrepo, lazypath })
|
|
if vim.v.shell_error ~= 0 then
|
|
vim.api.nvim_echo({
|
|
{ "Failed to clone lazy.nvim:\n", "ErrorMsg" },
|
|
{ out, "WarningMsg" },
|
|
{ "\nPress any key to exit..." },
|
|
}, true, {})
|
|
vim.fn.getchar()
|
|
os.exit(1)
|
|
end
|
|
end
|
|
vim.opt.rtp:prepend(lazypath)
|
|
|
|
vim.filetype.add({
|
|
extension = {
|
|
ixx = "cpp",
|
|
},
|
|
})
|
|
|
|
vim.keymap.set("n", "<leader>qs", function() require("persistence").load() end, { desc = "Restore Session" })
|
|
vim.keymap.set("n", "<leader>ql", function() require("persistence").load({ last = true }) end, { desc = "Restore Last Session" })
|
|
vim.keymap.set("n", "<leader>qd", function() require("persistence").stop() end, { desc = "Don't Save Current Session" })
|
|
vim.keymap.set("n", "<leader>qq", "<cmd>wqa<cr>", { desc = "Save All and Quit Neovim" })
|
|
vim.keymap.set("n", "<leader>qQ", "<cmd>qa!<cr>", { desc = "Force Quit All (No Save)" })
|
|
|
|
require("config.opts")
|
|
|
|
require("lazy").setup({
|
|
spec = {
|
|
{ import = "plugins.coding" },
|
|
{ import = "plugins.colors" },
|
|
{ import = "plugins.ui" },
|
|
{ import = "plugins.debugging" },
|
|
},
|
|
install = { colorscheme = { "habamax" } },
|
|
checker = { enabled = true },
|
|
})
|
|
|
|
require("config.cmake")
|
|
require("config.make")
|
|
require("config.lsp")
|
|
require("config.dap")
|
|
|
|
require("notify").setup({
|
|
-- background_colour = "#000000",
|
|
})
|
|
|