Hey there! 👋 This is my carefully crafted Neovim configuration that I've been using and refining while working on Laravel projects. After trying countless setups and configurations, this one finally feels just right - it's fast, smart, and makes Laravel development a breeze.
What makes it special? It's got everything I need for Laravel work - from super-smart PHP completion to Blade template support, and it handles all those little things that used to slow me down. And yes, it works great with Tailwind CSS too!
I originally built this for myself, but figured it might help other Laravel devs who want to give Neovim a shot. Trust me, once you get this set up, you'll wonder how you ever coded Laravel projects without it.
Before starting, make sure you have the following installed:
-
Neovim (version 0.8.0 or higher)
# For macOS (using Homebrew) brew install neovim # For Ubuntu/Debian sudo apt install neovim # For Windows (using Chocolatey) choco install neovim
-
Node.js (required for CoC)
# For macOS brew install node # For Ubuntu/Debian curl -fsSL https://deb.nodesource.com/setup_lts.x | sudo -E bash - sudo apt install nodejs # For Windows choco install nodejs
-
Git
# For macOS brew install git # For Ubuntu/Debian sudo apt install git # For Windows choco install git
-
Ripgrep (for better search functionality)
# For macOS brew install ripgrep # For Ubuntu/Debian sudo apt install ripgrep # For Windows choco install ripgrep
-
First, install vim-plug (Plugin Manager):
# For Unix (Linux/macOS) sh -c 'curl -fLo "${XDG_DATA_HOME:-$HOME/.local/share}"/nvim/site/autoload/plug.vim --create-dirs \ https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim' # For Windows (PowerShell) iwr -useb https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim |` ni "$env:LOCALAPPDATA/nvim-data/site/autoload/plug.vim" -Force
-
Create the Neovim configuration directory:
# For Unix (Linux/macOS) mkdir -p ~/.config/nvim # For Windows mkdir $env:LOCALAPPDATA\nvim
-
Copy the provided
init.vim
into your Neovim configuration directory:# For Unix (Linux/macOS) cp init.vim ~/.config/nvim/ # For Windows copy init.vim $env:LOCALAPPDATA\nvim\
-
Open Neovim and install plugins:
nvim
Then inside Neovim, run:
:PlugInstall
-
Install CoC extensions (this will happen automatically when you open Neovim)
- 🧠 Intelligent code completion (CoC + Copilot)
- 🔍 Fuzzy file finding and searching (Telescope)
- 📁 File explorer (nvim-tree)
- 🎨 Beautiful UI with Tokyo Night theme
- 📦 Auto-pairs and surround functionality
- 🔄 Better syntax highlighting (TreeSitter)
- ⚡ Fast and efficient performance optimizations
Space is the leader key. Here are some essential keybindings to get you started:
<Space>ff
- Find files<Space>fg
- Live grep (search in files)<Space>fb
- Browse buffers<Space>e
- Toggle file explorer
gd
- Go to definitiongy
- Go to type definitiongi
- Go to implementationgr
- Find referencesK
- Show documentation
Ctrl + Arrow Keys
- Navigate between windows<Space>qq
- Quit<Space>bd
- Close buffer[b
and]b
- Previous/Next buffer
Ctrl + Space
- Trigger completionTab
- Navigate completion menuEnter
- Select completion
Ctrl + J
- Accept suggestionCtrl + n
- Next suggestionCtrl + p
- Previous suggestionCtrl + \
- Dismiss suggestion
<Space>ac
- Code action menu<Space>fm
- Format file
The configuration includes:
- Case-insensitive search
- 4-space indentation
- Line numbers with relative numbering
- True color support
- Mouse support in all modes
- System clipboard integration
- Persistent undo history
-
If you see errors about missing plugins:
- Run
:PlugInstall
inside Neovim - Restart Neovim
- Run
-
If CoC shows errors:
- Make sure Node.js is installed
- Run
:CocInfo
to check CoC status - Run
:CocInstall [extension]
for any missing extensions
-
If file icons are not showing:
- Make sure you have a Nerd Font installed and configured in your terminal
-
If Telescope search is not working:
- Verify that ripgrep is installed
- Run
rg --version
in your terminal to confirm
For more detailed troubleshooting, check the error messages in:
:messages
:CocInfo
:checkhealth
If you encounter any issues:
- Run
:checkhealth
inside Neovim to diagnose common problems - Check if all prerequisites are installed correctly
- Make sure your Neovim version is 0.8.0 or higher (
:version
)