Skip to content

πŸ‘¨β€πŸ’» A personalized NeoVim from scratch with all the features that I want for 100% comfortable development.

License

Notifications You must be signed in to change notification settings

MidHunterX/NvME

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

nvim dashboard

NvME

/ΛˆΙ›nvi mi:/

A MEticulous nvim distribution, crafted from scratch solely for ME with every features and keybindings configured to offer supreME comfort and compleMEnt ME workflow imMEnsely.

⚑ Requirements

  • Neovim (Needs to be built with LuaJIT)

  • GCC: For compiling treesitter languages in Linux

  • Zig Compiler: For compiling treesitter languages in Windows

  • git: For git integration, cloning plugin repos etc.

  • ripgrep: For live grep

  • fd: For Find Files

  • vifm: File Manager

  • lazygit: Git UI

  • nodejs: For Language Servers and Formatters

  • live-server: For local HTML Server

Install Requirements

Arch Based System (pacman)
sudo pacman -S neovim git ripgrep fd vifm lazygit python npm
sudo npm install -g live-server

πŸ›°οΈ Action Center

πŸš€ Install Guide (auto backups prev config if any)

πŸš€ Install

If any config is already present, it backups your config and puts NvME in place.

🐧 Linux

  • Suggested Compiler: GCC

bash / zsh
ME=~/.config/nvim; [ -d $ME ] && mv $ME ${ME}_backup/
git clone https://github.com/MidHunterX/NvME $ME --depth 1 && nvim
fish
set ME ~/.config/nvim; test -d $ME; and mv $ME {$ME}_backup
git clone https://github.com/MidHunterX/NvME $ME --depth 1 && nvim

πŸͺŸ Windows

  • Suggested Compiler: Zig Compiler

powershell
git clone https://github.com/MidHunterX/NvME $env:localappdata\nvim --depth 1; nvim
cmd
git clone https://github.com/MidHunterX/NvME %localappdata%\nvim --depth 1 && nvim
🚢 Uninstall Guide (go back to previous config if exists)

🚢 Uninstall

Uninstalls NvME and returns back to previous config if any.

bash / zsh
ME=~/.config/nvim; [ -d $ME ] && rm -rf $ME && mv ${ME}_backup/ $ME
fish
set ME ~/.config/nvim; test -d $ME && rm -rf $ME; and mv ${ME}_backup/ $ME
🌱 Programming Frameworks Integration Guide

🌱 Programming Frameworks Integration

  • Insert completion using <C-f> just like how it is done in fish shell

Django (Python)

  • From :Mason, Install pyright Language Server

  • Django uses some Python "magic" that makes having precise types for some code patterns problematic. To provide more precise static types and type inference for Django framework and be recognizable to pyright LSP, install:

pip install django-stubs

Java with OpenJDK

sudo pacman -S jdk21-openjdk
sudo archlinux-java set java-21-openjdk

Android SDK

yay -Sy android-sdk \
      android-sdk-build-tools \
      android-sdk-cmdline-tools-latest \
      android-platform \
      android-sdk-platform-tools

android-sdk-platform-tools provides the adb command.

Flutter (Dart)

yay -S flutter-bin

Now flutter command is available in $PATH. Create a new project using flutter create myapp and open it with flutter run.

🎨 Design Philosophy

nvim record

Important Stuff on Top Left Side

Left side is where your eyes linger most of the time when coding. Therefore the most important stuff happens directly near your line of sight. Macro Record Status possess high importance until recording is stopped. Therefore it stays on left side only for the time being recorded for a macro.

Less Important Stuff on Top Right Side

Buffer list is not needed at all times, therefore it doesn’t have that much importance to interfere with the code in buffer.

Yank into System Clipboard by Default

Text is copied to system clipboard almost on every other apps; why should there be an exception here. Less hassle when copy pasting between windows frequently.

Scroll past EOF in buffer with j

Personal preference for EOF to not be stuck at the bottom of the screen. Keys should always do something.

Jump to line ends and paragraphs with H and L

