A lightweight Unreal Engine source code accessor plugin that lets the Unreal Editor open C++ files in Neovim on Linux and Windows.
It is intended as a simple replacement for the built-in editor integrations when you want Unreal's "Open C++ Class" and related actions to target Neovim instead of CLion, VS Code, Rider, etc.
Adds Nvim as an alterative under source code editors in unreal.
When Unreal asks to open a source file, the plugin does this:
-
Looks for
nvimand optionalnvronPATH. -
If
nvrexists, it tries to open the requested file in an existing Neovim server:- Linux:
/tmp/nvim-ue - Windows:
\\.\pipe\nvim-ue
- Linux:
-
If
nvris missing or cannot connect, it launches a new Neovim session. Whennvris available, that session is started with the fixed server name for future reuse:- Linux: a terminal running
nvim --listen /tmp/nvim-ue <file> - Windows:
cmd.exe /C start "" nvim.exe --listen \\.\pipe\nvim-ue <file>
Without
nvr, the plugin launches plainnvim <file>. - Linux: a terminal running
This gives you:
- reuse of an already-running Neovim session
- automatic startup of Neovim if none is already running
- support for Unreal Editor actions like opening a C++ class from inside the editor
Currently intended for:
- Linux
- Windows / Win64
- Unreal Engine 5.7
- Linux:
nvimavailable onPATH - Windows:
nvim.exeavailable onPATH
- Linux:
nvravailable onPATH - Windows:
nvr.exeavailable onPATH
nvr is what allows the plugin to reuse an already-running Neovim session. Without it, the plugin can still launch a fresh Neovim instance, but it will not reopen files inside the existing session.
If Unreal is launched from an environment that does not inherit your shell PATH, set these environment variables before starting the editor:
NVIM_SOURCE_CODE_ACCESS_NVIM: full path tonvimornvim.exeNVIM_SOURCE_CODE_ACCESS_NVR: full path tonvrornvr.exe
The plugin will try these terminals, in this order, when it needs to start a fresh Neovim instance:
kittyfootweztermalacrittygnome-terminalkonsolexterm
At least one of those should exist on Linux. Windows starts Neovim through cmd.exe /C start.
The plugin registers a custom Unreal Source Code Accessor named:
Nvim
Inside Unreal Editor, you can select it as your source code editor in:
Edit -> Editor Preferences -> Source Code -> Source Code Editor
Once selected, Unreal will use this plugin when opening source files from the editor UI.
The plugin uses a fixed Neovim server name:
- Linux:
/tmp/nvim-ue - Windows:
\\.\pipe\nvim-ue
That means:
- when
nvris installed, the first file opened from Unreal starts Neovim with--listen <server-name> - later file opens reuse that session through
nvr --servername <server-name>
If you close that Neovim instance, the next file opened from Unreal will start a new one.
- This plugin is not project-path specific.
- It does not hardcode a username, home directory, Unreal project path, or engine path.
- The only hardcoded runtime value is the Neovim server name.
- Reuse of an existing Neovim session depends on
nvr. - The plugin assumes
nvimand Linux terminal executables are discoverable throughPATH, unless overridden with environment variables. - The terminal fallback order is static.
- The Neovim server name is currently hardcoded instead of configurable.
On a Windows host with Unreal Engine 5.7 and Visual Studio 2022 build tools installed, package the plugin with:
Engine\Build\BatchFiles\RunUAT.bat BuildPlugin -Plugin=C:\path\to\NvimSourceCodeAccess.uplugin -Package=C:\Temp\NvimSourceCodeAccessBuild -TargetPlatforms=Win64 -NoSubmitTypical project plugin layout:
Plugins/NvimSourceCodeAccess/
├── NvimSourceCodeAccess.uplugin
└── Source/
└── NvimSourceCodeAccess/
├── NvimSourceCodeAccess.Build.cs
├── Public/
│ └── NvimSourceCodeAccessor.h
└── Private/
├── NvimSourceCodeAccessor.cpp
└── NvimSourceCodeAccessModule.cpp