Skip to content

pyankie/nvim-config

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

9 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

πŸš€ Personal Neovim Configuration

A modern, modular, and highly customizable Neovim configuration built with LazyVim and inspired by Takuya Matsuyama's setup.

Neovim Lua LazyVim

✨ Features

  • 🎨 Multiple Colorschemes: Solarized Osaka, Ayu, Night Owl, Oh Lucy, Horizon, and more
  • 🧠 AI Integration: GitHub Copilot with chat support
  • πŸ“¦ Plugin Management: Lazy.nvim for fast, efficient plugin loading
  • πŸ” Enhanced Navigation: Telescope, Flash.nvim, and Neo-tree
  • πŸ’» LSP Support: Full language server protocol integration for multiple languages
  • 🎯 Smart Completion: Blink.cmp for blazing-fast completions
  • πŸ”§ Developer Tools: LazyGit, code runner, terminal integration
  • πŸ“ Markdown Support: Enhanced markdown editing and preview
  • πŸŽ“ LeetCode Integration: Solve coding problems directly in Neovim
  • πŸ”„ Session Management: Auto-save and restore sessions

πŸ“‹ Requirements

  • Neovim >= 0.10.0
  • Git >= 2.19.0
  • Node.js >= 18.x (for LSP servers)
  • Ripgrep (for Telescope grep)
  • A Nerd Font (recommended: JetBrains Mono Nerd Font, Fira Code Nerd Font)
  • C Compiler (for Treesitter)
  • Python 3 (optional, for some plugins)

πŸš€ Installation

Quick Start

  1. Backup existing Neovim configuration (if any):

    mv ~/.config/nvim ~/.config/nvim.bak
    mv ~/.local/share/nvim ~/.local/share/nvim.bak
  2. Clone this repository:

    git clone https://github.com/pyankie/nvim-config.git ~/.config/nvim
  3. Launch Neovim:

    nvim

    Lazy.nvim will automatically install all plugins on first launch.

  4. Install LSP servers and tools:

    • Press <space> + c + m to open Mason
    • Or run :Mason and install required language servers

Post-Installation

After installation, restart Neovim to ensure all plugins are properly loaded.

πŸ“ Project Structure

nvim/
β”œβ”€β”€ init.lua                  # Entry point
β”œβ”€β”€ lua/
β”‚   β”œβ”€β”€ config/               # Core configuration
β”‚   β”‚   β”œβ”€β”€ autocmds.lua     # Auto commands
β”‚   β”‚   β”œβ”€β”€ keymaps.lua      # Key mappings
β”‚   β”‚   β”œβ”€β”€ lazy.lua         # Lazy.nvim setup
β”‚   β”‚   └── options.lua      # Vim options
β”‚   β”œβ”€β”€ lib/                  # Shared libraries
β”‚   β”‚   └── icons.lua        # Icon definitions
β”‚   β”œβ”€β”€ plugins/              # Plugin configurations
β”‚   β”‚   β”œβ”€β”€ colorscheme.lua  # Color themes
β”‚   β”‚   β”œβ”€β”€ lsp.lua          # LSP configuration
β”‚   β”‚   β”œβ”€β”€ ui.lua           # UI plugins
β”‚   β”‚   β”œβ”€β”€ editor.lua       # Editor enhancements
β”‚   β”‚   β”œβ”€β”€ coding.lua       # Coding tools
β”‚   β”‚   └── ...              # Other plugin configs
β”‚   β”œβ”€β”€ util/                 # Utility functions
β”‚   β”‚   └── debug.lua        # Debug utilities
β”‚   └── zpyankie/             # Custom modules
β”‚       β”œβ”€β”€ hsl.lua          # HSL color utilities
β”‚       └── lsp.lua          # Custom LSP helpers
β”œβ”€β”€ stylua.toml              # Stylua formatter config
β”œβ”€β”€ lazyvim.json             # LazyVim extras config
└── README.md                # This file

⌨️ Key Mappings

General

Key Mode Description
<Space> Normal Leader key
jk Insert Exit insert mode
<Leader>w Normal Save file
<Leader>nh Normal Clear search highlights

Navigation

Key Mode Description
sh/sj/sk/sl Normal Navigate between splits
ss Normal Horizontal split
sv Normal Vertical split
sq Normal Close split
<Tab> Normal Next tab
<S-Tab> Normal Previous tab
te Normal New tab
tq Normal Close tab

