Documentation

Complete reference for CharVim, a custom Neovim 0.12+ configuration managed by lazy.nvim. The entry point is nvim/init.lua and all modules live in nvim/lua/.

Installation

Run the install script. It auto-detects your OS and installs missing system dependencies before symlinking the config into ~/.config/nvim.

bash <(curl -s https://raw.githubusercontent.com/CrtlUserKnown/Charvim/main/setup.sh)

Supported package managers:

OS / DistroPackage manager
macOSbrew
Fedora / RHELdnf
Debian / Ubuntuapt
Arch Linuxpacman

Manual install

  1. Back up your existing config: mv ~/.config/nvim ~/.config/nvim.bak
  2. Clone the repository: git clone https://github.com/CrtlUserKnown/Charvim.git ~/.config/nvim
  3. Launch Neovim: nvim

Plugins install automatically via lazy.nvim on first launch.

Requirements

  • Neovim 0.12+
  • Git
  • A Nerd Font for icons
  • ripgrep for Telescope live grep and Find and Replace
  • fd for Telescope file finding
  • python3 for DAP Python support
  • make for building avante.nvim
  • node for Mason-managed LSP servers
  • ANTHROPIC_API_KEY (optional) for AI features via avante.nvim

How Vim Works

Vim (and Neovim) is a modal editor. Keys do different things depending on the active mode. Press Esc to return to Normal mode from anywhere.

ModeHow to enterPurpose
NormalEscNavigation and commands. This is the default mode.
Inserti / a / oTyping text
Visualv / V / Ctrl+vSelecting blocks of text
Command-line: / /Saving, quitting, searching
Tip Efficiency in Vim comes from staying in Normal mode and combining operators with motions: dw deletes a word, yy yanks a line, ci" changes text inside quotes.

Leader Keys

KeyValue
<leader>Space
<localleader>\

Leader key timeout: 500 ms.

General

KeysModeAction
jkInsertEscape to Normal mode
leader wNormalQuick save (:w)
leader WNormalSave popup (Save / Save As / Format & Save / Save All)
leader qNormalSave and quit (:wq)
leader qqNormalQuit without saving (:q!)
;NormalShell command shortcut (:!)
KeysModeAction
[[NormalGo to beginning of file (gg)
]]NormalGo to end of file (G)
HNormal / VisualGo to beginning of line (0)
LNormal / VisualGo to end of line ($)
Alt+[Normal / VisualPrevious paragraph ({)
Alt+]Normal / VisualNext paragraph (})
Ctrl+h/j/k/lNormalNavigate splits (also integrates with tmux panes)

Line Manipulation

KeysModeAction
Alt+k / Alt+jNormalMove line up / down
Alt+k / Alt+jVisualMove selection up / down
Ctrl+k / Ctrl+jInsertMove line up / down
Ctrl+Shift+k/jNormalDuplicate line up / down
Ctrl+Shift+k/jVisualDuplicate selection up / down

File Explorer

KeysModeAction
leader eNormalOpen file browser at current file's directory
leader ENormalOpen file browser at project root
leader tNormalOpen new tab with file browser
:E / :TreeCommandOpen file browser

Telescope

KeysContextAction
leader gNormalLive grep
leader pNormalProjects picker
Ctrl+.Telescope insertToggle hidden files

Hidden files are shown by default. .git/ directories are always ignored.

Harpoon 2

KeysModeAction
leader aNormalAdd current file to Harpoon list
leader arNormalRemove current file from Harpoon list
leader acNormalClear all Harpoon marks
leader hNormalToggle Harpoon quick menu
Alt+15NormalJump to Harpoon file 1–5
Alt+n / Alt+pNormalNext / previous Harpoon file

Multi-Cursor

KeysModeAction
Ctrl+nNormalEnter multi-cursor mode
Ctrl+Normal / VisualAdd cursor above
Ctrl+Normal / VisualAdd cursor below
j / kMulti-cursor activeMove down/up and extend cursors
EscMulti-cursor activeExit multi-cursor mode

In multi-cursor mode, entering Insert types at all cursor positions simultaneously.

Find & Replace / Rename

KeysModeAction
leader SNormalOpen find & replace panel
leader SVisualOpen panel pre-filled with selection
:FindCommandSame as leader S

Panel navigation:

KeysContextAction
TabAny panelCycle focus: Find → Replace → Results
j / kResults listNavigate matches
yResults listAccept replacement for highlighted match
YAny panelAccept replacement for all matches
EnterResults listJump to match in file
Esc / qAny panelClose

When the find term matches an identifier with an active LSP client, Y uses LSP rename instead of regex substitution.

LSP

KeysModeAction
KNormalHover documentation
gdNormalGo to definition
gDNormalGo to declaration
giNormalGo to implementation
goNormalGo to type definition
grNormalShow references
gsNormalSignature help
leader lrNormalRename symbol (LSP)
leader caNormalCode action
leader leNormalOpen diagnostic float
[d / ]dNormalPrevious / next diagnostic
leader ihNormalToggle inlay hints
leader igNormalAdd word to dictionary (ltex/typos)

Configured LSP Servers

ServerLanguagesNotes
lua_lsLuaAuto-installed via Mason
pyrightPythonAuto-installed via Mason
ts_lsTypeScript / JavaScript / VueAuto-installed via Mason
jdtlsJavaPer-project workspace, GoogleStyle format
kotlin_language_serverKotlinJVM target 17, type & param inlay hints
goplsGogofumpt, full inlay hints, shadow analysis
clangdC / C++ / Obj-CAuto-installed via Mason
tinymistTypstExports PDF on save
sourcekit-lspSwift / Obj-CSystem binary; lazy-enabled on filetype
lemminxXMLAuto-installed via Mason

Debugging (DAP)

KeysModeAction
leader dbNormalToggle breakpoint
leader dBNormalSet conditional breakpoint
leader dcNormalContinue
leader dnNormalStep over
leader diNormalStep into
leader doNormalStep out
leader drNormalOpen REPL
leader dlNormalRun last configuration
leader dtNormalTerminate session
leader duNormalToggle DAP UI
leader dpNormalDebug Python method under cursor
LanguageAdapter
Pythondap-python
Javajdtls built-in
C / C++codelldb
Swiftcodelldb
Kotlinkotlin-debug-adapter

The DAP UI opens automatically when a session starts and closes when it ends.

AI (avante.nvim)

KeysModeAction
Alt+EnterInsertAccept inline suggestion
Alt+]InsertNext suggestion
Ctrl+]InsertDismiss suggestion

