My personal Neovim configuration files.
screenshot
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
The default editor preferences can be found here:
lua/mikesposito/setup/init.lua: Configuration file loaded on startup
lua/mikesposito/setup/preferences.lua: General editor preferences
lua/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
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
conform.nvim
Lightweight formatter supporting multiple formatters per filetype
Plugin
Description
todo-comments.nvim
Highlights TODO, FIXME, BUG, and other comment keywords
Plugin
Description
gruvbox.nvim
Gruvbox colorscheme for Neovim
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
Adding or Customizing LSP Servers
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