This is a user configuration for Neovim based on NvChad. Plugins for Go, PHP, Ruby, Rust, Zig, JavaScript, TypeScript, Lua, HTML, CSS, JSON, YAML, Docker, Markdown are configured.
- The configured plugins:
- nvim-treesitter (syntax highlighting),
- nvim-cmp (autocompletion: LSP, Snippets (LuaSnip, Friendly Snippets), AI (codeium.nvim)),
- nvim-lspconfig (LSP servers: Go (gopls, golangci-lint-langserver), PHP (Intelephense), Ruby (ruby_lsp, rubocop), Rust (rust-analyzer), Zig (zls), JS/TS (typescript-language-server, biomejs), Emmet, Tailwind CSS, Docker and others),
- inlay-hints.nvim (shows types, names of parameters etc for Go (gopls), Rust (rust-tools.nvim))
- conform.nvim (automatic formatting of code (golines, PHP CS Fixer, rufo, rustfmt, zls, biomejs), they need be installed using Mason or in another way, for JS/TS you need add the configuration file biome.json in the root folder, for YAML you need add the configuration file yamlfmt.yml in the root folder, for PHP you may add the configuration file .php-cs-fixer.dist.php in the root folder),
- nvim-lint (code check for compliance with standards for Go (golangci-lint), PHP (PHP CS Fixer, phpstan), Ruby (rubocop), JS/TS (biomejs), they need be installed using Mason or in another way),
- nvim-dap, nvim-dap-ui (debugging for Go (delve), PHP (vscode-php-debug) - it need be installed using Mason),
- neotest (run tests for Go (neotest-golang), PHP (neotest-pest), Rust (neotest-rust, Nextest))
- others (Git (lazygit.nvim, gitsigns.nvim), refactoring.nvim, actions-preview.nvim, TreeSJ, garbage-day.nvim, lspkind.nvim, Comment.nvim, Todo Comments, flash.nvim, Neoscroll, wilder.nvim, smartcolumn.nvim, focus.nvim, glow.nvim, nvim-ts-autotag, nvim-highlight-colors, better-escape.nvim, nvim-bqf, tiny-inline-diagnostic.nvim, Trouble, project.nvim, resession.nvim, Zen Mode, noice.nvim)
- Override mappings.
- Change nvim-tree.lua to neo-tree.nvim (file system management).
- Nerd Fonts - for to support icons in fonts (example configuration file for WezTerm)
- WezTerm - for plugins image_preview.nvim, wezterm.nvim
- Neovim
Make a backup of your current nvim and shared folder.
mv ~/.config/nvim ~/.config/nvim.bak
mv ~/.local/share/nvim ~/.local/share/nvim.bak
mv ~/.local/state/nvim ~/.local/state/nvim.bak
mv ~/.cache/nvim ~/.cache/nvim.bak
Clone the repository.
git clone --depth=1 https://github.com/sk1t0n/nvchad_config ~/.config/nvim
rm -rf ~/.config/nvim/.git
Install Mason packages.
nvim
:MasonInstallAll
- install all required packages (LSP, Linters, Formatters):MasonInstall js-debug-adapter
,:MasonInstall php-debug-adapter
- install debug adapters for JS/TS, PHPgo install github.com/nametake/golangci-lint-langserver@latest
and:MasonInstall golangcilint
- install lint server and client for Go
Make a backup of your current nvim and nvim-data folder.
Rename-Item -Path $env:LOCALAPPDATA\nvim -NewName $env:LOCALAPPDATA\nvim.bak
Rename-Item -Path $env:LOCALAPPDATA\nvim-data -NewName $env:LOCALAPPDATA\nvim-data.bak
Clone the repository.
git clone --depth=1 https://github.com/sk1t0n/nvchad_config $env:LOCALAPPDATA\nvim
Remove-Item $env:LOCALAPPDATA\nvim\.git -Recurse -Force
Install Mason packages.
nvim
:MasonInstallAll
- install all required packages (LSP, Linters, Formatters):MasonInstall js-debug-adapter
,:MasonInstall php-debug-adapter
- install debug adapters for JS/TS, PHPgo install github.com/nametake/golangci-lint-langserver@latest
and:MasonInstall golangcilint
- install lint server and client for Go
WezTerm (.wezterm.lua)
key | description |
---|---|
ALT + Enter | toggle full screen mode |
CTRL + SHIFT + C | copy to the clipboard |
CTRL + SHIFT + V | paste from the clipboard |
CTRL + Tab | go to the next tab |
CTRL + SHIFT + Tab | go to the previous tab |
CTRL + SHIFT + ALT + N | create a new tab |
CTRL + SHIFT + ALT + C | close the current pane or tab |
CTRL + SHIFT + ALT + " | create a new vertical pane |
CTRL + SHIFT + ALT + # | create a new horizontal pane |
CTRL + SHIFT + ALT + Left | switch to the left pane |
CTRL + SHIFT + ALT + Right | switch to the right pane |
CTRL + SHIFT + ALT + Up | switch to the top pane |
CTRL + SHIFT + ALT + Down | switch to the bottom pane |
mode | key | description |
---|---|---|
n, v | <Space>h | mappings |
n | <Space>ww | WezTerm run a program with arguments |
n | <Space>wK | WhichKey all keymaps |
n | <Space>wk | WhichKey query lookup (for example <leader>w ) |
n, v | <Space>/ | toggle comment |
n | gc | different options for creating comments |
n | [t | previous todo comment |
n | ]t | next todo comment |
n | <Alt> + <Up> | move line up |
n | <Alt> + <Down> | move line down |
n | <Ctrl> + \ | format file if automatic formatting is disabled |
i | jj | <Esc> |
i | <Ctrl> + b | move beginning of line |
i | <Ctrl> + e | move end of line |
n, v | f, t | Flash jump by words (forward search) |
n, v | F, T | Flash jump by words (backward search) |
n | <Ctrl> + y/u/b | Neoscroll back 2/11/23 lines |
n | <Ctrl> + e/d/f | Neoscroll forward 2/11/23 lines |
n | zt/zz/zb | Neoscroll top/center/bottom this line |
i | <Ctrl> + h or <Left> | move left |
i | <Ctrl> + l or <Right> | move right |
i | <Ctrl> + j or <Down> | move down |
i | <Ctrl> + k or <Up> | move up |
n | <Ctrl> + <Up> | decrease window height |
n | <Ctrl> + <Down> | increase window height |
n | <Ctrl> + <Left> | decrease window width |
n | <Ctrl> + <Right> | increase window width |
n | <Ctrl> + h | switch window left |
n | <Ctrl> + l | switch window right |
n | <Ctrl> + j | switch window down |
n | <Ctrl> + k | switch window up |
n | | | add horizontal window (split) |
n | \ | add vertical window (vsplit) |
n | <Space>e | toggle Neotree (? - Neotree Help, Ctrl+p - image preview) |
n | <Ctrl> + <Shift> + <Up/Down> | switch tabs (:tabnew file.txt - open file.txt in a new tab or Neotree t (S - split, s - vsplit), tabs and window splits are saved in the session, but buffers are not (only 1 buffer per window)) |
n | <Space>ss | session save |
n | <Space>sl | session load |
n | <Space>sd | session delete |
n | <Space>q (alternative :q ) |
quit window (closing all windows will close the tab) |
n | <Space>Q | exit Neovim |
n | <Tab> | go to the next buffer in the window |
n | <Shift> + <Tab> | go to the previous buffer in the window |
n | <Space>c | buffer close |
n | <Space>bc | close all buffers except current |
n | <Space>bC | close all buffers (closing all buffers will close the window, but not the tab) |
n | <Space>n | buffer new |
n | <Ctrl> + s | save file |
n | <Ctrl> + c | copy whole file |
n, t | <Alt> + v | toggle vertical terminal |
n, t | <Alt> + h | toggle horizontal terminal |
n, t | <Alt> + i | toggle floating terminal |
t | <Ctrl> + x | escape terminal mode |
i | <Alt> + [ | Codeium previous completion |
i | <Alt> + ] | Codeium next completion |
i | <Tab> | Codeium accept completion |
c | nn | Wilder previous suggestion (<Down> - accept, <Up> - reject) |
c | mm | Wilder next suggestion (<Down> - accept, <Up> - reject) |
n | <Space>p | Mason |
n | <Space>pm | preview markdown in current buffer |
n | <Space>z | Zen Mode |
n | <Space>g | LazyGit |
n | <Space>fp | Telescope find recent projects |
n | <Space>ff | Telescope find files |
n | <Space>fa | Telescope find all files |
n | <Space>fw | Telescope find files by word |
n | <Space>fb | Telescope find buffers |
n | <Space>fh | Telescope help page |
n | <Space>fm | Telescope find marks |
n | <Space>fo | Telescope find old files |
n | <Space>fz | Telescope find in current buffer |
n | <Space>fc | Telescope git commits |
n | <Space>fs | Telescope git status |
n | <Space>ft | Telescope NvChad themes |
n | <Space>du | toggle debug ui |
n | <Space>db | toggle debug breakpoint |
n | <Space>ds | start/stop debug |
n | <Space>dd | disconnect debug |
n | <Space>di | debug step into |
n | <Space>do | debug step over |
n | <Space>dp | debug step out |
n | gd | go to definition |
n | gD | go to declaration |
n | gi | go to implementation |
n | <Space>xs | Trouble toggle symbols |
n | <Space>xl | Trouble toggle LSP definitions, references |
n | <Space>xd | Trouble toggle diagnostics |
n | [d | previous diagnostic |
n | ]d | next diagnostic |
n | <Space>ld | LSP/Linter diagnostic loclist |
n | <Space>ldf | LSP/Linter diagnostic float |
n, v | <Space>la | LSP code action |
n | <Space>lr | LSP references |
n | <Space>lR | LSP rename in buffer |
n | <Space>lh | LSP hover |
n | <Space>ls | LSP signature help |
n | <Space>lws | LSP workspace symbol |
n | <Space>rb | splitting/joining blocks of code |
n, v | <Space>rr | select Refactor |
n | <Space>tt | run the nearest test |
n | <Space>to | displays output of test |
n | <Space>tf | run the current file |
n | <Space>td | run the directory test |
n | <Space>ts | displays test suite structure from project root (r - run test) |