My personal Neovim configuration optimized for Go development and my daily workflow. While it supports multiple languages,
it's specifically tailored for Go developers and may not suit everyone's needs (or preferences).
🔍 Fuzzy Finding : Telescope integration for file navigation and content search
🌳 File Explorer : nvim-tree with git integration and intuitive navigation
🧠 LSP Support : Full Language Server Protocol support for 8+ languages
⚡ Auto-completion : Intelligent code completion with nvim-cmp
🎨 Syntax Highlighting : Tree-sitter powered syntax highlighting
🔧 Auto-formatting : Format on save with language-specific formatters
📊 Git Integration : Real-time git status and hunk navigation with gitsigns
🎯 Modern Keybindings : Intuitive key mappings with GUI-like behavior
Neovim 0.11.x
Git (for plugin management)
Node.js (for LSP servers)
Ripgrep (for Telescope live grep)
A Nerd Font (for icons)
Backup existing config (if any):
mv ~ /.config/nvim ~ /.config/nvim.backup
Install Lazy.nvim plugin manager :
git clone --filter=blob:none --branch=stable https://github.com/folke/lazy.nvim.git ~ /.local/share/nvim/lazy/lazy.nvim
Clone this configuration :
git clone https://github.com/ahmedkamalio/nvim ~ /.config/nvim
Start Neovim :
Lazy.nvim will automatically install all plugins on first run.
Install language servers (optional):
Open Neovim and run :Mason to install additional LSP servers
Or let them install automatically when opening supported file types
Leader : <Space>
Local Leader : \
File Navigation & Search (Telescope)
Key
Action
Description
<leader>fa
Find All Files
Search through all files in project
<leader>ff
Find Git Files
Search through git-tracked files only
<leader>fg
Live Grep
Search text content across files
<leader>fb
Buffers
Switch between open buffers
<leader>fh
Help Tags
Search Neovim help documentation
General Navigation & Editing
Key
Mode
Action
Description
<leader>pv
Normal
File Explorer
Open Neovim's built-in file explorer
<leader>e
Normal
Toggle nvim-tree
Toggle nvim-tree file explorer
<leader>ef
Normal
Find in nvim-tree
Find current file in nvim-tree
<Home> / fn+←
All
Start of Line
Go to beginning of line
<End> / fn+→
All
End of Line
Go to true end of line (after last character)
<C-d>
Normal
Half Page Down
Move down and center cursor
<C-u>
Normal
Half Page Up
Move up and center cursor
n
Normal
Next Search
Next search result and center
N
Normal
Previous Search
Previous search result and center
<Esc>
Normal
Clear Highlights
Clear search highlights
Key
Mode
Action
Description
J
Visual
Move Lines Down
Move selected lines down
K
Visual
Move Lines Up
Move selected lines up
<leader>p
Visual
Smart Paste
Paste without losing register
p
Normal
Paste Before
Paste before cursor (GUI-style, cursor after pasted text)
P
Normal
Paste After
Paste after cursor
<leader>y
Normal/Visual
Copy to Clipboard
Copy to system clipboard
<leader>Y
Normal
Copy Line to Clipboard
Copy current line to system clipboard
<leader>d
Normal/Visual
Delete (No Copy)
Delete without copying to register
<leader>s
Normal
Replace Word
Replace word under cursor globally
<
Visual
Indent Left
Indent left and reselect
>
Visual
Indent Right
Indent right and reselect
Key
Mode
Action
Description
<leader>bn
Normal
Next Buffer
Switch to next buffer
<leader>bp
Normal
Previous Buffer
Switch to previous buffer
<leader>bd
Normal
Delete Buffer
Close current buffer
Key
Mode
Action
Description
<leader>h
Normal
Move Left
Move to left window
<leader>l
Normal
Move Right
Move to right window
<leader>j
Normal
Move Down
Move to window below
<leader>k
Normal
Move Up
Move to window above
<C-Up>
Normal
Resize Up
Increase window height
<C-Down>
Normal
Resize Down
Decrease window height
<C-Left>
Normal
Resize Left
Decrease window width
<C-Right>
Normal
Resize Right
Increase window width
Quick Fix & Location Lists
Key
Mode
Action
Description
<C-k>
Normal
Next Quickfix
Next quickfix item
<C-j>
Normal
Previous Quickfix
Previous quickfix item
<leader>ln
Normal
Next Location
Next location list item
<leader>lp
Normal
Previous Location
Previous location list item
Key
Mode
Action
Description
<leader>x
Normal
Make Executable
Make current file executable
Q
Normal
Disabled
Disabled to prevent accidental Ex mode
Key
Mode
Action
Description
<C-space>
Normal
Start Selection
Begin incremental selection
<C-space>
Visual
Expand Selection
Expand selection to next syntax node
<bs>
Visual
Shrink Selection
Shrink selection to previous syntax node
Code Completion (nvim-cmp)
Key
Mode
Action
Description
<Tab>
Insert
Next Item
Navigate to next completion item
<S-Tab>
Insert
Previous Item
Navigate to previous completion item
<CR>
Insert
Confirm
Accept selected completion
<C-Space>
Insert
Complete
Manually trigger completion
<C-e>
Insert
Abort
Close completion menu
<C-b>
Insert
Scroll Up
Scroll documentation up
<C-f>
Insert
Scroll Down
Scroll documentation down
LSP (Language Server Protocol)
Key
Mode
Action
Description
gd
Normal
Go to Definition
Jump to symbol definition
gi
Normal
Go to Implementation
Jump to symbol implementation
gr
Normal
References
Find all references to symbol
K
Normal
Hover
Show documentation for symbol under cursor
<C-k>
Normal
Signature Help
Show function signature
<space>rn
Normal
Rename
Rename symbol across project
<space>ca
Normal
Code Action
Show available code actions
Key
Mode
Action
Description
<leader>f
Normal/Visual
Format
Format current buffer or selection
Format on Save : Enabled (500ms timeout)
Supported Languages : Lua (stylua), Python (isort, black), JavaScript/TypeScript (prettier), Go (gofmt)
Language Server Protocol (LSP) Support
Configured Language Servers
Go (gopls): Primary focus - import completion, placeholders, unused parameter detection
Lua (lua_ls): Neovim configuration development
TypeScript/JavaScript (ts_server): Full TypeScript and JavaScript support
Python (pyright): Type checking and intelligent code completion
Rust (rust-analyzer): Advanced Rust development with Cargo integration
C/C++ (clangd): Cross-platform C/C++ language server
JSON (jsonls): JSON schema validation and completion
YAML (yamlls): YAML syntax and schema support
This configuration is heavily optimized for Go development:
vim-go integration : Advanced Go tooling and commands
gopls optimization : Tuned for Go module development
Go-specific keybindings : Workflow optimized for Go projects
Default Vim Motions (Essential)
Key
Action
h/j/k/l
Left/Down/Up/Right
w/b
Next/Previous word
0/$
Beginning/End of line
gg/G
Top/Bottom of file
{/}
Previous/Next paragraph
Key
Action
i/a
Insert before/after cursor
I/A
Insert at beginning/end of line
o/O
Open line below/above
x/X
Delete character after/before cursor
dd
Delete line
yy
Yank (copy) line
p/P
Paste after/before cursor
u
Undo
<C-r>
Redo
Key
Action
v
Character-wise visual
V
Line-wise visual
<C-v>
Block-wise visual
Key
Action
/
Search forward
?
Search backward
n/N
Next/Previous search result
:%s/old/new/g
Replace all instances
Key
Action
:e filename
Edit file
:w
Save
:q
Quit
:wq
Save and quit
<C-w>s
Split horizontally
<C-w>v
Split vertically
<C-w>w
Switch windows
Switching between tree and editor:
Use <leader>h and <leader>l to move between nvim-tree and editor windows
Or click with mouse to focus different windows
Key
Action
Enter / o
Open file or expand/collapse directory
a
Create new file or directory
d
Delete file or directory
r
Rename file or directory
c
Copy file or directory
x
Cut file or directory
p
Paste file or directory
y
Copy name to clipboard
Y
Copy relative path to clipboard
gy
Copy absolute path to clipboard
R
Refresh tree
H
Toggle hidden files
q
Close nvim-tree
Git Integration (Gitsigns)
Git Status Indicators (in sign column):
│ - Added lines (green)
│ - Modified lines (blue)
_ - Deleted lines (red)
~ - Changed+deleted lines
┆ - Untracked lines
Git Navigation & Actions:
Key
Mode
Action
Description
]c
Normal
Next Hunk
Jump to next git change
[c
Normal
Previous Hunk
Jump to previous git change
<leader>hs
Normal/Visual
Stage Hunk
Stage current hunk or selection
<leader>hr
Normal/Visual
Reset Hunk
Reset current hunk or selection
<leader>hS
Normal
Stage Buffer
Stage entire file
<leader>hR
Normal
Reset Buffer
Reset entire file
<leader>hu
Normal
Undo Stage
Undo last stage operation
<leader>hp
Normal
Preview Hunk
Preview hunk changes
<leader>hb
Normal
Blame Line
Show git blame for current line
<leader>tb
Normal
Toggle Blame
Toggle inline git blame
<leader>hd
Normal
Diff This
Show diff for current file
ih
Visual/Operator
Select Hunk
Text object for git hunk
This configuration uses Lazy.nvim for plugin management and includes:
Real-time completion is enabled - suggestions appear as you type
Use <C-Space> if completion doesn't appear automatically
Format on save is enabled for supported file types
Use Telescope (<leader>f*) for quick file navigation
Use nvim-tree (<leader>e) for visual file management
Navigate between tree and editor with <leader>h and <leader>l
GUI-style behavior - cursor positioning and paste work like modern editors
Git integration - see changes in real-time with gitsigns
LSP features work best with properly configured language servers
The configuration is modular and easy to customize:
Options : Edit lua/config/options.lua
Keymaps : Edit lua/config/keymaps.lua
Plugins : Add/modify files in lua/plugins/
LSP : Configure servers in lua/plugins/nvim-lspconfig.lua
Feel free to:
Report issues
Suggest improvements
Submit pull requests
Share your customizations
This configuration is open source and available under the MIT License.