This commit is contained in:
Harivansh Rathi 2026-02-20 22:38:08 -05:00
parent 524929da48
commit deee1c3835
2 changed files with 215 additions and 66 deletions

View file

@ -1,66 +0,0 @@
# nvim
## Installation
**Default** - lightweight, no LSP, no completion:
```bash
curl -fsSL https://raw.githubusercontent.com/harivansh-afk/nvim/main/install.sh | bash
```
**Full install** - includes LSP + Supermaven:
```bash
curl -fsSL https://raw.githubusercontent.com/harivansh-afk/nvim/main/install.sh | bash -s -- --bells-and-whistles
```
Other options:
```bash
--skip-nvim # Config only (skip nvim install)
--skip-config # Nvim only (skip config install)
--no-path # Don't modify shell rc files
```
## Repo tree
```text
.
├── init.lua
├── install.sh
├── lazy-lock.json
├── lua
│ ├── chadrc.lua
│ └── plugins
│ ├── arrow.lua
│ ├── autopairs.lua
│ ├── comment.lua
│ ├── dashboard.lua
│ ├── flash.lua
│ ├── git.lua
│ ├── gitsigns.lua
│ ├── gutentags.lua
│ ├── lsp.lua
│ ├── nvchad.lua
│ ├── telescope.lua
│ ├── treesitter.lua
│ └── which-key.lua
└── nvim_cheatsheet.md
```
## Plugins
- `folke/lazy.nvim`: plugin manager.
- `nvchad/base46`: colors/theme engine.
- `nvchad/ui`: statusline/tabline/UI pieces.
- `nvim-telescope/telescope.nvim`: fuzzy find + grep.
- `nvim-treesitter/nvim-treesitter`: better syntax highlight/indent.
- `neovim/nvim-lspconfig` + `williamboman/mason.nvim`: LSP + install servers.
- `stevearc/oil.nvim`: file explorer.
- `nvimdev/dashboard-nvim`: startup dashboard.
- `folke/which-key.nvim`: keybind hint popup.
- `numToStr/Comment.nvim`: quick commenting.
- `windwp/nvim-autopairs`: auto-close brackets/quotes.
- `folke/flash.nvim`: fast motions/jumps.
- `lewis6991/gitsigns.nvim`: git hunks in-buffer.
- `NeogitOrg/neogit` + `sindrets/diffview.nvim`: git UI + diffs/history.
- `ludovicchabant/vim-gutentags`: ctags-based fallback navigation.
- `supermaven-inc/supermaven-nvim`: inline AI suggestions.
- `otavioschwanck/arrow.nvim`: quick file marks/jumps.

215
doc/config.txt Normal file
View file

@ -0,0 +1,215 @@
*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 <Space>.
GENERAL ~
<leader>w Save
<leader>q Quit
<leader>t Toggle wrap
<Esc> Clear search highlight
J Join lines, keep cursor
x (visual) Delete without yanking
p (visual) Paste without yanking
BUFFERS ~
<Tab> Next buffer
<S-Tab> Previous buffer
<leader>x Close buffer
<leader>b New buffer
WINDOWS ~
<C-h/j/k/l> Navigate windows
GIT ~
<C-g> Git status fullscreen
<leader>gg Git status fullscreen
<leader>gc Git commit
<leader>gp Git push
<leader>gl Git pull
<leader>gb Git blame
<leader>gd Vertical diff split
<leader>gr Git checkout file
<leader>gw Git add file
<leader>go Open in GitHub
<leader>ghs Stage hunk
<leader>ghr Reset hunk
<leader>ghp Preview hunk
<leader>gB Toggle line blame
]g / [g Next/prev hunk
FZF ~
<C-f> Find files (git-aware)
<leader>ff Files
<leader>fg Live grep
<leader>fb Buffers
<leader>fh Help tags
<leader>fr Resume last search
<leader>fo Recent files
<leader>fc Commands
<leader>fk Keymaps
<leader>f/ Search history
<leader>f: Command history
<leader>fe Config files
gq Quickfix
gl Loclist
<leader>GB Git branches
<leader>Gc Git commits
<leader>Gs Git status
<leader>Gp GitHub PRs
<leader>Gi GitHub issues
OIL ~
- Open oil
<leader>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
<leader>sn Swap parameter next
<leader>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/<name>.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
<C-]> Go to definition
gi Go to implementation
gr Go to references
K Hover documentation
<leader>rn Rename symbol
<leader>ca Code action
<leader>f Format buffer
<
vim:tw=78:ts=8:ft=help:norl: