This is my Neovim configuration, using Lazy for plugin management
- Environment: MacOS + iTerm2
- Install Nerd Font, recommended
JetBrainsMonoNerdFontMono-Regular, after downloading and installation, switch terminal font - Clone the project and create a symlink to
/Users/{your user}/.config/nvim/ - Open
lua/config/lang.luain nvim config directory to configure development languages - Install
lsp-servervia:Mason - Install ripgrep for global search:
brew install ripgrep - (Optional) Enable Copilot
:Copilot auth - (Optional) Enable Avante by modifying
providerconfiguration inlua/config/avante.lua, and update API Key in environment variables:export OPENAI_API_KEY=xxx
| Keybinding | Function |
|---|---|
, |
Leader key |
Y |
Yank from current position to end of line |
gb |
Go back to previous position (<C-o>) |
| Keybinding | Function |
|---|---|
<C-t> |
Open new tab |
<S-H> |
Switch to previous tab |
<S-L> |
Switch to next tab |
<C-h> |
Switch to left window |
<C-j> |
Switch to bottom window |
<C-k> |
Switch to top window |
<C-l> |
Switch to right window |
| Keybinding | Function |
|---|---|
<C-e> |
Toggle file tree |
,nf |
Locate current file in file tree |
<CR> |
Open file/directory |
h |
Close directory |
v |
Open file in vertical split |
a |
Create file/directory |
d |
Delete file/directory |
r |
Rename file/directory |
x |
Cut file/directory |
c |
Copy file/directory |
p |
Paste file/directory |
R |
Refresh file tree |
? |
Show help |
| Keybinding | Function |
|---|---|
<C-p> |
Find files |
<C-g> |
Global text search |
,fb |
Find buffer |
,fh |
Find help tags |
| Keybinding | Function |
|---|---|
gd |
Go to definition |
,dt |
Open definition in new tab |
,dv |
Open definition in vertical split |
gr |
Find references |
gi |
Find implementations |
K |
Show hover documentation |
,rn |
Rename symbol |
,ca |
Code actions |
[d |
Go to previous diagnostic |
]d |
Go to next diagnostic |
,f |
Format code |
| Keybinding | Function |
|---|---|
// |
Toggle line comment |
/b |
Toggle block comment |
| Keybinding | Function |
|---|---|
]c |
Go to next hunk |
[c |
Go to previous hunk |
,hs |
Stage current hunk |
,hr |
Reset current hunk |
,hS |
Stage entire buffer |
,hu |
Undo stage current hunk |
,hR |
Reset entire buffer |
,hp |
Preview current hunk |
,hb |
Show blame info for current line |
,tb |
Toggle blame info for current line |
,hd |
Show diff for current file |
,td |
Toggle deleted lines |
| Keybinding | Function |
|---|---|
<C-Space> |
Manual trigger completion |
<CR> |
Confirm completion item |
<Tab> |
Select next completion item |
<S-Tab> |
Select previous completion item |