Skip to content

fabyo0/nvim-config

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

10 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Neovim IDE Config

My personal Neovim configuration for Go and PHP/Laravel development.

Features

General

  • πŸ” Fuzzy finder (Telescope)
  • πŸ“ File explorer (Neo-tree)
  • ✨ Autocompletion (nvim-cmp)
  • πŸ› Debugger (DAP + Delve)
  • πŸ’Ύ Autosave
  • πŸ–₯️ Integrated terminal (ToggleTerm)
  • 🎨 Multiple themes (Darcula, Miasma, TokyoNight, Catppuccin, etc.)

Go Development

  • πŸš€ Full Go support (gopls, go.nvim)
  • πŸ§ͺ Test runner
  • πŸ“Š Code coverage
  • πŸ”§ Auto format & import on save

PHP/Laravel Development

  • 🐘 PHP support (intelephense)
  • ⚑ Laravel.nvim integration
  • πŸ—‘οΈ Blade syntax highlighting
  • 🎯 Artisan commands
  • πŸ›£οΈ Route explorer

Requirements

Before installing, make sure you have:

Requirement Version Check Command
Neovim >= 0.11 nvim --version
Git any git --version
Node.js >= 18 node --version
Go >= 1.21 go version
PHP >= 8.1 php --version
A Nerd Font any Download

macOS Installation

# Install Homebrew (if not installed)
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"

# Install requirements
brew install neovim node go php

# Install a Nerd Font (optional but recommended)
brew tap homebrew/cask-fonts
brew install --cask font-jetbrains-mono-nerd-font

Ubuntu/Debian Installation

# Update packages
sudo apt update

# Install Neovim (latest)
sudo add-apt-repository ppa:neovim-ppa/unstable
sudo apt install neovim

# Install Node.js
curl -fsSL https://deb.nodesource.com/setup_20.x | sudo -E bash -
sudo apt install nodejs

# Install Go
sudo apt install golang-go

# Install PHP
sudo apt install php php-cli

Windows Installation (WSL2)

# Use Ubuntu/Debian instructions inside WSL2

Installation

Step 1: Backup existing config

# Backup if you have existing config
mv ~/.config/nvim ~/.config/nvim.backup
mv ~/.local/share/nvim ~/.local/share/nvim.backup
mv ~/.local/state/nvim ~/.local/state/nvim.backup
mv ~/.cache/nvim ~/.cache/nvim.backup

Step 2: Clone this repository

git clone https://github.com/fabyo0/nvim-config.git ~/.config/nvim

Step 3: Start Neovim

nvim

On first launch:

  1. Lazy.nvim will automatically install all plugins (wait for it to finish)
  2. Treesitter will install language parsers
  3. Mason will install LSP servers

Step 4: Verify LSP servers

Open Neovim and run:

:Mason

Make sure these are installed (βœ“):

  • gopls (Go)
  • lua_ls (Lua)
  • intelephense (PHP)

If not installed, press i on each to install.

Step 5: Test the setup

# Test Go
cd /tmp && mkdir go-test && cd go-test
go mod init test
nvim main.go
# Type: package main β†’ autocomplete should work

# Test PHP
nvim test.php
# Type: <?php β†’ autocomplete should work

Keybindings

General

Key Action
Space + w Save
Space + q Quit
Space + e File explorer
Space + ff Find files
Space + fg Live grep
Space + fb Buffers
Space + m Toggle terminal
Tab Next buffer
Shift + Tab Previous buffer

LSP (All Languages)

Key Action
gd Go to definition
gr Find references
gi Go to implementation
K Hover info
Space + rn Rename symbol
Space + ca Code actions
Space + f Format
Space + i Import class
[d / ]d Previous/Next diagnostic

Go Specific

Key Action
Space + gr Go Run
Space + gb Go Build
Space + gt Go Test
Space + ge Go If Err
Space + gi Go Implement Interface
Space + gm Go Mod Tidy

Laravel Specific

Key Action
Space + la Artisan commands
Space + lr Routes
Space + lm Related files

Debug

Key Action
F5 Start/Continue
F9 Toggle breakpoint
F10 Step over
F11 Step into
F12 Step out
Space + du Toggle debug UI

Git

Key Action
]g / [g Next/Previous hunk
Space + hs Stage hunk
Space + hr Reset hunk
Space + hp Preview hunk
Space + hb Blame line

Themes

Switch themes with :colorscheme <name>

Available themes:

  • darcula-dark (default)
  • miasma
  • tokyonight-night
  • catppuccin-mocha
  • gruvbox
  • kanagawa
  • rose-pine
  • dracula

Structure

~/.config/nvim/
β”œβ”€β”€ init.lua              # Main configuration
β”œβ”€β”€ lua/
β”‚   β”œβ”€β”€ keymaps.lua       # Key mappings
β”‚   └── plugins/
β”‚       β”œβ”€β”€ colorscheme.lua   # Theme settings
β”‚       β”œβ”€β”€ cmp.lua           # Autocompletion
β”‚       β”œβ”€β”€ dap.lua           # Debugger
β”‚       β”œβ”€β”€ gitsigns.lua      # Git integration
β”‚       β”œβ”€β”€ go.lua            # Go development
β”‚       β”œβ”€β”€ lsp.lua           # LSP configuration
β”‚       β”œβ”€β”€ mason.lua         # LSP installer
β”‚       β”œβ”€β”€ neo-tree.lua      # File explorer
β”‚       β”œβ”€β”€ php.lua           # PHP/Laravel development
β”‚       β”œβ”€β”€ telescope.lua     # Fuzzy finder
β”‚       β”œβ”€β”€ treesitter.lua    # Syntax highlighting
β”‚       β”œβ”€β”€ trouble.lua       # Diagnostics list
β”‚       β”œβ”€β”€ ui.lua            # UI enhancements
β”‚       └── utils.lua         # Utility plugins

Troubleshooting

LSP not working

:LspInfo
:LspLog

Treesitter errors

:TSUpdate

Plugin issues

:Lazy sync
:Lazy clean

Reset everything

rm -rf ~/.local/share/nvim
rm -rf ~/.local/state/nvim
rm -rf ~/.cache/nvim
nvim

Updating

cd ~/.config/nvim
git pull
nvim
:Lazy sync

Uninstall

rm -rf ~/.config/nvim
rm -rf ~/.local/share/nvim
rm -rf ~/.local/state/nvim
rm -rf ~/.cache/nvim

License

MIT

Author

@fabyo0

About

Neovim IDE config for Go & PHP/Laravel development

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages