Skip to content
mathaimpPublic

About

My personal Neovim configuration in Lua, built on the native vim.pack plugin manager (Neovim 0.12+).

Topics

Resources

Stars

0 stars

Watchers

1 watching

Forks

Latest commit

 

History

51 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Neovim Configuration

A personal Neovim configuration written in Lua and built on top of Neovim's native vim.pack plugin manager (Neovim 0.12+) plus a curated set of plugins for a modern and efficient development experience.

Table of Contents

Features

  • Plugin Manager: Uses Neovim's built-in vim.pack for fast startup and dependency-free plugin management (no external manager required).
  • Lazy Loading: Non-essential plugins are scheduled after VimEnter to keep startup time minimal.
  • Editing Features: Autocompletion (blink.cmp), snippets, auto-pairing, surrounding, improved text objects, and yank history/cycling.
  • LSP: Full LSP support via nvim-lspconfig (using the new vim.lsp.enable API) for diagnostics, code actions, hover, rename, and more.
  • Formatting: Automatic formatting on save and on demand with conform.nvim.
  • File Navigation: Edit the filesystem like a buffer with oil.nvim, and fuzzy-find everything with fzf-lua.
  • Git Integration: Inline git signs, hunk staging/resetting, and blame via gitsigns.nvim.
  • Custom Statusline: A hand-written, dependency-free statusline (lua/plugins/status.lua) showing mode, git state, diagnostics, filetype, and cursor position.
  • Treesitter: Auto-installs parsers for newly opened file types and starts highlighting for each buffer. Function and class text objects (aF/iF, ac/ic) come from nvim-treesitter-textobjects through mini.ai.
  • Markdown & Images: In-buffer markdown rendering (render-markdown.nvim) and inline images through the kitty graphics protocol (snacks.image), working inside tmux and over SSH.
  • Clipboard: unnamedplus everywhere. With no clipboard tool (SSH, no display) copy goes through OSC 52; paste returns the last copy and never queries the terminal.
  • Tools: Floating lazygit and terminal (snacks.nvim) and key hints (mini.clue).

File Structure

nvim/
├── init.lua                    -- Entry point: enables loader and requires modules
├── lua/
│   ├── options.lua             -- Core editor options and diagnostics
│   ├── keymaps.lua             -- Global keymaps
│   ├── autocmds.lua            -- Autocmds (relative numbers, auto-save, yank highlight)
│   ├── packages.lua            -- vim.pack bootstrap and plugin entry points
│   └── plugins/
│       ├── alpha.lua           -- Dashboard / startup screen
│       ├── clue.lua            -- Key hints (mini.clue)
│       ├── completions.lua     -- blink.cmp, mini.nvim modules, gitsigns, noice
│       ├── fzf.lua             -- fzf-lua fuzzy finder and pickers
│       ├── lang.lua            -- LSP config and conform.nvim formatting
│       ├── markdown.lua        -- render-markdown.nvim
│       ├── misc.lua            -- vimtex
│       ├── snacks.lua          -- Lazygit and floating terminal keymaps
│       ├── status.lua          -- Custom hand-written statusline
│       ├── theme.lua           -- Colorscheme (nord) and transparent backgrounds
│       ├── treesitter.lua      -- Treesitter config and auto-install
│       └── yanky.lua           -- Yank history, snacks.nvim setup (picker, image)
└── nvim-pack-lock.json         -- Locked plugin revisions for vim.pack

Installation

Prerequisites

Before you begin, ensure you have the following external dependencies installed:

  • Neovim (v0.12.0 or newer — required for vim.pack, vim.lsp.enable, and vim.loader)
  • Git
  • fzf (fuzzy finder backend for fzf-lua)
  • ripgrep (for fzf-lua live grep)
  • fd (for fzf-lua file finding)
  • A Nerd Font (for icons)
  • tree-sitter CLI (used by nvim-treesitter to build parsers; a C compiler such as gcc/clang may also be required to compile them)
  • ImageMagick (magick, converts non-PNG images for inline display)
  • lazygit (for <leader>gg)