H and L should be the extreme counterparts of h and l. No exceptions. After that, it jumps paragraphs (which is disabled in macro mode).

πŸ’‘ Learn More

SmartMotion: Redefining H and L

If A means β€˜insert further right’ and I means β€˜insert further left’, then H should mean β€˜move further left’ (line-wise), and L should mean β€˜move further right’. Thus H and L is corrected semantically by following vim conventions.

Now, what should happen when I’m already at the edge? It does nothing? No. Pop it off into the next gap so, I can use one key for multiple things in a controlled manner.

  • When at the beginning of a line, H jumps to the previous paragraph {.

  • When at the end of a line, L jumps to the next paragraph }.

Note
Paragraph jumping is intended for general navigational purposes only. Therefore it is disabled in macro mode.

✨ Features

nvim hitfont

  • Convert text to Hit Font with :HitFont

  • Trim trailing lines and Write Buffer with <leader>w

  • Git Commit with <leader>gc using Lazygit

  • Run/Execute files with F5, <leader>ru or :lua Execute_order_69()

  • Run file formatter with <leader>fm or :lua Run_formatter()

  • Custom made CMP auto-completion for git commit messages and regular expression matching

🌳 Treesitter Node Manipulation

treesitter_walker.lua

Navigate through nodes with <C-hjkl>. On a well formatted code, think of this as moving through the indent lines vertically and jumping between the indent lines horizontally.

Swap those nodes around with <C-HJKL>.

⭐ Developer Experience

indent_lines.lua

Code indentation lines which highlights the current scope. The scope is not the current indentation level! Instead, it is the indentation level where variables or functions are accessible. This depends on the language you are writing. The highlight colors are matched with the colors of brackets for a more visually cohesive experience.

flash.lua

Leap to any text with s (Search) and select any Treesitter node with S (Select TS). These are also available as an adverb in vim motion grammar using r (Remotely) and R (Remotely TS) instead (e.g. yr<search_text>iw).

ℹ️ Other DX Related Features
  • comment.lua: Toggle comment with gcc (// line-wise) and gbb (/* block-wise */). Works with <motion> as well (gbip, gc2k, …​).

🫢 Bracket Manipulation

bracket_surround.lua

<bracket> = [a]ngle bracket > | [b]racket ) | [B]race } | [r]ectangle bracket ] | [q]uote " '

Keybinding Description

ds <bracket>

Delete Surrounding <bracket>

cs <bracket> <new-bracket>

Change Surrounding <bracket> to <new-bracket>

cS <bracket> <new-bracket>

Change Surrounding <bracket> to <new-bracket> (line-wise)

gs <motions> <bracket>

Surround this <motions> with <bracket>

gS <motions> <bracket>

Surround this <motions> with <bracket> (line-wise)

gsl <bracket>

Surround this Line with <bracket>

gsL <bracket>

Surround this Line with <bracket> (line-wise)

ℹ️ Other Bracket Related Features
  • bracket_rainbow.lua: Colorizes bracket pairs based on their nesting level. The colors are inspired from "Bracket Pair Colorizer" VSCode extension; which was then adopted as VSCode core feature.

  • bracket_matchparen.lua: Highlights matching bracket pair when cursor is anywhere inside the block. An improved version of inbuilt matchparen.

  • bracket_autopairs.lua: Autoclose brackets, quotes, etc. when typing them. Disabled in macro mode.

🐞 AI Assisted Debugging

ai_lsp_diagnostics.lua

Helps you work out WTF that code error means and how to fix it!

Keybinding Description

<leader>wd

WTF Debug: Give me the simplified explanation of this error

<leader>wf

WTF Fix: Just make this error disappear automatically

<leader>ws

WTF Search: Google this error

<leader>wp

WTF Provider: List and choose an LLM provider

Note
Since this keybind conflicts with <leader>w (save file), this mode can only be activated by pressing <leader> and waiting for 1 second.
πŸ’‘ How to set up?

To install, just export the LLM API key of your choice as an environment variable. For example:

# Gemini
export GEMINI_API_KEY=NznytnzngvbaBsPungTCGnaqTbbtyrFrnepu-NcvUrer

