blank slate

This commit is contained in:
2026-04-09 20:35:13 +01:00
parent cfc5baa8ad
commit 761f890b10
20 changed files with 0 additions and 810 deletions

View File

@@ -1,44 +0,0 @@
-- Autocommand to check git status
vim.api.nvim_create_autocmd("VimEnter", {
callback = function()
-- Verify if the current directory is a git repo
local is_git = os.execute("git rev-parse --is-inside-work-tree > /dev/null 2>&1")
if is_git ~= 0 then
return
end
-- Perform an async fetch to avoid startup lag
vim.fn.jobstart("git fetch", {
on_exit = function()
-- Get the number of commits the remote is ahead of local HEAD
local count = vim.fn.system("git rev-list --count HEAD..@{u} 2>/dev/null"):gsub("%s+", "")
if count ~= "" and tonumber(count) > 0 then
vim.schedule(function()
vim.notify(
"󰊢 " .. count .. " new commit(s) available on remote.",
vim.log.levels.INFO,
{ title = "Git Status", icon = "󰊢" }
)
end)
end
end,
})
end,
})
local cursorline_group = vim.api.nvim_create_augroup("CursorLineControl", { clear = true })
vim.api.nvim_create_autocmd({ "WinEnter", "BufEnter" }, {
group = cursorline_group,
callback = function()
vim.opt_local.cursorline = true
end,
})
vim.api.nvim_create_autocmd({ "WinLeave" }, {
group = cursorline_group,
callback = function()
vim.opt_local.cursorline = false
end,
})

View File

@@ -1,29 +0,0 @@
-- Keymap function
function Keymap(mode, key, binding)
vim.keymap.set(mode, key, binding, { noremap = true, silent = true })
end
Keymap("n", "q:", ":") -- remove nonsense command
Keymap("n", "<leader>bd", function() -- delete buffer
vim.cmd("bd")
vim.cmd("echo 'Buffer deleted'")
end)
for bind = "i", "a", "A" do -- proper indenting function
Keymap("n", bind, function()
if vim.fn.getline("."):match("^%s*$") then
return [["_cc]]
else
return bind
end
end)
end
Keymap("i", "<C-BS>", "<C-W>") -- C-Backscpace for whole words
-- Open Lazygit
Keymap("n", "<leader>l", function()
Snacks.lazygit.open()
end)
Keymap("n", "<leader>d", "<cmd>lua vim.diagnostic.open_float()<CR>") -- Diagnostics for Linter

View File

@@ -1,42 +0,0 @@
-- Bootstrap lazy.nvim
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)
-- Make sure to setup `mapleader` and `maplocalleader` before
-- loading lazy.nvim so that mappings are correct.
-- This is also a good place to setup other settings (vim.opt)
vim.g.mapleader = " "
vim.g.maplocalleader = ","
-- Setup lazy.nvim
require("lazy").setup({
spec = {
-- import your plugins
{ import = "plugins.utils" },
{ import = "plugins" },
{ import = "plugins.ui" },
{ import = "plugins.editing" },
{ import = "plugins.completion" },
},
-- Configure any other settings here. See the documentation for more details.
-- colorscheme that will be used when installing plugins.
install = { colorscheme = { "catppuccin" } },
ui = {
border = "rounded",
},
-- automatically check for plugin updates
checker = { enabled = false },
})