Setup

  1. Clone this repository to your Neovim configuration directory (e.g., ~/.config/nvim):
    git clone https://github.com/mathaimp/nvim.git ~/.config/nvim
  2. Start Neovim. vim.pack will automatically clone the required plugins on first launch.
  3. (Optional) Update all plugins to their latest locked/pinned revisions:
    :lua vim.pack.update()
  4. Manually install your language servers and formatters. This config does not use an auto-installer (no mason.nvim). Install the tools you need on your system, e.g.:
    • Language servers (lua_ls, ty, ruff, rust-analyzer, nixd) — configured in lua/plugins/lang.lua.
    • Formatters (stylua, ruff, nixfmt) — configured in lua/plugins/lang.lua.

Plugins

Core

Plugin Description
vim.pack (Neovim built-in) Native plugin manager introduced in Neovim 0.12; no external manager needed

Appearance & UI

Plugin Description
goolord/alpha-nvim A fast and fully programmable startup dashboard
gbprod/nord.nvim The Nord colorscheme for Neovim
nvim-tree/nvim-web-devicons Filetype icons (Nerd Font)
folke/noice.nvim Better UI for commandline and search
MeanderingProgrammer/render-markdown.nvim Renders markdown (headings, code, tables, checkboxes) in the buffer
lua/plugins/status.lua (custom) Hand-written statusline with mode, git, diagnostics, filetype, and cursor info

Editing & Motions

Plugin Description
echasnovski/mini.nvim mini.pairs, mini.ai, mini.surround, mini.jump, mini.files, mini.clue
gbprod/yanky.nvim Improved yank/put with history and cycling
nvim.undotree (packadd) Visualize and browse the undo history

File Management

Plugin Description
stevearc/oil.nvim Edit the filesystem like a Neovim buffer

Completions & LSP

Plugin Description
saghen/blink.cmp A fast, Rust-powered completion engine
rafamadriz/friendly-snippets Preconfigured snippet collection
neovim/nvim-lspconfig Configurations for Neovim's LSP client

Configured language servers (vim.lsp.enable): lua_ls, ty, ruff, rust_analyzer, nixd. ruff provides lint diagnostics and fixes; ty provides hover and type checking.

Formatting

Plugin Description
stevearc/conform.nvim Lightweight yet powerful formatter, with format-on-save

Configured formatters: stylua (Lua), ruff_format (Python), nixfmt (Nix); falls back to LSP formatting when no formatter is set.

Treesitter

Plugin Description
nvim-treesitter/nvim-treesitter Treesitter configs; auto-installs parsers for new file types
nvim-treesitter/nvim-treesitter-textobjects Supplies the function/class queries used by mini.ai

Git

Plugin Description
lewis6991/gitsigns.nvim Git signs, hunk actions, and blame

Tools

Plugin Description
ibhagwan/fzf-lua A high-performance fuzzy finder built on fzf
folke/snacks.nvim Picker (yank history), inline images, lazygit and floating terminal
lervag/vimtex LaTeX editing; compiles with tectonic on save and views with evince
christoomey/vim-tmux-navigator Seamless navigation between tmux panes and Neovim splits

Keymaps

<Space> is the leader. Pause after it (or after g, z, <C-w>) and mini.clue shows what is available.

Keys Action
- Open parent directory (oil)
<leader>e / <leader>E mini.files at current file / working directory
<leader>ff / fF Find files (project / including ignored)
<leader>fg / fG Live grep (project / including ignored)
<leader>fb, fr, fR, fh Buffers, recent files (cwd / all), help
gd, gr, gi, gt LSP definitions, references, implementations, type definitions (fzf-lua)
<leader>fs / fS, fd / fD Document / workspace symbols and diagnostics
K, <leader>rn, <leader>ca Hover, rename, code action
[d / ]d Previous / next diagnostic
<leader>cf Format buffer
]h / [h, <leader>hs, hr, hp, hb Git hunks: navigate, stage, reset, preview, blame
<leader>gg, gl, gf Lazygit, log, current file history
<leader>tt or <M-t> Toggle floating terminal
<leader>y, <C-p> / <C-n> Yank history, cycle pastes
<leader>u Undo tree
<leader>b Alternate buffer
<leader>pu / pr Update / remove plugins
aF/iF, ac/ic Function and class text objects

About

My personal Neovim configuration in Lua, built on the native vim.pack plugin manager (Neovim 0.12+).

Topics

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages