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

ย 

History

517 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

nvim dashboard

NvME

/หˆษ›nvi mi:/

Neovim MEticulous Edition, crafted from scratch solely for ME with every Human-Computer Interaction (HCI) perfectly engineered to fit ME needs to offer supreME comfort and compleMEnt ME workflow imMEnsely.

โšก Requirements

Kill Switchโ„ข enabled features gets activated only if the related dependencies are installed in PATH. So, the minimal required dependencies are:

  • Neovim (Needs to be built with LuaJIT)

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

Installing the following dependencies activates plugins and features that require them:

  • GCC or Zig: For compiling treesitter language parsers | nvim-treesitter

  • nodejs: For Language Servers and Formatters | mason-tool-installer.nvim

  • live-server: For local HTML Server | Execute_order_69

  • ripgrep: For live grep | snacks.nvim

  • fd: For Find Files | snacks.nvim

  • vifm: File Manager | vifm.vim

  • lazygit: Git UI | snacks.nvim

  • kitty: Kittyโ€™s Graphics Protocol for inline image/diagram rendering | image.nvim

  • mermaid-cli: For rendering inline Mermaid Diagrams | diagram.nvim

๐Ÿ›ฐ๏ธ 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

Install Requirements

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

Install NvME

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

๐ŸชŸ Windows

Some features like image preview needs a terminal with sixel or kitty graphics protocol support. Kill Switchโ„ข system disables features safely based on the available requirements installed in your system.

  • Suggested Compiler for Tree-sitter: Zig Compiler

Install Requirements

Windows Package Manager (winget)
winget install Neovim.Neovim Git.Git
winget install zig.zig # Takes up-to 15 minutes to extract
winget install BurntSushi.ripgrep.MSVC sharkdp.fd JesseDuffield.lazygit
winget install OpenJS.NodeJS

Restart terminal

Node Package Manager (npm)
npm install -g @mermaid-js/mermaid-cli # Takes 5 minutes
npm install -g live-server

Install NvME

powershell
git clone https://github.com/MidHunterX/NvME $env:localappdata\nvim; 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

  • Matugen generated Material You palette based Dynamic UI coloring

  • Setting env NVIM_OPEN_SIDEBAR=1 auto opens sidebar after opening a file.

  • Convert text to Hit Font with :HitFont and L337 SP34K with :LeetSpeak

  • 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>.

treesitter_split-join.lua

Split and Join nodes with <leader-j> and <leader-J>.

โ„น๏ธ Other Treesitter Related Features
  • treesitter_context.lua: Show context code on top of buffer. Breadcrumbs are almost useless in comparison.

  • treesitter_playground.lua: Live playground to view the Treesitter AST and play with it using :TSPlaygroundToggle.

โญ 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.

regex_spectre.lua

Toggle a specialized regex search and replace UI in buffer with <leader>ur and globally with <leader>uR. Since this uses ripgrep (rg), you can just write pure escape code pollution free beautiful regex. Close the UI with q or <ESC>.

regex_multi-patterns.lua

Mark multiple patterns with <leader>m and navigate with n as usual. Use <leader>em to Erase Marks.

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, โ€ฆโ€‹).

  • comment_todo.lua: TODO comment highlighting. You can search for all TODOs with <leader>st - powered by snacks.lua.

  • toggle_boolean.lua: Toggle values between (true, false), (enable, disable) with increment and decrement fallback. Everything with C-a and C-x.

  • formatter.lua: Format code with <leader>fm. Formatters can be installed with :Mason

  • indent_guess.lua: Automatically detects and applies indentation settings to the current buffer.

  • language_server_protocol.lua: LSP integration for different languages. Different integrations can be manually added with :Mason.

  • lsp_rename.lua: Mass rename variables and functions in LSP with <leader>rn

  • snacks.lua: A collection of QoL plugins by Folke. Search, Explorers and Lazygit included.

  • vifm.lua: Manage and Explore files and folders with <leader>pf (Project Files)

๐Ÿซถ 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> (split-line)

gs <motions> <bracket>

Go Surround <motion/selection> with <bracket>

gS <motions> <bracket>

Go Surround <motion/selection> with <bracket> (split-line)

gsl <bracket>

Go Surround Line with <bracket>

gSl <bracket>

Go Surround Line with <bracket> (split-line)

โ„น๏ธ Other Bracket Related Features

<tag> = Markup Tags like <div>, <p>, <a href="โ€ฆโ€‹" title="โ€ฆโ€‹">, <Dataset xmlns="โ€ฆโ€‹">

Keybinding Description

dst <tag-name> <new-tag>

Delete Surrounding <tag-name>

cst <tag-name> <new-tag>

Change Surrounding <tag-name> to <new-tag>

csT <tag-contents> <new-tag-contents>

Change Surrounding <tag-contents> with <new-tag-contents>

  • 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_UI.lua: Renders Markdown components like Headings, Tables, Code Blocks, Checkboxes, Blockquotes, Links etc..

  • markdown_inline-image.lua: Renders image under cursor using Kittyโ€™s Graphics Protocol or ueberzugpp. It works great with Kitty and Tmux.

  • markdown_inline-diagram.lua: Renders diagrams using Mermaid CLI and Kittyโ€™s Graphics Protocol.

  • colorschemes.lua: Syntax highlighting with Catppuccin colorscheme

  • gitsigns.lua: Git integration on Signcolumn, git chunk navigation and more.

  • lsp_inline-diagnostics.lua: Beautiful and aesthetic Inline diagnostics for LSP errors

  • noice_ui.lua: Completely replaces the UI for messages, cmdline and the popupmenu by Folke.

  • statusline.lua: Lualine.nvim with Matugen dynamic color support.

  • which-key.lua: Helps you remember/discover keymaps, by showing available keybindings in a popup as you type.

๐Ÿบ 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.

๐ŸŽฎ Fun Features

typing-sounds.lua

8-bit sound effects as a feedback for your input interactions. There are no audio file dependency as the sounds are programmatically generated with wavetype, sustain, punch, frequency, arpeggio, decay, resonance, lowpass filter etc.

typing-practice.lua

Practice typing speed with :Typr and view your overall progress timeline, per letter accuracy analysis etc. with :TyprStats.

๐Ÿ“ Autocompletion Behaviour

nvim cmp

autocompletion.lua

  • 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 powered by tabout.lua.

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

autocompletion_colorful-menu.lua: Treesitter parsed syntax highlighting for autocompletion entries

๐Ÿ’ก 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

f

Fenced Code Block (Markdown)

m

Method

c

Class

a

Argument

=

Assignment

:

Property

๐Ÿ—บ๏ธ Custom Key Remaps

nvim plugins

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)

About

๐Ÿ‘จโ€๐Ÿ’ป A personalized NeoVim from scratch with all the features that I want for 100% comfortable development.

Topics

Resources

License

Stars

Watchers

Forks