nvim: update custom theme and generic config

This commit is contained in:
Gabriel Arazas 2025-01-28 17:23:00 +08:00
parent 2c5586fbfd
commit 56541bae23
3 changed files with 20 additions and 4 deletions

View File

@ -3,7 +3,7 @@
-- Bootstrapping for the package manager
local lazypath = vim.fn.stdpath("data") .. "/lazy/lazy.nvim"
if not vim.loop.fs_stat(lazypath) then
vim.fn.system({
local out = vim.fn.system({
"git",
"clone",
"--filter=blob:none",
@ -11,6 +11,15 @@ if not vim.loop.fs_stat(lazypath) then
"--branch=stable", -- latest stable release
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)

View File

@ -394,5 +394,9 @@ return lush(function()
-- Indent-Blank-Lines
IndentGuide({ fg = base01, bg = base05 }),
-- snacks.nvim
SnacksIndentScope({ fg = base0C, gui = "bold" }),
SnacksIndentChunk({ fg = base0C, gui = "bold" }),
}
end)

View File

@ -28,10 +28,13 @@ function module.setup()
vim.cmd("highlight clear SpellRare")
vim.cmd("highlight Visual term=reverse cterm=reverse")
-- Keybindings
-- Basic keybindings
vim.keymap.set("n", "<leader>bd", ":bd<cr>", {})
vim.keymap.set("i", "jk", "<Esc>", {})
vim.keymap.set("i", "jk", "<Esc>", { desc = "Escape" })
vim.keymap.set("n", "<leader>hr", "<cmd>source $MYVIMRC<cr>", {})
vim.keymap.set("n", "<leader>x", ":.lua<CR>", { desc = "Execute Lua under cursor" })
vim.keymap.set("v", "<leader>x", ":lua<CR>", { desc = "Execute Lua under cursor" })
end
return module