My custom configuration for NeoVim uses NvChad as the base and includes some additional plugins to enhance its core functionality.
This config transforms NeoVim into a full-fledged IDE with LSP support, linting, formatting, autocompletion, AI-powered code suggestions, and more. It also includes some quality of life improvements and additional features to make coding more enjoyable.
The configuration can be used as is and doesn't require any further setup.
Note
Some Mason packages aren't avaliable on certain ARM processors. Watch out for errors and install them manually if needed.
Important
This configuration is now on version 2.5 and requires a fresh install to work properly. The old configuration can be accessed on "v2.0" branch. It will not be maintained or updated any longer.
-
Install NvChad v2.5 dependencies (Git, Nerd Font, GCC, Make, Ripgrep)
-
Run the following commands to delete or move out of the way any old config files:
# Backup if you want to keep the old config mv ~/.config/nvim{,.bak} mv ~/.local/share/nvim{,.bak} mv ~/.local/state/nvim{,.bak} # Delete if you don't want to keep the old config rm -rf ~/.config/nvim rm -rf ~/.local/state/nvim rm -rf ~/.local/share/nvim
-
Clone this repository into
~/.config/nvim
:# Clone this repo git clone https://github.com/v3ceban/nvchad-config.git ~/.config/nvim
-
??????
-
PROFIT
- Uses html-lsp for LSP and linting
- Uses prettierd for formatting
- Uses tailwindcss-language-server for Tailwind LSP
- Uses rustywind for Tailwind classes organization
- Uses typescript-language-server for LSP
- Uses eslint_d for linting
- Uses prettierd for formatting
- Requires eslint config to run linting server
- Run
npm init
if not already done - Run
npm init @eslint/config@latest
in the root of the project
- Run
- Uses prisma-language-server for LSP in Prisma files
- Uses intelephense for LSP and linting
- Uses php-cs-fixer for formatting
- Requires a git repo to run linting server
- To create .git run
git init
in the root of the project
- To create .git run
- Uses lua-language-server for LSP and linting
- Uses stylua for formatting
- Uses bash-language-server for LSP
- Uses beautysh for formatting
- Uses clangd for LSP and linting
- Uses clang-format for formatting
- Uses python-lsp-server for LSP and linting
- Uses black and isort for formatting
- Uses gopls for LSP and linting
- Uses gofumpt, goimports-reviser, and golines for formatting
- Uses Render Markdown for inline markdown rendering
- Uses markdowny.nvim for some markdown features in Visual mode
<C-k>
to add a link<C-b>
to make text bold<C-i>
to make text italic<C-e>
to make text inline code or code block in V-Line mode
- Uses Dockerfile Language Server for LSP in Dockerfiles
- Uses Docker Compose Language Service for LSP in Docker Compose files
Plugin that helps with abbreviations and substitutions.
- Uses Abolish.vim plugin
- Mapped to
<leader>sr
to search and replace words or selections with substitutions:Subvert/child{,ren}/adult{,s}/g
turnschild
intoadult
andchildren
intoadults
:Subvert/di{e,ce}/spinner{,s}/g
turnsdie
intospinner
anddice
intospinners
- If no
{}
is provided, the plugin works the same as:s
- Can do much more, see
:h abolish
for usage info
This is still work in progress, and Avante can be disabled by commenting
the corresponding lines in plugins.lua
. As plugin matures it can
potentially replace CopilotChat and, possibly, Copilot itself.
To use with anything other than Copilot, API keys need to be set in
environment variables (e.g. OPENAI_API_KEY="your key"
).
Enables Copilot integration and quick commands
- Uses the Copilot plugin for autocompletion
- Run
:Copilot auth
to authenticate with GitHub - Press
<M-l>
in insert mode to accept Copilot autocompletion suggestions - Press
<M-j>
or<M-k>
in insert mode to cycle through suggestions - Uses the CopilotChat.nvim plugin for chat and some extra functionality
<leader>cc
to open chat<leader>h
in chat window to show help
<leader>cr
to run a command<leader>cs
to search with perplexity<leader>ce
to edit selected code
Navigation with search labels and treesitter
- Uses the Flash.nvim plugin
- Enabled in search mode by default
- Treesitter nodes mapped to
<leader>st
Plugin that helps resolve git conflicts
- Uses git-conflict plugin
- Mapped to
<leader>cX
, whereX
is the conflict resolution option - See
:h git-conflict
for usage info
Great plugin for surrounding text with brackets, quotes, and html tags
- Uses Nvim-surround plugin
- Default keybinds in visual mode changed from
S
tos
- See
:h nvim-surround
for usage info
Automatically closes and renames HTML tags
- Uses Nvim-ts-autotag plugin
Adds a sorting functionality using text objects and motions
- Uses Sort Motion.vim plugin
- Provides
gs
motion to sort lines or text objectsgs
in visual mode to sort selectiongsip
in normal mode to sort paragraphgsi{
to sort inside curly braces- etc...
Extends the built-in %
command to match quotes and brackets
- Uses vim-matchquote plugin
- Replaces the built-in
%
command - Just works