initial dotfiles

This commit is contained in:
srtk 2026-04-25 16:39:11 +05:30
commit 45e5fe53d2
370 changed files with 25449 additions and 0 deletions

View file

@ -0,0 +1,5 @@
vim.api.nvim_create_autocmd("VimEnter", {
callback = function()
vim.cmd("Neotree show right")
end,
})

View file

@ -0,0 +1,36 @@
-- Force LazyVim UI elements to use Carrie's green 🐾🌿
local green = "#afb979"
local green_bright = "#cbd88c"
local bg = "#141414"
local function hi(group, opts)
vim.api.nvim_set_hl(0, group, opts)
end
-- ✅ WhichKey menu (the big popup cheat sheet)
hi("WhichKey", { fg = green_bright })
hi("WhichKeyGroup", { fg = green })
hi("WhichKeyDesc", { fg = green_bright })
hi("WhichKeyBorder", { fg = green })
-- ✅ Lazy.nvim plugin manager UI
hi("LazyNormal", { bg = bg })
hi("LazyButton", { fg = green })
hi("LazyButtonActive", { fg = bg, bg = green_bright, bold = true })
hi("LazyH1", { fg = green_bright, bold = true })
-- ✅ Completion menu (nvim-cmp)
hi("CmpItemAbbr", { fg = green_bright })
hi("CmpItemAbbrMatch", { fg = green, bold = true })
hi("CmpBorder", { fg = green })
hi("CmpNormal", { bg = bg })
-- ✅ Telescope menus (if you use it)
hi("TelescopeBorder", { fg = green })
hi("TelescopePromptBorder", { fg = green })
hi("TelescopeSelection", { bg = "#303030" })
hi("TelescopePromptPrefix", { fg = green_bright })
-- ✅ Floating menus in general
hi("FloatBorder", { fg = green })

View file

@ -0,0 +1,8 @@
-- Neo-tree toggle with `
vim.keymap.set("n", "`", function()
vim.cmd("Neotree toggle right")
end, { desc = "Toggle Neo-tree" })
-- Buffer (tab/page) navigation
vim.keymap.set("n", "[", vim.cmd.bprevious, { desc = "Previous buffer" })
vim.keymap.set("n", "]", vim.cmd.bnext, { desc = "Next buffer" })

View file

@ -0,0 +1,53 @@
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)
require("lazy").setup({
spec = {
-- add LazyVim and import its plugins
{ "LazyVim/LazyVim", import = "lazyvim.plugins" },
-- import/override with your plugins
{ import = "plugins" },
},
defaults = {
-- By default, only LazyVim plugins will be lazy-loaded. Your custom plugins will load during startup.
-- If you know what you're doing, you can set this to `true` to have all your custom plugins lazy-loaded by default.
lazy = false,
-- It's recommended to leave version=false for now, since a lot the plugin that support versioning,
-- have outdated releases, which may break your Neovim install.
version = false, -- always use the latest git commit
-- version = "*", -- try installing the latest stable version for plugins that support semver
},
install = { colorscheme = { "tokyonight", "habamax" } },
checker = {
enabled = true, -- check for plugin updates periodically
notify = false, -- notify on update
}, -- automatically check for plugin updates
performance = {
rtp = {
-- disable some rtp plugins
disabled_plugins = {
"gzip",
-- "matchit",
-- "matchparen",
-- "netrwPlugin",
"tarPlugin",
"tohtml",
"tutor",
"zipPlugin",
},
},
},
})

View file

@ -0,0 +1,3 @@
-- Options are automatically loaded before lazy.nvim startup
-- Default options that are always set: https://github.com/LazyVim/LazyVim/blob/main/lua/lazyvim/config/options.lua
-- Add any additional options here

View file

@ -0,0 +1,26 @@
local function close_neotree_if_open()
for _, win in ipairs(vim.api.nvim_list_wins()) do
local buf = vim.api.nvim_win_get_buf(win)
local ft = vim.api.nvim_buf_get_option(buf, "filetype")
if ft == "neo-tree" then
vim.cmd("Neotree close")
return
end
end
end
-- Override :q
vim.api.nvim_create_user_command("Q", function()
close_neotree_if_open()
vim.cmd("q")
end, {})
vim.cmd("cnoreabbrev q Q")
-- Override :wq
vim.api.nvim_create_user_command("WQ", function()
close_neotree_if_open()
vim.cmd("wq")
end, {})
vim.cmd("cnoreabbrev wq WQ")