# OpenAI
export OPENAI_API_KEY=sk-XrlGbGurNyyrtrqylBcraShyylPybfrqNVPbzcnalNCVUrer

Supports: ANTHROPIC, COPILOT, DEEPSEEK, GEMINI, GROK, OLLAMA, OPENAI.

Then just select your provider using <leader>wp and you are good to go.

🚽 AI Code Completion

ai_windsurf.lua

Keybinding Description

<C-f>

Accept Full completion (like in fish shell)

<M-,>

Cycle through completions

This feature is enabled by default. But you can toggle AI Code Completion with :Codeium Toggle

πŸ’‘ How to set up?
  • Create a Windsurf account and get an API key.

  • Authorize Windsurf (Codeium) using:

:Codeium Auth
  • Follow the rest of the instructions to get started.

After that, auto-completion will be available for use in the current buffer as you type.

🎨 UI Enhancements

tool_colorpicker.lua

Pick colors with :CccPick. Then use i to change input mode, o to change output format and q to quit selection.

visible_colorcodes.lua

Visualize color codes in buffer. Supported formats are Hex #RGBA, Termcode colorname, CSS rgba(), CSS hsla(), Tailwind Colors

ℹ️ Other UI Related Features
  • markdown_inline-image.lua: Adds image support to Neovim using Kitty’s Graphics Protocol or ueberzugpp. It works great with Kitty and Tmux.

  • markdown_UI.lua: Renders Markdown components like Headings, Tables, Code Blocks, Checkboxes, Blockquotes, Links etc..

🍺 Paying Homage

column_line.lua

Thin virtual vertical line at 80th column. Much nicer and visually less intrusive than the default color column. Punchcards typically used to have 80 column width. Early terminals screens also had a fixed display width of 80 characters. Keeping code within this limit prevented unsightly line wrapping and made it more readable. Even now, when doing multi window workflow, keeping it under 80 columns will make everything look nice and readable as well.

πŸ“ Autocompletion Behaviour

nvim cmp

  • Autocompletion suggestions keep popping while typing

  • If the suggestion box is visible, you can do the following:

  • Select Next entries with: C-n, Down

  • Select Previous entries with: C-p, Up

  • Accept an entry with CR, i, C-i

  • Cancel Completion with C-e, o, C-o

Note: TAB does multiple things here

  • If accepted entry is a snippet and snippet is expanded, use TAB & S-Tab for jumping around the snippet fields.

  • If autocompletion menu is visible, use TAB to select LSP pre-selected entry.

  • If LSP pre-selected entry is not available in menu, TAB will select the first entry.

  • If menu and snippet are both not visible, TAB will jump over quotes and brackets.

  • If quotes and brackets are not available, TAB will act as normal TAB.

πŸ’‘ Show Completion Workflows

Autocompletion: Terminal Style

Select: Tab, S-Tab
Accept: Enter

Autocompletion: Ide Style

Select: Down, Up
Accept: Enter

Autocompletion: Vim / Emacs Style

Select: C-n, C-p
Accept: Enter
Reject: C-e

Autocompletion: Personal Style

Select: Down, Up / Tab, S-Tab
Accept: i
Reject: o

πŸ”₯✍️ Improved Grammar

Sentence = Verb [Adverb [<location>]] Preposition Noun
ℹ️ See full structure
Sentence = [Quantifier] Verb [Adverb [<location>]] Preposition [Quantifier] Noun

Quantifiers

[0-9]

N times

Verbs (Actions)

y

Yank

d

Delete

c

Change

Adverbs (Modifiers)

flash.lua

r

Remotely

R

Remotely (Treesitter)

Prepositions (Relationship)

i

Inside

a

Around

Nouns (Objects)

w

Word

p

Paragraph

s

Sentence

t

Markup Tag

b

Bracket ()

B

Block/Brace {}

" ' ' "

Strings

[ { ( ) } ]

Brackets

treesitter.lua

i

Conditional

l

Loop

f

Function

m

Method

c

Class

a

Argument

=

