Skip to content

galulex/nvim

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

57 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

πŸš€ Neovim Configuration

A powerful, feature-rich Neovim configuration tailored for modern development

✨ Features

  • 🎨 Beautiful UI with transparent OneDark Pro theme
  • πŸ” Fuzzy Finding with Telescope and custom grep functionality
  • πŸ€– AI-Powered Development with GitHub Copilot, Avante, and Claude Code
  • 🌳 Syntax Highlighting with Treesitter
  • πŸ”§ LSP Integration with auto-completion and diagnostics
  • πŸ“ File Management with Neo-tree (file explorer)
  • πŸ“Š Custom Status Line with beautiful icons and information
  • ⚑ Fast Performance with lazy loading
  • 🎯 Rails Development optimized with specific keymaps

πŸ› οΈ Installation

Prerequisites

  • Neovim >= 0.8
  • Git
  • Node.js (for LSP servers)
  • Ruby (for Rails development)
  • Ripgrep (for fast searching)

Quick Install

# Backup existing config (optional)
mv ~/.config/nvim ~/.config/nvim.backup

# Clone this configuration
git clone https://github.com/galulex/nvim.git ~/.config/nvim

# Start Neovim - plugins will auto-install
nvim

Manual Setup

  1. Install Neovim:

    # macOS
    brew install neovim
    
    # Ubuntu/Debian
    sudo apt install neovim
    
    # Arch Linux
    sudo pacman -S neovim
  2. Install dependencies:

    # Install ripgrep for fast searching
    brew install ripgrep chafa ctags fd typos-lsp # macOS
    sudo apt install ripgrep chafa ctags fd-find # Ubuntu
    
    # Install Node.js for LSP servers
    brew install node  # macOS
    curl -fsSL https://deb.nodesource.com/setup_lts.x | sudo -E bash -
    sudo apt-get install -y nodejs  # Ubuntu
  3. Copy configuration:

    cp -r . ~/.config/nvim/
  4. Launch Neovim:

    nvim

πŸ“¦ Plugins

🎨 UI & Appearance

πŸ” Navigation & Search

πŸ€– AI & Completion

🌳 Language Support

πŸ”§ Development Tools

πŸš„ Rails Specific

⌨️ Key Mappings

πŸ”§ General

Key Mode Action
<leader> Space (leader key)
<D-s> Normal/Insert Save file
<D-a> Normal/Insert Select all
<D-c> Normal Copy to clipboard
<D-v> Normal/Insert/Command Paste from clipboard
<D-z> Normal/Insert Undo
<D-/> Normal/Visual Toggle comment

πŸš€ Navigation

Key Mode Action
<D-o> Normal Open file (Telescope)
<C-p> Normal Open file (Telescope)
<S-Tab> Normal Recent files
<D-S-o> Normal LSP references
<D-f> Normal/Visual Find text (grep)

πŸ“‘ Tabs & Windows

Key Mode Action
<D-t> Normal New tab
<D-[> / <D-Up> Normal/Insert Previous tab
<D-]> / <D-Down> Normal/Insert Next tab
<D-w> Normal/Insert Close tab
<S-w> Normal Open directory of current file

🎯 Text Editing

Key Mode Action
< / > Visual Indent/outdent (keeps selection)
<C-Up> / <C-Down> Normal/Visual Move lines up/down
<M-Right> / <M-Left> Normal/Visual/Insert Move by word

πŸš„ Rails Development

Key Mode Action
gV Normal Go to view
gC Normal Go to controller
gM Normal Go to model
gH Normal Go to helper
gJ Normal Go to JavaScript
gS Normal Go to stylesheet

🎨 Neovide (GUI) Specific

Key Mode Action
<D-=> Normal Zoom in
<D--> Normal Zoom out
<D-0> Normal Reset zoom

πŸ”§ Configuration Structure