Requires ANTHROPIC_API_KEY set in a .env file at the repo root. The file is auto-loaded on startup.

Themes

Keys / CommandAction
:ThemeSelectOpen interactive theme picker with Telescope live-preview
:Theme <name>Switch directly to a named theme
Dashboard tOpen theme picker from the dashboard

Available theme names: Auto, Knew-pines, Noir-cat, Tokyo Night, Catppuccin, Gruvbox, Habamax. Selection persists to ~/.local/share/nvim/charvim_theme.

UI Plugins

  • noice.nvim: Replaces the command line with a centered popup.
  • alpha-nvim: Dashboard with ASCII art logo and a two-column quick-access grid.
  • which-key.nvim: Displays available keybindings in a popup using the modern preset.

Navigation and File Management

  • telescope.nvim and telescope-file-browser.nvim: Fuzzy finder and file browser that replaces netrw. Shows hidden files by default.
  • project.nvim: Project detection and management via Telescope.
  • harpoon (v2): Quick file bookmarking and navigation.
  • vim-tmux-navigator: Seamless navigation between Neovim splits and tmux panes.

Editing Tools

  • nvim-surround: Add, change, and delete surrounding pairs.
  • multicursor (custom): Native multi-cursor implementation.
  • autoclose (custom): Auto-closes brackets, quotes, and backticks.
  • rename-config (custom): Find and Replace panel backed by rg.
  • save-popup (custom): Context-aware save options via leaderW.

LSP and Diagnostics

  • mason.nvim: Installs and manages LSP servers, linters, and DAP adapters.
  • LSP servers registered directly with vim.lsp.config() and vim.lsp.enable().
  • Inlay hints enabled by default where supported. Toggle with leaderih.
  • Diagnostic noise from ltex (sentence and paragraph length) is filtered globally.

Completion

  • nvim-cmp: Completion engine with LSP and buffer sources.
  • LuaSnip: Snippet engine.
KeysModeAction
Tab / Shift+TabInsertCycle through completion items
EnterInsertConfirm selected completion

Linting

nvim-lint runs automatically on BufWritePost and BufEnter.

LanguageLinter
Lualuacheck
Gostaticcheck
Pythonruff
JavaScript / TypeScripteslint_d
Javacheckstyle
Kotlinktlint

Debugging

  • nvim-dap and nvim-dap-ui: Debug Adapter Protocol with an auto-managed UI.
  • mason-nvim-dap: Ensures DAP adapters are installed via Mason.

Syntax and Parsing

  • nvim-treesitter: Syntax highlighting, indentation, and incremental selection.
  • nvim-ts-autotag: Auto-closes and auto-renames HTML and JSX tags.
  • typst-preview.nvim: Live browser preview for Typst files via :TP, :TS, :TU.

Editor Options

OptionValue
Line numbersOn (absolute)
Relative numbersOn
Tab width4 spaces (expandtab)
Smart indentOn
Swap filesOff
Backup filesOff
ClipboardSystem clipboard (unnamedplus)
Scroll offset10 lines
EncodingUTF-8
Cursor lineHighlighted (number only, gold color)
Command line height0 (hidden)
UndoPersistent (survives restarts)
Incremental substituteSplit preview (inccommand = split)

Statusline

Custom-built statusline (no plugin). Displays:

  • Left: Mode indicator letter + filename + modified flag [+]
  • Right: Save flash (written, shown 2s after save) + mode name + percentage + column
ModeColour
NormalGold #f6c177
InsertFoam #9ccfd8
VisualIris #c4a7e7
CommandLove #eb6f92
ReplaceLove #eb6f92

Filetype-Specific Settings

COBOL

Tab width: 8 spaces. Colour columns at 7 and 73. Text width: 72.

Crystal

.cr files fall back to Ruby syntax highlighting.

Java

Build system auto-detected (Maven / Gradle / Ant). JDTLS workspaces stored in ~/.cache/nvim/jdtls/<project_name>.

Kotlin

Build system auto-detected (Gradle or Maven).

User Customization

Two git-ignored files allow personal settings that survive git pull updates. Auto-created with template comments on first startup.

nvim/lua/user.lua

Loaded last, after all CharVim config. Add keymaps, options, autocommands, or override any default:

-- nvim/lua/user.lua
vim.opt.wrap = true
vim.keymap.set('n', '<leader>x', ':!echo hello<CR>', { desc = 'My command' })

nvim/lua/user-plugins.lua

Return a lazy.nvim spec list to add personal plugins:

-- nvim/lua/user-plugins.lua
return {
    { 'folke/zen-mode.nvim', opts = {} },
}

Update Checker

CharVim checks for new GitHub releases on startup. A Telescope popup appears when an update is found.

OptionEffect
Update nowRuns git pull asynchronously
Remind me laterDismisses; prompts again next startup
Skip vX.Y.ZSuppresses this release permanently
Disable update checksTurns off all future checks
CommandAction
:CharvimUpdateCheckForce a check now (also re-enables checks)
:CharvimUpdateEnableEnable automatic update checks
:CharvimUpdateDisableDisable automatic update checks

Settings persist to ~/.local/share/nvim/charvim_settings.json.

Uninstall / Reinstall

Open from the dashboard (u) or with :CharvimUninstall.

OptionWhat it removes
ReinstallRe-runs setup.sh; falls back to recreating the symlink
Normal uninstall~/.config/nvim symlink + CharVim data files
Complete uninstallEverything above + lazy/, mason/, and repo directory
Warning Complete uninstall is irreversible. Type YES at the confirmation prompt to proceed.

Custom Commands

CommandAction
:E / :TreeOpen Telescope file browser
:FindOpen find & replace panel
:TP / :TS / :TUStart / stop / update Typst preview
:ThemeSelectOpen interactive theme picker
:Theme <name>Switch to a specific theme
:OpenInBrowserOpen current HTML file in browser
:RunPythonRun current Python file in split terminal
:RunJavaCompile and run current Java file
:CharvimUpdateCheckCheck for CharVim updates
:CharvimUninstallOpen uninstall / reinstall menu

Dashboard

Open with :AlphaRedraw or leaderd.

KeyAction
fFind file
rRecent files
pProjects
nNew file
gFind text
cOpen config (init.lua)
lLazy plugin manager
mMason installer
tTheme picker
dOpen docs in browser
uUninstall / reinstall menu
qQuit