Skip to content

MahaoAlex/alex.nvim

 
 

Repository files navigation

☄️ Mars.nvim (Alex Edition)

English | 中文

Personal Neovim and tmux configuration with a focus on modern development experience, AI-assisted coding, and productivity.

This is a customized fork for Alex, based on the excellent Mars.nvim (which itself is based on Kickstart.nvim).

Important

Respecting Original Authors: This project is a fork of Mars.nvim. All credit for the core architecture and plugin selection goes to the original author. This version includes specific tweaks and fixes for Alex's environment.

Screenshot

📦 Installation

Prerequisites

  • Neovim ≥ 0.10 (recommended: 0.11+)
  • Git
  • A Nerd Font (for icons)
  • Node.js (for LSP servers) - Note: If installing via Nodesource, npm is included. Avoid installing npm separately to prevent conflicts.
  • ripgrep (for telescope grep)

Quick Install

git clone https://github.com/MarsWang42/mars.nvim.git ~/.config/mars.nvim
cd ~/.config/mars.nvim
chmod +x install.sh
./install.sh

🛠️ Alex's Customizations

  • Environment Fixes: Resolved package conflicts between nodejs and npm on Ubuntu systems.
  • AI Integration: Optimized configurations for Claude and Gemini companions.
  • Workflow Tweaks: (Add specific tweaks here as needed)

The install script will:

  • Create symlinks in ~/.config/nvim and ~/.config/tmux
  • Backup any existing configs (with timestamps)

✨ Features

🤖 AI-Powered Development

Plugin Description Key Bindings
claudecode.nvim Claude Code integration for AI pair programming <leader>cc toggle, <leader>cs send selection
nvim-gemini-companion Gemini AI integration <leader>gg toggle
supermaven-nvim Fast AI code completion Auto-suggests as you type

Claude Code keybindings:

  • <leader>cc - Toggle Claude Code terminal
  • <leader>cf - Focus Claude terminal
  • <leader>cr - Resume previous conversation
  • <leader>cs - Send visual selection to Claude
  • <leader>cb - Add current buffer to context
  • <leader>ca / <leader>cd - Accept/Deny diff suggestions

Gemini keybindings:

  • <leader>gg - Toggle Gemini sidebar
  • <leader>gc - Switch to AI session
  • <leader>ga / <leader>gd - Accept/Deny diff

🔍 Navigation & Search

Plugin Description Key Bindings
telescope.nvim Fuzzy finder for files, grep, and more <C-p> files, <leader>sg grep
leap.nvim Lightning-fast motion anywhere on screen e to leap, E cross-window
grug-far.nvim Find and replace across files <leader>gs

Telescope shortcuts:

  • <C-p> / <leader>sf - Find files
  • <leader>sg - Live grep
  • <leader>sw - Grep current word
  • <leader><leader> - Find buffers
  • <leader>/ - Fuzzy search in current buffer

📂 Git Integration

Plugin Description Key Bindings
neogit Magit-like Git UI <leader>ng
gitsigns.nvim Git decorations and hunk actions ]c / [c navigate hunks
diffview.nvim Enhanced diff viewer Via Neogit

Gitsigns shortcuts:

  • <leader>hs - Stage hunk
  • <leader>hr - Reset hunk
  • <leader>hp - Preview hunk
  • <leader>hb - Blame line
  • <leader>hd - Diff against index

🛠️ LSP & Code Intelligence

  • Auto-configured LSPs via Mason: Go, TypeScript, Python, Lua, and more
  • Format on save with conform.nvim (stylua, prettier, gofumpt, etc.)
  • Diagnostics with inline virtual text and floating windows

LSP keybindings:

  • grn - Rename symbol
  • gra - Code actions
  • grd - Go to definition
  • grr - Find references
  • gO - Document symbols
  • L - Show line diagnostics

🎨 UI & Quality of Life

Plugin Purpose
tokyonight.nvim Colorscheme with transparent background
mini.nvim Statusline, surround, and text objects
which-key.nvim Keybinding hints popup
neo-tree.nvim File explorer (<C-e>)
todo-comments.nvim Highlight TODO/FIXME/etc
vim-tmux-navigator Seamless navigation between vim and tmux

⌨️ Key Bindings Summary

Key Action
<Space> Leader key
jk Escape (insert/terminal mode)
; Command mode (:)
tn / tj / tk New tab / Next / Previous
<C-h/j/k/l> Navigate splits (tmux-aware)
e / E Leap motion

📁 Structure

.
├── install.sh          # Installation script
├── nvim/
│   ├── init.lua        # Entry point
│   └── lua/mars/
│       ├── options.lua     # Vim options
│       ├── keymaps.lua     # Global keybindings
│       └── plugins/        # Plugin configurations
│           ├── lsp.lua
│           ├── telescope.lua
│           ├── gitsigns.lua
│           └── ...
└── tmux/
    └── tmux.conf       # Tmux configuration

📝 License

MIT

About

Fork and modify from marsWang, TIA!

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages

  • Lua 75.6%
  • Shell 24.4%