~/.config/nvim/
β”œβ”€β”€ init.lua                 # Entry point
β”œβ”€β”€ lua/
β”‚   β”œβ”€β”€ config/
β”‚   β”‚   β”œβ”€β”€ keymaps.lua     # Key mappings
β”‚   β”‚   β”œβ”€β”€ lazy.lua        # Plugin manager setup
β”‚   β”‚   β”œβ”€β”€ settings.lua    # Vim settings
β”‚   β”‚   └── tabline.lua     # Custom tabline
β”‚   └── plugins/
β”‚       β”œβ”€β”€ autopairs.lua   # Auto-close pairs
β”‚       β”œβ”€β”€ avante.lua      # AI assistant (disabled)
β”‚       β”œβ”€β”€ claude_code.lua # Claude Code integration
β”‚       β”œβ”€β”€ cmp.lua         # Completion engine
β”‚       β”œβ”€β”€ colorscheme.lua # Theme configuration
β”‚       β”œβ”€β”€ copilot.lua     # GitHub Copilot
β”‚       β”œβ”€β”€ gitsigns.lua    # Git integration
β”‚       β”œβ”€β”€ lazygit.lua     # LazyGit integration
β”‚       β”œβ”€β”€ lspconfig.lua   # LSP configuration
β”‚       β”œβ”€β”€ lualine.lua     # Status line
β”‚       β”œβ”€β”€ mason.lua       # LSP package manager
β”‚       β”œβ”€β”€ neotree.lua     # File explorer
β”‚       β”œβ”€β”€ noice.lua       # UI enhancements
β”‚       β”œβ”€β”€ rails.lua       # Rails support
β”‚       β”œβ”€β”€ telescope.lua   # Fuzzy finder
β”‚       β”œβ”€β”€ treesitter.lua  # Syntax highlighting
β”‚       └── ...
└── lazy-lock.json          # Plugin lock file

🎨 Theme & UI

  • Color Scheme: OneDark Pro with transparency
  • Font: Supports any Nerd Font for icons
  • Transparency: Enabled for modern look
  • Status Line: Custom with file progress, git status, and time
  • Icons: Extensive use of Nerd Font icons throughout

πŸ” Search & Navigation

  • Telescope: Fuzzy finding with custom grep functionality
  • File Ignore: Automatically ignores common build/cache directories
  • Custom Grep: GrepCword command for searching current word
  • Visual Search: Select text and press <D-f> to search

πŸ€– AI Integration

GitHub Copilot

  • Tab: Accept suggestion
  • M-] / M-[: Next/previous suggestion
  • Integrated with completion engine

Claude Code

  • Vertical split terminal integration
  • 40% screen width allocation

Avante (Disabled)

  • Advanced AI assistant capabilities
  • Can be enabled by setting enabled = true in avante.lua

πŸš„ Rails Development

Optimized for Ruby on Rails development with:

  • LSP: Ruby LSP and Solargraph support
  • Auto-format: Ruby files on save
  • Quick Navigation: Rails-specific keymaps (gV, gC, gM, etc.)
  • Slim Templates: Syntax highlighting and support

πŸ› οΈ Customization

Adding New Plugins

  1. Create a new file in lua/plugins/:

    -- lua/plugins/my-plugin.lua
    return {
      "username/plugin-name",
      config = function()
        -- plugin configuration
      end
    }
  2. Restart Neovim - Lazy.nvim will auto-install

Changing Theme

Edit lua/plugins/colorscheme.lua:

return {
  "your-theme/nvim",
  config = function()
    vim.cmd("colorscheme your-theme")
  end
}

Custom Keymaps

Add to lua/config/keymaps.lua:

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

πŸ› Troubleshooting

Plugin Issues

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

# Restart Neovim
nvim

LSP Not Working

# Check LSP servers
:Mason
# Install required servers: ruby-lsp, solargraph, etc.

Performance Issues

# Check startup time
nvim --startuptime startup.log

# Disable heavy plugins temporarily
# Edit respective plugin files and set enabled = false

πŸ“š Resources

🀝 Contributing

Feel free to submit issues and enhancement requests!

πŸ“„ License

This configuration is open source and available under the MIT License.


Happy coding! πŸš€

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages