Neovim
Basic Neovim setup with useful plugins for Python, Rust and JavaScript
Install / Use
/learn @pykeras/NeovimREADME
Neovim Configuration Guide
If you are updating from previous versions, please make sure to run :Lazy sync and :Mason to update everything.
Update: Feb 13, 2026 :clipboard:
- New: Enable clipboard (copy/yank & paste) over SSH using OSC52.
- This allows yanked text inside Neovim (running remotely) to be copied directly to your local machine clipboard without requiring
xclip,xsel, or X11 forwarding.- Only activates automatically when inside an SSH session.
To enable this feature, add the following snippet to the end of your init.lua:
-- OSC52 clipboard integration for remote
-- Only enable when in a TTY session (e.g., SSH)
if vim.env.SSH_CONNECTION then
local ok, osc52 = pcall(require, "vim.ui.clipboard.osc52")
if ok then
vim.g.clipboard = {
name = "osc52",
copy = {
["+"] = osc52.copy("+"),
["*"] = osc52.copy("*"),
},
paste = {
["+"] = osc52.paste("+"),
["*"] = osc52.paste("*"),
},
}
end
end
⚠️ Note: Your terminal emulator must support OSC52 clipboard sequences.
Update: Sep 8, 2025 :tada:
- New: auto formatting TOML files on save.
- Fix: diagnostics float will auto close on buffer switch, to copy the diagnostic content use
<leader>cd- New:
bh,blto move buffer around (hfor moving left,lfor moving right) also support<n>bh or <n>blto repeat moving around.
This is a starter configuration for Neovim, featuring a curated selection of the most useful plugins for Python, Rust and JavaScript development. It's lightweight and highly customizable, suitable for both beginners and advanced users.


A basic set of key mappings is included and located in lua/keymaps.lua. You can review and customize these mappings to align with your personal preferences.
Prerequisites
Before proceeding, ensure you meet the following requirements:
Neovim Version: v0.11.0 - v.11.3
Operating System: Rocky Linux 9.4, PopOS 22.04, Debian 12.9, Android with termux
Dependencies:
Ensure the following dependencies are installed for a seamless experience:
-
Ripgrep (for Telescope):
sudo dnf install ripgrep -
Python venv (for Python-based plugins):
Replace<minor>with your Python minor version:sudo dnf install python3.<minor>-venv -
Clipboard provider (e.g., xclip):
sudo dnf install xclip -
Node.js & npm (for LSP support via
nvm):
Install nvm from GitHub. -
Prettier (for yaml,js,... formatting)
npm install -g prettier -
fd-findis also needed for python virtualenv selector:sudo dnf install fd-find
How to install:
$ cd ~/.config/nvim
$ git clone git@github.com:pykeras/neovim.git .
$ nvim
Useful Commands
-
Check Telescope health:
:checkhealth telescope -
Save without formatting:
:noautocmd write -
Install formatters, debuggers, etc. (via Mason):
:Mason
Key Bindings
Leader Key <leader>:
The leader key is mapped to the spacebar (<Space>).
General
- Which Key (Help Menu): Press
<leader>to see available shortcuts. - Copy to clipboard:
<leader>y - Paste from clipboard:
<leader>p - Easier switching between splits:
- Move to the left split:
<C-h> - Move to the right split:
<C-l> - Move to the upper split:
<C-k> - Move to the lower split:
<C-j>
- Move to the left split:
- Toggle relative line numbers:
<leader>rl - Reload all open files:
<leader>re - Clear search highlights:
Esc - Escape insert mode:
jj - Close all splits except current:
<leader>qo
Theme selection
The default theme is set to kanagawa-wave; feel free to change it.
- Theme switcher menu:
tsm - Next theme:
tn - Previous theme:
tp
Virtual Environment Selector (Python)
By default if you have .venv in project directory this setup will use that otherwise:
- Open selector:
<leader>vs - Select cached venv:
<leader>vc
Debugging
For python make sure you run pip install debugpy in the virtualenv detected/selected.
- Step into:
<F2> - Step over:
<F3> - Step out:
<F4> - Continue/Start debugging:
<F5> - Toggle breakpoint:
<Leader>b - Set conditional breakpoint:
<F6> - Terminate debugger:
<F7> - Run last debugging session:
<F8>
Flash (Navigation)
- Flash jump (normal/visual/operator):
s - Flash Treesitter jump (normal/visual/operator):
S - Remote Flash (operator mode):
r - Treesitter search (operator/visual mode):
R - Toggle Flash search (command-line mode):
<C-s>
Rustaceanvim
- Show testable functions:
<leader>rdt
Telescope
- Search files:
<leader>ff - Live grep files:
<leader>fg - Show TODOs (Telescope):
<leader>tt - Show TODOs (loclist):
<leader>tl
NeoTree (File Explorer)
- Open/Close NeoTree:
<leader>e - Reveal file in NeoTree:
<leader>E - NeoTree filesystem:
<leader>nf - Git status NeoTree:
<leader>gs
LSP Configuration
- Hover documentation:
K - Go to definition:
gd - Go to definition (vertical split):
<leader>gdv - Go to definition (horizontal split):
<leader>gds - Peek definition:
<leader>gdp - Code actions:
<leader>ca - Show method signature (Insert mode):
<C-k> - Copy diagnostic message to clipboard:
<leader>cd
None-ls (Formatting)
- File global formatting:
<leader>gf
Bufferline (Tabs)
- Select buffer:
<leader>bs - Cycle next buffer:
<Tab> - Cycle previous buffer:
<S-Tab> - Move buffer left:
3bhmove buffer left 3 times. - Move buffer right:
3blmove buffer right 5 times. - Close buffer:
<leader>bx - Close all other buffers:
<leader>bxa - Jump to buffer based on position number:
<leader>numnumber can be 1 to 9
Commenting
- Single line comment:
ctrl+/ - Multi-line comment (visual selection):
ctrl+/
Git Integration
- Preview hunk (change):
<leader>gp - Git blame:
<leader>gb - Git log (oneline graph, custom):
<leader>gl - Git difference (file):
<leader>gfd
Undo Tree
- Open/Close undo tree:
<leader>u
Session Management (Persisted)
- Save session:
<leader>ss - List sessions:
<leader>sl - Delete session:
<leader>sd
CodeSnap
- Save to clipboard:
<leader>cc - Save to
~/Pictures:<leader>cs
ToggleTerminal
- Open/Close terminal:
ctrl+\ - Open terminal below:
<leader>th - Open floating terminal:
<leader>tf - Send current line to terminal (run command from docs):
<leader>tst
UFO (Folding)
- Fold all:
zR - Unfold all:
zM - Toggle fold under cursor:
za
Spelling
- Display suggestions:
z= - Add word to dictionary:
zg
Noice (Message Management)
- Dismiss message:
<leader>nd - List messages:
<leader>nl
Tabular (CSV/TSV View)
- View CSV as table:
<leader>csv - View TSV as table:
<leader>tsv
Optional Features
AI Integration (Avante)
- Ensure LuaJIT is installed.
- Rename
~/.config/nvim/lua/plugins/avantetoavante.luaforOllama.