Editing

Key Mode Description
<Leader>p Normal/Visual Paste from yank register
<Leader>d Normal/Visual Delete without yanking
<Leader>c Normal/Visual Change without yanking
<Alt-Up/Down> Normal/Insert/Visual Move lines up/down
+/- Normal Increment/decrement number

Window Management

Key Mode Description
<C-w><arrows> Normal Resize window
<Leader>sm Normal Maximize/minimize split (vim-maximizer)

LSP & Code

Key Mode Description
<C-j> Normal Go to next diagnostic
<Leader>r Normal Replace hex with HSL (custom)
<Leader>i Normal Toggle inlay hints
gd Normal Go to definition
gr Normal Go to references
K Normal Hover documentation

Git

Key Mode Description
<Leader>gb Normal Git blame
<Leader>go Normal Open in browser
<Leader>gg Normal LazyGit

Search & Files

Key Mode Description
<Leader>ff Normal Find files
<Leader>fg Normal Grep search
<Leader>fb Normal File browser
s Normal/Visual Flash jump
S Normal/Visual Flash treesitter

🎨 Colorschemes

This configuration includes multiple colorschemes:

  • Solarized Osaka (default) - Modern Solarized theme
  • Ayu - Simple, bright, and elegant
  • Night Owl - Theme for the night owls
  • Oh Lucy - Warm and elegant
  • Horizon - Dark theme with bright colors
  • Retro Theme - Nostalgic retro vibes

Switch colorschemes with: :colorscheme <name>

πŸ”§ Customization

Adding New Plugins

Create a new file in lua/plugins/ following this structure:

return {
  "author/plugin-name",
  event = "VeryLazy", -- or other lazy-loading events
  dependencies = {
    -- plugin dependencies
  },
  opts = {
    -- plugin options
  },
  config = function()
    -- plugin configuration
  end,
  keys = {
    -- plugin keymaps
  },
}

Modifying Keymaps

Edit lua/config/keymaps.lua to add or modify key mappings:

local keymap = vim.keymap
local opts = { noremap = true, silent = true }

keymap.set("n", "<your-key>", "<your-command>", opts)

Changing Options

Modify lua/config/options.lua to change Vim options:

vim.opt.option_name = value

πŸ› οΈ Language Support

Pre-configured Languages

  • JavaScript/TypeScript (tsserver, eslint, prettier)
  • Lua (lua_ls, stylua)
  • Go (gopls)
  • C/C++ (clangd, clang-format)
  • Java (jdtls)
  • Rust (rust-analyzer)
  • Python (pyright)
  • HTML/CSS (html, cssls, emmet_ls)
  • Tailwind CSS (tailwindcss)

Adding New Languages

  1. Open Mason: <Space>cm
  2. Install required LSP server
  3. Or add to lua/plugins/lsp.lua:
opts = function(_, opts)
  vim.list_extend(opts.ensure_installed, {
    "your-lsp-server",
    "your-formatter",
    "your-linter",
  })
end

πŸ“š Plugin Highlights

Core Plugins

UI Enhancements

Productivity

AI & Coding

πŸ› Troubleshooting

Plugins not loading

# Clear cache and reinstall
rm -rf ~/.local/share/nvim
rm -rf ~/.cache/nvim
nvim

LSP not working

  1. Check if LSP server is installed: :Mason
  2. Check LSP status: :LspInfo
  3. Check logs: :messages

Slow startup

  1. Profile plugins: :Lazy profile
  2. Check startup time: nvim --startuptime startup.log

🀝 Contributing

Contributions are welcome! Please see CONTRIBUTING.md for guidelines.

  1. Fork the repository
  2. Create your feature branch (git checkout -b feature/amazing-feature)
  3. Commit your changes (git commit -m 'Add some amazing feature')
  4. Push to the branch (git push origin feature/amazing-feature)
  5. Open a Pull Request

πŸ“ Code Style

  • Use Stylua for Lua formatting
  • Follow modular structure: one plugin per file
  • Add comments for complex configurations
  • Keep files focused and DRY

πŸ“– Resources

πŸ“„ License

This configuration is available under the MIT License. See LICENSE for details.

πŸ™ Acknowledgments


Made with ❀️ and Neovim

About

My NeoVim config

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages