*config.txt* hari's nvim configuration CONTENTS *config-contents* 1. Overview .............. |config-overview| 2. Installation .......... |config-install| 3. Structure ............. |config-structure| 4. Plugins ............... |config-plugins| 5. Keymaps ............... |config-keymaps| 6. LSP ................... |config-lsp| ============================================================================== 1. OVERVIEW *config-overview* Neovim config built on lazy.nvim. All plugins load at startup (no lazy-loading). Gruvbox hard contrast with transparent background. Global helpers defined in init.lua: >lua map(mode, lhs, rhs, opts) -- vim.keymap.set wrapper, silent by default bmap(mode, lhs, rhs, opts) -- same but scoped to current buffer < ============================================================================== 2. INSTALLATION *config-install* Default (no LSP, no completion): >bash curl -fsSL https://raw.githubusercontent.com/harivansh-afk/nvim/main/install.sh | bash < Full install (LSP + Supermaven): >bash curl -fsSL https://raw.githubusercontent.com/harivansh-afk/nvim/main/install.sh | bash -s -- --bells-and-whistles < Options: > --skip-nvim Config only, skip nvim install --skip-config Nvim only, skip config install --no-path Don't modify shell rc files < ============================================================================== 3. STRUCTURE *config-structure* > init.lua Leader, helpers, lazy bootstrap plugin/ options.lua Vim options keymaps.lua Global keymaps autocmds.lua Autocommands lua/ config/ lsp.lua Shared on_attach and capabilities lsp/ lua_ls.lua Per-server settings pyright.lua rust_analyzer.lua ts_ls.lua plugins/ editor.lua Autopairs, flash, surround, ufo, supermaven fzf.lua Fzf-lua fuzzy finder git.lua Fugitive, gitsigns, diffs.nvim lsp.lua nvim-lspconfig oil.lua Oil file explorer + oil-git treesitter.lua Treesitter + textobjects ui.lua Gruvbox, lualine, nonicons after/ plugin/ lsp.lua LSP server enable loop ftplugin/ fugitive.lua Tab remapped to = in fugitive go.lua Hard tabs, tabstop 4 lua.lua Tabstop 4, shiftwidth 4 markdown.lua Wrap, textwidth 80, conceallevel 2 python.lua makeprg = python % rust.lua makeprg = cargo run < ============================================================================== 4. PLUGINS *config-plugins* All plugins load at startup via `defaults = { lazy = false }`. Plugin Purpose ~ ellisonleao/gruvbox.nvim Colorscheme (hard, transparent) nvim-lualine/lualine.nvim Statusline barrettruth/nonicons.nvim File icons nvim-tree/nvim-web-devicons Icon provider ibhagwan/fzf-lua Fuzzy finder stevearc/oil.nvim File explorer malewicz1337/oil-git.nvim Git status in oil neovim/nvim-lspconfig LSP configuration nvim-treesitter/nvim-treesitter Syntax highlighting nvim-treesitter-textobjects Select/move by treesitter nodes tpope/vim-fugitive Git commands lewis6991/gitsigns.nvim Git gutter signs barrettruth/diffs.nvim Diff highlighting windwp/nvim-autopairs Auto-close brackets kylechui/nvim-surround Surround operations folke/flash.nvim Jump/search motions kevinhwang91/nvim-ufo Code folding supermaven-inc/supermaven-nvim Inline AI suggestions ============================================================================== 5. KEYMAPS *config-keymaps* Leader is . GENERAL ~ w Save q Quit t Toggle wrap Clear search highlight J Join lines, keep cursor x (visual) Delete without yanking p (visual) Paste without yanking BUFFERS ~ Next buffer Previous buffer x Close buffer b New buffer WINDOWS ~ Navigate windows GIT ~ Git status fullscreen gg Git status fullscreen gc Git commit gp Git push gl Git pull gb Git blame gd Vertical diff split gr Git checkout file gw Git add file go Open in GitHub ghs Stage hunk ghr Reset hunk ghp Preview hunk gB Toggle line blame ]g / [g Next/prev hunk FZF ~ Find files (git-aware) ff Files fg Live grep fb Buffers fh Help tags fr Resume last search fo Recent files fc Commands fk Keymaps f/ Search history f: Command history fe Config files gq Quickfix gl Loclist GB Git branches Gc Git commits Gs Git status Gp GitHub PRs Gi GitHub issues OIL ~ - Open oil e Open oil FLASH ~ s Flash jump S Flash treesitter r (operator) Remote flash R (operator/vis) Treesitter search FOLDS ~ zR Open all folds zM Close all folds TREESITTER TEXTOBJECTS ~ af/if Function outer/inner ac/ic Class outer/inner aa/ia Parameter outer/inner ai/ii Conditional outer/inner al/il Loop outer/inner ab/ib Block outer/inner ]f / [f Next/prev function ]c / [c Next/prev class ]a / [a Next/prev parameter sn Swap parameter next sp Swap parameter prev ============================================================================== 6. LSP *config-lsp* Servers are configured in `lua/lsp/` and enabled in `after/plugin/lsp.lua`. Adding a new server: create `lua/lsp/.lua` returning a settings table, then add the name to the list in `after/plugin/lsp.lua`. Enabled servers: lua_ls, pyright, ts_ls, rust_analyzer, gopls, clangd, bashls, jsonls, html, cssls. Buffer keymaps (set on LspAttach): > gd Go to definition gD Go to declaration Go to definition gi Go to implementation gr Go to references K Hover documentation rn Rename symbol ca Code action f Format buffer < vim:tw=78:ts=8:ft=help:norl: