__ _ _
____/ /________ _(_) _ __(_)___ ___ __________
/ __ / ___/ __ `/ / | | / / / __ `__ \/ ___/ ___/
/ /_/ / /__/ /_/ / / | |/ / / / / / / / / / /__
\__,_/\___/\__,_/_/ |___/_/_/ /_/ /_/_/ \___/
A personal Neovim configuration with 15+ years of evolution, migrated from Vim to Neovim in early 2023. This setup combines modern Neovim features with time-tested customizations.
# Clone the repository
git clone https://github.com/dcai/.vim.git ~/.config/nvim
# Optional: Create symlink for Vim compatibility
ln -s ~/.config/nvim ~/.vim
# For fish shell users: Create nvim symlink as vim
ln -s (which nvim) ~/.local/bin/vim
init.lua
: Main entry pointcore.vim
: Core Vim settings and functionalityfiletype.vim
: Filetype-specific settingsgui.vim
: GUI-related configurationsloader.vim
: Script loader and environment detectionlua/dcai/
: Core Lua configuration modulesplug.lua
: Plugin managementkeymaps/
: Keyboard mappings organized by functionalitylspconfig/
: Language server configurationsllm/
: AI assistant integrations
before/
: Configurations loaded before pluginscaptureoutput.vim
: Utility for capturing command outputkeymap.vim
: Early keymaps loaded before pluginsnetrw.vim
: File browser configurations
after/
: Configurations loaded after pluginsftplugin/
: Filetype-specific settingsplugin/
: Plugin-specific configurations
os/
: OS-specific configurationsmacos.vim
: macOS-specific settingslinux.vim
: Linux-specific settingswindows.vim
: Windows-specific settingswsl.vim
: Windows Subsystem for Linux settings
This configuration uses numerous plugins managed through vim-plug. See plug.lua for the complete list.
The configuration respects several environment variables to customize behavior:
XAI_API_KEY
: API key for X.AI (Grok) LLM services - used in gpconfig.lua:259OPENAI_API_KEY
: API key for OpenAI services - used in gpconfig.lua:280DEEPSEEK_API_KEY
: API key for DeepSeek AI services - used in gpconfig.lua:276GEMINI_API_KEY
: API key for Google Gemini AI services - used in gpconfig.lua:284ANTHROPIC_API_KEY
: API key for Anthropic Claude services - used in gpconfig.lua:288CODECOMPANION_TOKEN_PATH
: Set automatically to$XDG_CONFIG_HOME
for CodeCompanion token storage - set in codecompanion.lua:85XDG_CONFIG_HOME
: Used by CodeCompanion for token path configuration - referenced in codecompanion.lua:85
JSONFIXER
: JSON formatter tool (default:prettier
) - used in ale.lua:1JSFIXER
: JavaScript formatter tool (default:prettier
) - used in ale.lua:2CSSFIXER
: CSS formatter tool (default:prettier
) - used in ale.lua:3JSLINTER
: JavaScript linter tool (default:biome
) - used in ale.lua:82VIM_FZF_ENABLE_FILE_ICONS
: Enable file icons in FZF (set to'true'
) - commented out in fzflua_userconfig.lua:17
NVIM_SHADA
: Custom path for Neovim's ShaDa file - used in init.lua:39VIRTUAL_ENV
: Python virtual environment path (automatically used by pyright LSP) - used in pyright.lua:7-8SSH_CONNECTION
&SSH_TTY
: Detected automatically to enable OSC52 clipboard for SSH sessions - used in init.lua:65MYVIMRC
: Path to vimrc file for reloading - used in vim.lua keymapVIMRUNTIME
: Vim runtime path (automatically set by Neovim) - used in lua_ls.lua:55NODE_TLS_REJECT_UNAUTHORIZED
: Set to"0"
to disable TLS verification for development - set in init.lua
CODESTATS_API_KEY
: API key for Code::Stats tracking service - used in codestats.lua:108CODESTATS_API_URL
: Custom Code::Stats API URL (default:https://codestats.net/api
) - commented in codestats.lua:104-106
The pine color scheme supports several environment variables for customization:
VIM_PINE_COLORSCHEME_STL_FG
: Sets the foreground color for statusline (default: moss color) - used in colors/pine.lua:557VIM_PINE_COLORSCHEME_STL_BG
: Sets the background color for statusline (default: kombu_green) - used in colors/pine.lua:558VIM_PINE_COLORSCHEME_STL_BG_NC
: Sets the background color for inactive window statusline (default: axolotl color) - used in colors/pine.lua:559VIM_DISABLE_MODE_CHANGE
: Set to'true'
or'1'
to disable automatic statusline color changes based on Vim mode - used in colors/pine.lua:646
- 2008: Initial
vimrc
created - Pre-2014: Early history tracked in Git (commit
2f299642859b9efe0d5b1619ceeabcab16158a19
) - Early 2023: Migration to Neovim with Lua configuration
The ASCII art header was generated using figlet -f slant 'dcai vimrc'