My personal Neovim configuration files.
- Neovim
- Lazygit - The only graphical git interface you'll ever need
- Ripgrep - For fast search
- gh - For nice GitHub integrations (e.g. PR list, issue list, reviews, etc)
- (Optional) gh-dash - For a nice cli dashboard with PRs, issues, reviews, etc
- (Optional) Fzf - For ludicrous fast fuzzy search
- Backup your current nvim configuration files
mv ~/.config/nvim ~/.config/nvim.bak- Clone this repository
git clone https://github.com/mikesposito/nvim ~/.config/nvim- Open nvim and wait for the plugins to be installed
nvimThe default editor preferences can be found here:
lua/mikesposito/setup/init.lua: Configuration file loaded on startuplua/mikesposito/setup/preferences.lua: General editor preferenceslua/mikesposito/setup/keymaps.lua: Key bindings
You can add any custom configuration in the lua/mikesposito/setup folder, so you can keep pulling updates from this repository (hopefully) without conflicts.
| Plugin | Description |
|---|---|
| copilot.vim | GitHub Copilot AI pair programming assistant |
| gp.nvim | ChatGPT-style AI assistant for code generation and chat |
| Plugin | Description |
|---|---|
| nvim-cmp | Autocompletion framework with multiple source support |
| cmp-nvim-lsp | LSP source for nvim-cmp |
| cmp-path | Path completion source for nvim-cmp |
| cmp_luasnip | LuaSnip snippet source for nvim-cmp |
| LuaSnip | Fast snippet engine written in Lua |
| friendly-snippets | Collection of snippets for various languages |
| Plugin | Description |
|---|---|
| nvim-lspconfig | Quickstart configurations for the Neovim LSP client |
| mason.nvim | Portable package manager for LSP servers, DAP servers, linters, and formatters |
| mason-lspconfig.nvim | Bridge between mason.nvim and nvim-lspconfig |
| fidget.nvim | LSP progress notifications |
| neodev.nvim | Enhanced Lua development for Neovim config |
| lsp_signature.nvim | Function signature hints as you type |
| nvim-navic | Breadcrumb navigation using LSP symbols |
| Plugin | Description |
|---|---|
| nvim-treesitter | Advanced syntax highlighting and code parsing |
| nvim-treesitter-textobjects | Syntax-aware text objects for functions, classes, and parameters |
| nvim-tree-docs | Documentation comments generation |
| Plugin | Description |
|---|---|
| nvim-dap | Debug Adapter Protocol client |
| nvim-dap-ui | UI for nvim-dap debugger |
| nvim-dap-go | Go debugging extension with Delve integration |
| mason-nvim-dap.nvim | Bridge between mason.nvim and nvim-dap |
| Plugin | Description |
|---|---|
| trouble.nvim | Pretty diagnostics, references, and quickfix list viewer |
| Plugin | Description |
|---|---|
| gitsigns.nvim | Git signs in the gutter for added/changed/deleted lines |
| vim-fugitive | Comprehensive Git wrapper |
| diffview.nvim | Tabpage interface for viewing git diffs and file history |
| gitlinker.nvim | Generate shareable permalinks to files |
| octo.nvim | GitHub issues and pull requests management |
| pipeline.nvim | View and interact with GitHub/GitLab CI/CD pipelines |
| Plugin | Description |
|---|---|
| telescope.nvim | Highly extendable fuzzy finder |
| telescope-fzf-native.nvim | FZF-native sorter for telescope |
| fzf | Command-line fuzzy finder |
| fzf.vim | Vim integration for fzf |
| neo-tree.nvim | Modern file explorer tree |
| aerial.nvim | Code outline window for navigating symbols |
| Plugin | Description |
|---|---|
| barbar.nvim | Tabline showing buffers as tabs |
| barbecue.nvim | VS Code-like winbar with breadcrumbs |
| lualine.nvim | Fast and configurable statusline |
| which-key.nvim | Displays available keybindings in a popup |
| mini.starter | Fast and flexible start screen |
| indent-blankline.nvim | Indentation guides as vertical lines |
| mini.indentscope | Animated current scope indicator |
| nvim-web-devicons | File type icons |
| nui.nvim | UI component library |
| Plugin | Description |
|---|---|
| toggleterm.nvim | Persist and toggle multiple terminals |
| vim-floaterm | Floating terminal window manager |
| Plugin | Description |
|---|---|
| nvim-tmux-navigation | Seamless navigation between Neovim splits and tmux panes |
| Plugin | Description |
|---|---|
| Comment.nvim | Smart commenting plugin |
| nvim-autopairs | Auto-insert matching brackets and quotes |
| local-highlight.nvim | Highlights word under cursor |
| vim-sleuth | Automatically detects indentation settings |
| Plugin | Description |
|---|---|
| conform.nvim | Lightweight formatter supporting multiple formatters per filetype |
| Plugin | Description |
|---|---|
| markdown-preview.nvim | Live markdown preview in browser |
| render-markdown.nvim | Renders markdown directly in buffer |
| Plugin | Description |
|---|---|
| todo-comments.nvim | Highlights TODO, FIXME, BUG, and other comment keywords |
| Plugin | Description |
|---|---|
| gruvbox.nvim | Gruvbox colorscheme for Neovim |
| Plugin | Description |
|---|---|
| plenary.nvim | Lua utility functions library |
| lazy.nvim | Modern plugin manager with lazy-loading |
| image.nvim | Image preview support |
LSP servers are automatically installed and managed via Mason. The following language servers are configured by default:
| LSP Server | Languages | Description |
|---|---|---|
rust_analyzer |
Rust | Full-featured Rust language support with Clippy integration |
taplo |
TOML | TOML file support and validation |
ts_ls |
TypeScript, JavaScript | TypeScript/JavaScript language server |
eslint |
TypeScript, JavaScript | JavaScript/TypeScript linting |
clangd |
C, C++ | C/C++ language server from LLVM |
html |
HTML, Twig, Handlebars | HTML language features |
solidity_ls_nomicfoundation |
Solidity | Solidity smart contract development |
lua_ls |
Lua | Lua language server (great for Neovim config) |
vimls |
Vim | Vim script language support |
To add new LSP servers or customize existing ones, edit the P.LSP table in lua/mikesposito/setup/preferences.lua:
P.LSP = {
-- Add a new server
pyright = {
filetypes = { 'python' },
},
-- Customize an existing server
rust_analyzer = {
filetypes = { 'rust' },
settings = {
['rust-analyzer'] = {
checkOnSave = {
command = 'clippy',
},
},
},
},
}You can find available LSP servers in the Mason registry.
<leader> is mapped to <space>.
| Key | Action |
|---|---|
j |
Move down (respects wrapped lines) |
k |
Move up (respects wrapped lines) |
<C-d> |
Scroll down and center screen |
<C-u> |
Scroll up and center screen |
<leader>q |
Save and quit |
| Key | Action |
|---|---|
<C--> |
Split window horizontally |
<C-\> |
Split window vertically |
| Key | Action |
|---|---|
<C-h> |
Move to left pane |
<C-l> |
Move to right pane |
<C-j> |
Move to bottom pane |
<C-k> |
Move to top pane |
| Key | Action |
|---|---|
gd |
Goto definition |
gr |
Goto references |
gi |
Goto implementation |
gD |
Goto type definition |
| Key | Action |
|---|---|
Ds |
Document signature |
Dy |
Document symbols |
Dh |
Documentation hover |
| Key | Action |
|---|---|
<leader>ca |
Show available code actions |
<leader>cr |
Rename symbol |
<leader>csn |
Swap parameter with next |
<leader>csp |
Swap parameter with previous |
| Key | Action |
|---|---|
<leader>dt |
Toggle Debug UI |
<leader>dc |
Start / Continue debug session |
<leader>db |
Toggle breakpoint |
<leader>dsi |
Step into |
<leader>dso |
Step over |
<leader>dsO |
Step out |
<leader>do |
Open floating diagnostic |
<leader>dl |
Open diagnostics list |
<leader>d[ |
Go to previous diagnostic |
<leader>d] |
Go to next diagnostic |
| Key | Action |
|---|---|
<leader>T |
Open Trouble panel |
| Key | Action |
|---|---|
<leader>we |
Open file explorer (Neo-tree) |
<leader>ws |
Toggle symbols outline (Aerial) |
<leader>wt |
Toggle floating terminal |
<C-n> |
Exit terminal insert mode |
| Key | Action |
|---|---|
<leader>sf |
Find files |
<leader>s/ |
Search in current buffer |
<leader>ss |
Select Telescope picker |
<leader>sh |
Search help tags |
<leader>sw |
Search word under cursor |
<leader>sg |
Search by grep |
<leader>sG |
Grep in git root |
<leader>sd |
Search diagnostics |
<leader>sr |
Resume last search |
<leader>s? |
Recently opened files |
<leader>s<space> |
Open buffers |
| Key | Action |
|---|---|
<leader>f |
Format current buffer |
| Key | Action |
|---|---|
<leader>D |
Open Diffview |
| Key | Action |
|---|---|
<leader>gp |
Git pull |
<leader>gP |
Git push |
<leader>gg |
Open Lazygit |
<leader>gd |
Diff against last commit |
<leader>gD |
Diff against index |
<leader>gy |
Copy git permalink |
<leader>ghs |
Stage hunk |
<leader>ghr |
Reset hunk |
<leader>ghS |
Stage buffer |
<leader>ghR |
Reset buffer |
<leader>ghu |
Undo stage hunk |
<leader>ghp |
Preview hunk |
<leader>ghb |
Show line blame |
<leader>gtb |
Toggle line blame |
<leader>gtd |
Toggle show deleted |
| Key | Action |
|---|---|
<leader>Gpl |
List PRs |
<leader>Gps |
Show PR |
<leader>Gpc |
PR changes |
<leader>Gil |
List issues |
<leader>Grs |
Start review |
<leader>Grr |
Resume review |
<leader>Gd |
Open GitHub dashboard (gh-dash) |
<leader>Ga |
Open GitHub Actions (Pipeline) |
<leader>opl |
List PRs |
<leader>ops |
Show PR |
<leader>opc |
PR changes |
<leader>opd |
PR diff |
<leader>opr |
Reload PR |
<leader>opa |
PR checks |
<leader>opu |
Copy PR URL |
<leader>ors |
Start review |
<leader>orx |
Close review |
<leader>orr |
Resume review |
<leader>orS |
Submit review |
<leader>oil |
List issues |
<leader>ois |
Show issue |
<leader>oic |
Create issue |
<leader>oix |
Close issue |
<leader>oie |
Edit issue |
Requires WINDOW_TABS_ENABLED = true in preferences.
| Key | Action |
|---|---|
th |
Previous tab |
tl |
Next tab |
t< |
Move tab left |
t> |
Move tab right |
t1 – t9 |
Go to tab 1–9 |
t0 |
Go to last tab |
tp |
Pin tab |
tx |
Close tab |
These keys are active inside the completion menu (insert mode).
| Key | Action |
|---|---|
<C-n> |
Select next item |
<C-p> |
Select previous item |
<C-d> |
Scroll docs up |
<C-f> |
Scroll docs down |
<C-Space> |
Trigger completion |
<CR> |
Confirm selection |
<Tab> |
Next item / expand snippet |
<S-Tab> |
Previous item / jump snippet back |
| Key | Action |
|---|---|
<C-Space> |
Start / increment selection to node |
<C-s> |
Increment selection to scope |
<M-Space> |
Decrement selection |
| Key | Selects |
|---|---|
aa |
Around parameter |
ia |
Inner parameter |
af |
Around function |
if |
Inner function |
ac |
Around class |
ic |
Inner class |
| Key | Action |
|---|---|
]m |
Next function start |
]] |
Next class start |
]M |
Next function end |
][ |
Next class end |
[m |
Previous function start |
[[ |
Previous class start |
[M |
Previous function end |
[] |
Previous class end |