Assignment

:

Property

πŸ—ΊοΈ Custom Key Remaps

Normal Mode

Key Description

u

Undo

U

Redo

H

Smart Motion to Line Start (^ or {)

L

Smart Motion to Line End ($ or })

<C-u>

Scroll Half Page Up (Cursor Centered)

<C-d>

Scroll Half Page Down (Cursor Centered)

mm

Jump to Matching Bracket

<A-h>

Go to Previous Buffer

<A-l>

Go to Next Buffer

<C-h>

Go to Previous Tab

<C-l>

Go to Next Tab

<F5>

Execute Current Buffer (:lua Execute_order_69())

g?

ROT13 Cipher (default, with description)

Visual Mode

Key Description

J

Move Line Down with Autoindent

K

Move Line Up with Autoindent

<

Indent Line/Selection Left (stay in Visual mode)

>

Indent Line/Selection Right (stay in Visual mode)

H

Smart Motion to Line Start (^ or {)

L

Smart Motion to Line End ($ or })

Terminal Mode

Key Description

<C-n>n

Return to Normal Mode

<C-w>n

Return to Normal Mode

<C-w><ESC>

Return to Normal Mode

Leader Remaps

Key Description

<Space>

Leader

<leader>w

Write File

<leader>er

Erase Search Highlight

<leader>rr

Highlight & Replace Word

<leader>y

Yank Entire Buffer

<leader>us

Toggle Spell Check

<leader>d

Delete Without Yanking

<leader>p

Paste Without Yanking

Buffer & Tab Management

buffer_selector.lua

View all open buffers and switch between buffers with <leader>b. Then open buffer with tag letters or <CR>, V to vsplit, H to hsplit, D to close and q or esc to cancel selection.

Use <M-hl> (Alt+H / Alt+L) to move through buffers.

Key Description

<leader>tn

Tab: New

<leader>tc

Tab: Create

<leader>tx

Tab: Exit

<leader>tq

Tab: Quit

<leader>tX

Tab: Exit Other Tabs

<leader>tQ

Tab: Quit Other Tabs

<leader>th

Tab: Previous

<leader>tl

Tab: Next

<leader><A-h>

Tab: Previous

<leader><A-l>

Tab: Next

GUI Style Remaps

Key Description

<C-s>

Save Document (Normal/Insert mode)

πŸ”Œ Plugins

nvim plugins

  • Lazy Loading Plugin Manager lazy.nvim

  • Autoclosing Braces and Tags with nvim-autopairs

  • Default Colorscheme: catppuccin

  • Fancy Dashboard with dashboard-nvim

  • Gitsigns on Signcolumn with gitsigns.nvim

  • Install LSP servers, DAP servers, Linters and Formatters with mason.nvim

  • NeoVim LSP Configuration with nvim-lspconfig

  • Code Autocompletion with nvim-cmp

  • Code Snippets with luasnip + friendly-snippets

  • Tab out of Brackets and Quotes with neotab.nvim

  • Scope based Indentation Lines with indent-blankline.nvim

  • Lazygit Integration with lazygit.nvim

  • Bracket pair highlighting with rainbow-delimiters.nvim

  • Status Line and Buffer Line with lualine.nvim

  • Change, Delete surrounding brackets or quotes quickly with nvim-surround

  • Fuzzy search project files, Grep text search etc. with telescope.nvim

  • Navigate through undo history tree with telescope-undo.nvim

  • ToDo, Bug, Hack comments highlighting with todo-comments.nvim

  • Convert, Manipulate and Pick Colors with ccc.nvim

  • Semantic based Syntax Highlighting with nvim-treesitter

  • See code context on top with nvim-treesitter-context instead of breadcrumbs

  • View live Treesitter parsing tree with nvim-treesitter/playground

  • Added more text objects with nvim-treesitter-textobjects

  • Manage and Explore files and folders with vifm.vim

About

πŸ‘¨β€πŸ’» A personalized NeoVim from scratch with all the features that I want for 100% comfortable development.

Topics

Resources

License

Stars

Watchers

Forks

Languages