Skip to content

Personal neovim config, modern features and configuration near IDE level. Build with Lazy and mason

License

Notifications You must be signed in to change notification settings

NoamFav/Nvim-config

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

๐Ÿš€ Neovim Configuration

A modern, feature-rich Neovim configuration built for productivity and aesthetics

Neovim Lua Version License


โœจ Features

๐ŸŽจ Beautiful UI Multiple colorschemes with transparent backgrounds
โšก Blazing Fast Lazy loading and optimized performance
๐Ÿง  Smart LSP 40+ language servers configured
๐Ÿ” Powerful Search Snacks.nvim picker integration
๐Ÿ“ Completion blink.cmp with emoji and dictionary support
๐ŸŽฏ File Navigation Harpoon for lightning-fast file switching

๐Ÿ“‹ Requirements

  • Neovim >= 0.11.0
  • Git >= 2.19.0
  • Node.js >= 16.0 (for certain LSP servers)
  • Python >= 3.8 (for Python support)
  • A Nerd Font installed
  • Terminal with true color support

Optional Dependencies

# For better search performance
brew install fzf ripgrep fd

# For clipboard support
brew install xclip  # Linux
brew install pbcopy # macOS (built-in)

# For word definitions
brew install wordnet

๐Ÿš€ Installation

Quick Install

# Backup existing config
mv ~/.config/nvim ~/.config/nvim.bak
mv ~/.local/share/nvim ~/.local/share/nvim.bak

# Clone this config
git clone <your-repo-url> ~/.config/nvim

# Create backup directories
mkdir -p ~/.backup-nvim ~/.swap-nvim ~/.undo-nvim

# Launch Neovim
nvim

The plugin manager (lazy.nvim) will automatically bootstrap and install all plugins on first launch.


๐Ÿ“ Structure

~/.config/nvim/
โ”œโ”€โ”€ init.lua                 # Entry point
โ”œโ”€โ”€ lua/
โ”‚   โ”œโ”€โ”€ core/               # Core configuration
โ”‚   โ”‚   โ”œโ”€โ”€ options.lua     # Vim options
โ”‚   โ”‚   โ”œโ”€โ”€ keymaps.lua     # Key mappings
โ”‚   โ”‚   โ”œโ”€โ”€ autocmds.lua    # Auto commands
โ”‚   โ”‚   โ””โ”€โ”€ diagnostics.lua # Diagnostic settings
โ”‚   โ”œโ”€โ”€ lsp/                # LSP configuration
โ”‚   โ”‚   โ””โ”€โ”€ servers.lua     # Server configurations
โ”‚   โ””โ”€โ”€ plugins/            # Plugin configurations
โ”‚       โ”œโ”€โ”€ coding/         # Completion, snippets
โ”‚       โ”œโ”€โ”€ editor/         # Editor enhancements
โ”‚       โ”œโ”€โ”€ lang/           # Language-specific
โ”‚       โ”œโ”€โ”€ lsp/            # LSP plugins
โ”‚       โ”œโ”€โ”€ tools/          # Git, terminal, etc.
โ”‚       โ””โ”€โ”€ ui/             # UI enhancements

๐ŸŽจ Colorschemes

This config comes with multiple beautiful colorschemes:

  • ๐ŸŒƒ Tokyo Night (default) - A clean, dark theme
  • ๐ŸŒŠ Catppuccin - Soothing pastel theme
  • ๐Ÿค– Cyberdream - Futuristic cyberpunk theme
  • ๐ŸŒ™ OneDark - Classic dark theme
  • ๐ŸŽฎ Sonokai - High contrast theme
  • ๐ŸŒ† 2077 - Cyberpunk-inspired theme

Switch colorschemes: <leader>uC


โŒจ๏ธ Key Mappings

Leader key: <Space>

General

Key Mode Action
<C-h/j/k/l> Normal Navigate windows
<leader>e Normal File explorer
<leader>h Normal Harpoon menu
<C-t> Normal Toggle terminal

File Operations

Key Mode Action
<leader><space> Normal Smart find files
<leader>ff Normal Find files
<leader>fg Normal Find Git files
<leader>fr Normal Recent files
<leader>/ Normal Live grep
<leader>, Normal Buffers

LSP

Key Mode Action
gd Normal Go to definition
gr Normal References
K Normal Hover documentation
<leader>rn Normal Rename
<leader>ca Normal Code actions
[d / ]d Normal Previous/next diagnostic
<leader>df Normal Format code

Git

Key Mode Action
<leader>gg Normal LazyGit
<leader>gb Normal Git branches
<leader>gs Normal Git status
<leader>gl Normal Git log
<leader>gd Normal Git diff

Buffer Management

Key Mode Action
<leader>bn Normal Next buffer
<leader>bp Normal Previous buffer
<leader>bd Normal Delete buffer

Clipboard

Key Mode Action
<leader>y Normal/Visual Yank to system clipboard
<leader>p Normal Paste from system clipboard

Build Tools

Maven:

  • <leader>mi - Clean install
  • <leader>mt - Run tests
  • <leader>mk - Package
  • <leader>mc - Clean

CMake:

  • <leader>cc - Configure
  • <leader>cm - Build
  • <leader>cr - Run

๐Ÿงฉ Plugin Highlights

