Quickstart Guide

📋 Prerequisites

  • Neovim v0.8.0+
  • Git
  • A Nerd Font (for icons)
  • ripgrep (optional, for telescope grep)

🚀 Installation

Quick Install (Recommended)

# Clone the repository
git clone https://github.com/RAJ8664/nvim-config.git

# Run the installation script
cd nvim-config
chmod +x install.sh
./install.sh

# Start Neovim
nvim

🔧 First Steps

  1. Automatic Plugin Installation:

    On first launch, lazy.nvim will automatically install all plugins. Wait for the installation to complete.

  2. Install Language Servers:
    :Mason

    Use Mason to install LSP servers for your languages (press 'i' to install). Pre-configured LSPs include: lua_ls, clangd, ts_ls, jdtls, phpactor, tailwindcss, html, and sqls.

  3. Install Treesitter Parsers:
    :TSInstall <language>

    Example: :TSInstall lua python javascript cpp

⌨️ Essential Key Bindings

Leader key is set to <Space>

General

  • Ctrl+s - Save file
  • Ctrl+a - Select all
  • Ctrl+z - Undo (Insert mode)
  • Esc - Clear highlights
  • <Space> + sn - Save file without auto formatting
  • <Space> + q - Open diagnostic quickfix list

Navigation

  • Ctrl+h/j/k/l - Move focus between windows
  • Tab - Next buffer
  • Shift+Tab - Previous buffer
  • Ctrl+b - Toggle NeoTree file explorer

Telescope (Fuzzy Finder)

  • <Space> + sh - Search help
  • <Space> + sk - Search keymaps
  • <Space> + sf - Search files
  • <Space> + sg - Search by grep
  • <Space> + sw - Search current word
  • <Space> + sd - Search diagnostics
  • <Space> + sr - Resume last search
  • <Space> <Space> - Find existing buffers
  • <Space> + / - Fuzzy search in current buffer

LSP (Language Server)

  • gd - Go to definition
  • gr - Go to references
  • gl - View line diagnostics
  • K - Hover documentation
  • <Space> + f - Format file or range

Git Integration

  • <Space> + hs - Stage hunk
  • <Space> + hr - Reset hunk
  • <Space> + hS - Stage buffer
  • <Space> + hu - Undo stage hunk
  • <Space> + hp - Preview hunk
  • <Space> + hb - Blame line
  • <Space> + hd - Diff against index
  • <Space> + gt - Toggle blame line display

Debugging (nvim-dap)

  • F5 or <Space> + Dc - Start/Continue debugging
  • F1 or <Space> + Dsi - Step into
  • F2 or <Space> + DsO - Step over
  • F3 or <Space> + Dso - Step out
  • <Space> + b or <Space> + Db - Toggle breakpoint
  • <Space> + DB - Set conditional breakpoint
  • <Space> + Dt - Toggle debug UI
  • F7 - See last session result

Code Navigation (Flash)

  • s - Flash (quick jump)
  • S - Flash Treesitter
  • r - Remote Flash (operator mode)
  • R - Treesitter Search

Competitive Programming

  • <Space> + jc - Replace test case to input.txt
  • <Space> + jr - Run Java code
  • <Space> + jf - Run C++ code

🧩 Core Plugins

This configuration includes carefully selected plugins:

Core & UI

  • lazy.nvim - Plugin manager
  • Kanagawa.nvim - Primary color scheme
  • lualine.nvim - Status line
  • NeoTree.lua - File explorer
  • bufferline.nvim - Buffer line
  • which-key.nvim - Keybinding popup
  • telescope.nvim - Fuzzy finder
  • nvim-treesitter - Syntax highlighting
  • dashboard-nvim - Start screen

Development Tools

  • nvim-lspconfig - LSP configuration
  • mason.nvim - LSP/linter/formatter manager
  • blink-cmp - Completion engine
  • nvim-lint - Asynchronous linting
  • gitsigns.nvim - Git integration
  • nvim-dap - Debug Adapter Protocol

Quality of Life

  • auto-pairs - Auto-close brackets
  • comment.nvim - Easy commenting
  • indent-blankline.nvim - Indentation guides
  • flash.nvim - Quick navigation

🌐 Language Support

Pre-configured Language Server Protocols (LSPs):

  • lua_ls - Lua
  • clangd - C/C++
  • ts_ls - TypeScript/JavaScript
  • jdtls - Java
  • phpactor - PHP
  • tailwindcss - Tailwind CSS
  • html - HTML
  • sqls - SQL

Add more LSPs by editing lua/plugins/lsp_config.lua

🎨 Customization

Easily customize by editing files in ~/.config/nvim/lua/

  • lua/core/options.lua - General Neovim settings
  • lua/core/keymaps.lua - Global keymappings
  • lua/plugins/ - Plugin configurations
  • lua/plugins/lsp_config.lua - LSP and language server settings

🔄 Updating

To update plugins, use the following command inside Neovim:

:Lazy sync

To update the configuration itself:

cd ~/.config/nvim
git pull

🔧 Troubleshooting

Plugins not loading

Try removing the plugin cache and reinstalling:

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

LSP not working

Verify language server installation:

:Mason
:LspInfo

Icons not displaying

Make sure you have a Nerd Font installed and set as your terminal font.

Slow startup

Profile your startup time to identify bottlenecks:

nvim --startuptime startup.log

Need Help?

If you encounter any issues or have questions, please open an issue on GitHub.

Open an Issue