nvim/init.lua
Evie Litherland-Smith 1604376d4b Only blend floating windows when using neovide
Set notify background based on catppuccin colourscheme
2023-05-16 13:42:12 +01:00

79 lines
1.9 KiB
Lua

vim.g.mapleader = " "
-- bootstrap lazy.nvim
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)
require("lazy").setup {
root = vim.fn.stdpath "data" .. "/lazy",
spec = "plugins",
lockfile = vim.fn.stdpath "data" .. "/lazy-lock.json",
dev = { path = "~/Projects/lua/nvim" },
install = { colorscheme = { "catppuccin" } },
ui = {
border = "rounded",
icons = { lazy = " " },
},
diff = { cmd = "diffview.nvim" },
checker = { enabled = true, frequency = 3600 },
performance = {
rtp = {
disabled_plugins = {
"gzip",
"matchit",
"matchparen",
"netrwPlugin",
"tarPlugin",
"tohtml",
"tutor",
"zipPlugin",
},
},
},
}
-- Set vim options
vim.opt.laststatus = 3
vim.opt.showtabline = 1
vim.opt.shiftwidth = 4
vim.opt.expandtab = true
vim.opt.number = true
vim.opt.relativenumber = true
vim.opt.listchars = { lead = ".", trail = ".", tab = ">-" }
vim.opt.list = true
vim.opt.splitbelow = true
vim.opt.splitright = true
-- Global
vim.g.loaded_perl_provider = 0
-- Common keymaps
vim.keymap.set("i", "jk", "<esc>")
vim.keymap.set("n", "<leader>l", "<cmd>Lazy<CR>")
-- neovide
if vim.g.neovide then
vim.opt.winblend = 20
vim.opt.pumblend = 20
vim.g.neovide_padding_top = 5
vim.g.neovide_padding_bottom = 5
vim.g.neovide_padding_left = 5
vim.g.neovide_padding_right = 5
vim.g.neovide_floating_blur_amount_x = 2.0
vim.g.neovide_floating_blur_amount_y = 2.0
vim.g.neovide_hide_mouse_when_typing = false
vim.g.neovide_remember_window_size = false
end