This is my custom Neovim configuration, designed with love and optimized for productivity. ❤️
- Maximize functionality, minimize bloat: Focus on essential features and performance.
- Leverage native Neovim capabilities: Before introducing plugins, I check if the desired functionality can be achieved using built-in Neovim commands.
- Organized keymaps: Every keymap is categorized with a brief description and a pretext header for easy fuzzy finding. Commands are grouped logically for efficiency.
- Mnemonic-friendly keymaps: Keybindings are intuitive, following familiar patterns where possible to enhance usability and reduce cognitive load.
- Eye-catching, comfortable themes: A killer set of themes that are easy on the eyes and a joy to work in.
- Must be better than VS Code: Because well...
-
💡 Note: Make sure you choose a
Monofont- To get the best visual experience, install a Nerd Font of your choice and set as your terminal font
- Personal recommendations:
- JetBrainsMono Nerd Font
- Fira Code Nerd Font
-
pip install pynvim ipykernel jupytext
-
Windows (Scoop):
scoop install neovim git zig nodejs ripgrep fd curl unzip gzip mingw make nu
-
macOS (Homebrew):
brew install neovim git zig nodejs ripgrep fd curl unzip gzip make nushell
-
Linux (apt):
sudo add-apt-repository ppa:neovim-ppa/unstable -y
curl -fsSL https://apt.fury.io/nushell/gpg.key | sudo gpg --dearmor -o /etc/apt/trusted.gpg.d/fury-nushell.gpgecho "deb https://apt.fury.io/nushell/ /" | sudo tee /etc/apt/sources.list.d/fury.list
sudo apt update
sudo apt install make gcc ripgrep unzip git xclip neovim nushell
You have two options:
-
Clone the repo to any location, then copy it to your config path:
💡 Note: Run these commands from inside the cloned directory!
-
Windows (Command Prompt):
xcopy /E /H /Y . %localappdata%\nvim\ rd /s /q %localappdata%\nvim\.git
-
macOS/Linux:
cp -r . "${XDG_CONFIG_HOME:-$HOME/.config}"/nvim rm -rf "${XDG_CONFIG_HOME:-$HOME/.config}"/nvim/.git
-
-
Clone the repo directly to your config path:
-
Windows (Command Prompt):
git clone https://github.com/Or1g3n/nvim.git "%localappdata%\nvim" rd /s /q "%localappdata%\nvim\.git"
-
macOS/Linux:
git clone https://github.com/Or1g3n/nvim.git "${XDG_CONFIG_HOME:-$HOME/.config}"/nvim rm -rf "${XDG_CONFIG_HOME:-$HOME/.config}"/nvim/.git
-
-
Neovim Tutor
If you are new to neovim, I highly recommend learning/practicing vim fundementals using Tutor mode. To activate, run the following in command mode:
💡 Note: To enter command mode, press
:from normal mode.:Tutor
-
Important Key Maps
💡 Note: To fuzzy find all available keymaps, press
<Leader>sk.💡 Note: For non-plugin specific keymaps, see
nvim/lua/Or1g3n/core/keymaps.lua. For plugin specific keymaps see the corresponding plugin.lua file found innvim/lua/Or1g3n/plugins.💡 Note: The below is NOT exhaustive but a highlight of common actions.
-
Search Keymaps and Help
Keymap Description <Leader>skOpen keymaps fuzzy finder <Leader>shOpen help doc search -
Terminal
Keymap Description <Leader>tToggle floating terminal <Esc><Esc>Enter normal mode -
File explore/search
Keymap Description <Leader>eOpen file explorer <Leader><Leader>Open file fuzzy finder <Leader>fcOpen config file fuzzy finder -
Buffer/Window management
Keymap Description <Leader>wSave buffer <Leader>bdClose buffer <Leader>qForce quit buffer <A-h>Resize window left <A-l>Resize window right <A-j>Resize window down <A-k>Resize window up <A-=>Resize windows equally -
Window navigation
Keymap Description <C-h>Move focus left <C-l>Move focus right <C-j>Move focus down <C-k>Move focus up <Leader>hMove window left <Leader>lMove window right <Leader>kMove window up <Leader>jMove window down -
AI Code Assistance
Keymap Description <Leader>cpToggle GitHub Copilot inline suggestions 💡 Note: Requires running
:CopilotSetupin command mode to initialize GitHub Copilot
-
-
Optimized jupyter notebook experience
-
jupytext
- Add jupytext.toml to your home directory with below settings
# ~/jupytext.toml notebook_metadata_filter="-all" cell_metadata_filter="-all"
- Add jupytext.toml to your home directory with below settings
-
To initializing a new notebook, run the following in command mode:
:NewNoteBook note_book_name
-
Ctrl+EnterandShift+Enterkeymaps will work as expected within a notebook- If your terminal does not support those inputs, then
<Leader>xcand<Leader>xbwill perform the same behavior respectively - Workaround for Windows Terminal
- Add the following to your Windows Terminal settings.json config file:
"actions": [ { "command": { "action": "sendInput", "input": "\u001b[13;5u" }, "id": "User.sendInput.F8A79DCB" }, { "command": { "action": "sendInput", "input": "\u001b[13;2u" }, "id": "User.sendInput.8882FD6D" } ],
- For all notebook cell related keymaps, open the keymap fuzzy finder,
<Leader>sk, and search "Quarto"
- If your terminal does not support those inputs, then
-
To export Jupyter Notebook as .py run the following in command mode:
💡 Note: File will be exported to the location of your current working directory
:JupytextExportAsPy
-
-
AI plugins
- GitHub Copilot
- To get started, run the following in command mode:
:CopilotSetup
- To toggle Copilot inline suggestions, press
<Leader>cp- Disabled by default but this can be changed by setting vim.g.copilot_enable = true
-- nvim/lua/Or1g3n/plugins/ai/copilot.lua vim.g.copilot_enabled = false -- Set to true to enable Copilot inline suggestions by default
- CodeCompanion
- This plugin provides a customizable LLM agent for code generation and assistance.
- Defaults to GitHub Copilot, but can be configured to use other LLMs.
- Add custom LLM adapters in the local directory as described below.
- GitHub Copilot
-
Client specific customizations
This configuration allows adding client specific customizations via files added to the local folder (.gitignore in the root config directory excludes this folder). The idea here is that certain configurations such as bookmarks, llm api keys/adapters, or project directories are specific to certain machine and should not be included in git history.
Below highlights the required local directory structure and the currently supported plugin customizations.
nvim/ | after/ | lua/ | | Or1g3n/ | | | plugins/ | | | | local/ | | | | | alpha/ | | | | | | greeting.lua | | | | | | messages.lua | | | | | codecompanion/ | | | | | | custom_adapter.lua | | | | | minifiles/ | | | | | | bookmarks.lua | | | | | project_picker/ | | | | | | projects.lua
-
alpha (Neovim dashboard plugin)
-
To customize dashboard greeting, default is
Welcome to Neovim!. Add the followinggreeting.luato the local/alpha directory (create if it doesn't exist).-- nvim/lua/Or1g3n/plugins/local/alpha/greeting.lua return "My custom greeting!"
-
To customize dashboard random message, default is
Make it a great day. Add the followingmessages.luato the local/alpha directory (create if it doesn't exist).-- nvim/lua/Or1g3n/plugins/local/alpha/messages.lua.lua return { { message = "Random Message 1" }, { message = "Random Message 2" }, }
-
-
mini.files (File Explorer)
- To customize mini.files bookmarks. Add the following
bookmarks.luato the local/minifiles directory (create if it doesn't exist).-- nvim/lua/Or1g3n/plugins/local/minifiles/bookmarks.lua return { { id = "r", path = "~/repos", desc = "Repos directory" }, { id = "p", path = "~/Python", desc = "Python directory" }, }
- To customize mini.files bookmarks. Add the following
-
project_picker (Change working directory to project of choice)
- To customize project_picker options. Add the following
projects.luato the local/project_picker directory (create if it doesn't exist). - To activate the picker, press
<Leader>pp. - Selecting a project will automatically set the working directory to
dir.-- nvim/lua/Or1g3n/plugins/local/project_picker/projects.lua -- example return { { name = "project_1", dir = "C:/Users/MyUser/repos/project_1", }, { name = "project_2", dir = "C:/Users/MyUser/repos/project_2", }, }
- To customize project_picker options. Add the following
-
codecompanion (LLM Agent)
- To add custom codecompanion LLM adapters. Add the following
custom_adapter.luato the local/codecompanion directory (create if it doesn't exist). - Note, the below is an example and should be updated with your specific requirements. To complete the configuration, update the codecompanion config file found at
nvim/lua/Or1g3n/plugins/codecompanion.lua.-- nvim/lua/Or1g3n/plugins/local/codecompanion/custom_adapter.lua local M = {} M.config = { env = { url = "https://myllm.url.com", api_key = "my_api_key", chat_url = "/v1/chat/completions", models_endpoint = "/v1/models", }, schema = { model = { default = "mistralai/Pixtral-12B-2409", }, }, } return M
- To add custom codecompanion LLM adapters. Add the following
-