Core Plugins

UI Enhancements

Editor Features

Tools


๐Ÿ”ง Supported Languages

Core Languages

โ˜• Java ๐Ÿ Python ๐Ÿฆ€ Rust โšก C/C++
๐Ÿน Go ๐ŸŒ™ Lua ๐Ÿ’Ž C# ๐ŸŽฏ Kotlin

Web Development

๐Ÿ“œ TypeScript/JavaScript ๐ŸŽจ HTML/CSS โš›๏ธ React/JSX ๐ŸŒŠ Tailwind CSS
๐Ÿ”ฅ Svelte ๐Ÿ“Š GraphQL ๐ŸŸฆ JSON/YAML โœจ Emmet

Other Languages

  • ๐ŸŽ Swift
  • ๐ŸŽฏ Dart
  • โš™๏ธ Scala
  • ๐Ÿ—„๏ธ SQL
  • ๐Ÿ“ Markdown
  • ๐Ÿ“„ LaTeX
  • ๐Ÿ˜ PHP
  • ๐Ÿ’Ž Ruby
  • ๐Ÿ“‹ Terraform
  • ๐Ÿช Perl
  • ๐Ÿค– Arduino
  • ๐Ÿ“Š MATLAB

๐ŸŽฏ LSP Configuration

This config uses Neovim 0.11+ native LSP API with vim.lsp.config() and root_markers for project detection.

Automatic Installation

All LSP servers are automatically installed via Mason on first launch:

:Mason  -- Open Mason UI
:MasonUpdate  -- Update all packages

Custom Server Configs

Server configurations are centralized in lua/lsp/servers.lua. Each server includes:

  • Filetypes: Supported file types
  • Root markers: Project root detection
  • Settings: Language-specific settings
  • Capabilities: Completion capabilities via blink.cmp

๐Ÿ› ๏ธ Formatters

Auto-formatting is enabled on save for all supported languages:

Language Formatter
JavaScript/TypeScript Prettier
Python Black + isort
Lua StyLua
C/C++ clang-format
Java google-java-format
Rust rustfmt
Go gofmt
C# CSharpier

Toggle auto-format: Modify lua/core/autocmds.lua


๐Ÿ’ก Completion System

Blink.cmp Features

  • LSP completions - Intelligent code completion
  • Path completions - File system paths
  • Buffer completions - From open buffers
  • Snippet support - LuaSnip integration
  • Emoji support - ๐Ÿ˜Ž Type emojis easily
  • Dictionary - English word suggestions

Snippet Trigger

Snippets are triggered with ; prefix:

;func โ†’ expands to function snippet
;for โ†’ expands to for loop
;if โ†’ expands to if statement

Navigate snippets: <Up> / <Down>


๐ŸŽฎ Special Features

Harpoon Quick Navigation

Mark up to 4 files for instant access:

  1. <leader>a - Add current file to Harpoon
  2. <leader>h - Open Harpoon menu
  3. <leader>1-4 - Jump to marked file 1-4

Dashboard

Beautiful startup dashboard with:

  • Recent files
  • Projects
  • Git status (when in git repo)
  • Custom ASCII art
  • Quick actions

Trouble Integration

Split diagnostics and symbols side-by-side:

  • <leader>xx - Bottom diagnostics panel
  • <leader>cs - Right symbol outline (top)
  • <leader>cl - Right LSP references (bottom)

๐Ÿ› Troubleshooting

LSP Not Working

:LspInfo          " Check active LSP servers
:Mason            " Verify server installation
:checkhealth lsp  " Run health check

Plugins Not Loading

:Lazy sync       " Sync all plugins
:Lazy clean      " Remove unused plugins
:Lazy restore    " Restore to lockfile state

Performance Issues

:Lazy profile    " Profile plugin load times
:checkhealth     " Run full health check

Reset Configuration

# Remove plugin cache
rm -rf ~/.local/share/nvim
rm -rf ~/.local/state/nvim

# Restart Neovim
nvim

๐ŸŽจ Customization

Change Leader Key

Edit init.lua:

vim.g.mapleader = ","  -- Change from space to comma

Add Custom Keybindings

Edit lua/core/keymaps.lua:

keymap("n", "<leader>w", ":w<CR>", opts)  -- Save with <leader>w

Add New LSP Server

Edit lua/lsp/servers.lua:

-- In get_server_list():
"your_language_server",

-- In setup_server_configs():
vim.lsp.config("your_language_server", {
    filetypes = { "your_filetype" },
    root_markers = { ".git" },
})

Modify Colorscheme

Edit lua/plugins/ui/colorschemes.lua to set your preferred default:

vim.cmd.colorscheme("catppuccin")  -- Change default

๐Ÿ“š Learning Resources


๐Ÿค Contributing

Contributions are welcome! Feel free to:

  1. Fork the repository
  2. Create a feature branch
  3. Make your changes
  4. Submit a pull request

๐Ÿ“„ License

This configuration is available under the MIT License.


๐Ÿ™ Credits

Built with love using:


Happy Coding! ๐Ÿš€

Made with โค๏ธ and Neovim

About

Personal neovim config, modern features and configuration near IDE level. Build with Lazy and mason

Topics

Resources

License

Code of conduct

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages