English | 中文
A Modular & High-performance set of configurations for Nvim which is written all by hand
Note
This config is used to be streamlined, why the complexity now?
As the configuration grew, a flat structure became hard to maintain.
The new Modular Architecture separates Policy (what to enable) from Implementation (plugin setup).
It is now a data driven configuration.
- lua/modules/profile/: Defines how the editor behaves.
- lua/modules/lang/: Defines what each language provides. This makes the config a framework rather than just a set of dotfiles.
-
Modular Profile System: Switch between different configuration profiles seamlessly. Customize editor behavior on different device/os just by modify a json table.
-
Granular Language Control: Fine-grained control over LSP, Treesitter, and Formatter on a per-language basis via environment variables.
-
Dynamic Capabilities: Automatic adjustment of features based on the environment (e.g., Neovim version, environment variables).
-
Well organized code(also well annotioned) for beginners to understand -- good code is the best document 😈😈😈
Some binaries should be installed before launch the configuration.
-
makefor markdown previewer -
yarnfor markdown previewer -
rgfor fuzzy finder -
fzffor fuzzy finder -
gcc/clanganyways, a c compiler for tree-sitter parser compilation -
tree-sitterrequired by nvim-treesitter -
fcitx5-remoteLinux,MacOS for ime-switcher -
win32yank.exeWindows for system clipboard support -
cargofull rust toolchain, optionally required by blink.cmp
You can try it immediately without replacing your origin configurations.
./venv # Launch a virtual env shell, it's actually a sanbox shell that isolates plugins, cache and runtime file
vi # Launch neovim on this config, without make changes to your ~/.local/shareOr, you may download the repo to ~/.config/<name>, and run NVIM_APPNAME=<name> nvim to launch
- Auto completion
- Status line
- Color and comment highlight
- File system explorer
- Markdown preview
- Markdown renderer
- Outline
- Integrated terminal
- Fuzzy finder
- LSP support
- Formatter
- SSH clipboard support(Need tmux extra config)
- Input method auto switch (On Linux and MacOS)
- Workspace patch
- Typst support
- Task runner infrastructure (Overseer)
- Windows Support
- Centralized lang feature switch
- Json-env combined profile system
Some features are optional, controlled by a json file -- nvimrc.json, this file should be placed under your config
dir. Here're customizable items:
-
UI
transparent_modeenable transparent modedashboard_art_namechoose an ascii art on dashboardstatline_scrollbar_stylechoose a style for heirline scroll bar, which displays cursor positiondiagnose_inlinedo not use virtual lines to display diagnostic messagesenable_current_line_blameenable virtual text line blame at the end of line
-
Lang module
silent_lang_diagdo not output log of lang loaderlang_blacklistdisabled lang configs, default none, split by ','lang_whitelistenabled lang configs, default all, split by ','lang_levelslang feature config, syntax: stringc:full;cpp:none;rust:lsp,+ts,-fmtmeans enable full feature for c, disable all features for cpp, enable tree-sitter and lsp, disable formatter for rust.
-
Lsp
enable_lspenable lsp Disable LSP if nvim version <= 0.11use_emmylua_lsuseemmylua_lsas lua language serverworkspace_inject_plugin_pathinject plugin path toemmylua_lsworkspace configworkspace_inject_vim_rtinject vim runtime toemmylua_lsworkspace config
-
BigFile
bigfile_size_byteaverage byte sizebigfile_size_lineaverage line length (useful for minified files)
-
Workspace
allow_workspace_patchallow editor patch its behavior according to workspace configworkspace_patch_always_restrictalways enable restrict mode, disable dofile to prevent ACE
-
Misc
sandbox_modecontrol sanbox featuressesson|undo|shada|swap|wb,wbfor writebackupsilent_profile_diagdo not output log of profile loaderdisable_im_switchdisable auto im switcherblink_use_binaryuse prebuild binary instead of building
Here are defaults:
local defaults = {
blink_use_binary = true,
dashboard_art_name = "Ayanami Rei",
diagnose_inline = false,
disable_im_switch = false,
enable_current_line_blame = false,
enable_lsp = true,
lang_blacklist = "all",
lang_levels = "",
lang_whitelist = "",
sandbox_mode = "none",
silent_lang_diag = false,
silent_profile_diag = false,
statline_scrollbar_style = "moon",
transparent_mode = false,
use_emmylua_ls = false,
workspace_inject_plugin_path = false,
workspace_inject_vim_rt = true
bigfile_size_byte = 2097152,
bigfile_size_line = 100000,
allow_workspace_patch = false,
workspace_patch_always_restrict = true,
}Note
Environment variables are still available. They have higher priority than json configured values.
Unlike standard Neovim distributions that focus on being a "bundle" of features, this configuration is architected as a Configuration Engine. It treats configuration as structured data and the loading process as a controlled pipeline.
The core of this setup is the Mechanism (the Loader). It doesn't care what is being loaded;
it only cares about how to scan directories, resolve module paths, and aggregate data.
The Policy (LangSpec or PluginSpec) is pure data.
- Benefit: You can add support for a new language by creating a single declarative file without touching the orchestration logic.
This editor should adapt to context without code changes. By utilizing environment variables like
NVIM_LANG_WHITELIST and NVIM_LANG_BLACKLIST, the configuration allows for "Runtime Masking."
- The Logic: Whitelists act as a "Permit" that overrides any "Deny All" blacklist.
- Use Case: Debugging a core issue? Execute
NVIM_LANG_BLACKLIST=all nvimfor a clean slate instantly.
Every module (e.g., config.langs.python) is an atomic unit. I use a Recursive Path Stack during loading to
ensure that the hierarchy of your filesystem is reflected in the resulting configuration state.
This avoids global namespace pollution and makes "Configuration Collections"
(one file defining multiple sub-entities) possible and safe.
| Feature | Typical Distro | This Configuration |
|---|---|---|
| Loading | Procedural & Linear | Scanned & Aggregated |
| Toggling | Hardcoded Booleans | Semantic Env Masks (+/-) |
| Data Structure | Imperative Setup Calls | Declarative Specs (Schema-driven) |
| Philosophy | "Include Everything" | "Load only what's whitelisted" |
-
Markdown Table Format
-
Image preview in markdown(Partly support)
-
Search enhance
-
Fold range highlighting on unfolding
-
AsciiMode -- No nerd font
-
Latex preview
-
Collect assets and remove some hard coded options
This readme is partial generated by generative AI, but highly audited by human

