A Practical Guide to the Unreal Engine Neovim Plugin Suite
Supercharge your UE workflow with intelligent caching, a logical project tree, remote commands, and more.
Hey everyone! In a previous article, I introduced a suite of Neovim plugins I created to revolutionize Unreal Engine development. the suite has become even more powerful since then.
This time, instead of just an introduction, I want to give you a practical, step-by-step guide on how to use these plugins together in a real-world development workflow.
First, here's a quick demo of the suite in action:
The Plugin Suite
- UEP.nvim: The core of the suite. Manages project indexing, caching, and file operations.
- UBT.nvim: Your interface for the Unreal Build Tool (UBT).
-
UCM.nvim: Super-fast creation and management for C++ class pairs (
.h
/.cpp
). - ULG.nvim: A build log viewer.
-
neo-tree-unl.nvim: The custom
neo-tree
source that provides a logical view of your UE project.
💾 Installation
Here is a sample configuration for lazy.nvim
to get you started. This will install the entire suite.
-- lazy.nvim spec
return {
{
"taku25/UEP.nvim",
dependencies = {
"nvim-lua/plenary.nvim",
"nvim-telescope/telescope.nvim",
-- or "ibhagwan/fzf-lua",
},
config = function()
require("UEP").setup()
end,
},
{ "taku25/UBT.nvim", config = function() require("UBT").setup() end },
{ "taku25/UCM.nvim", config = function() require("UCM").setup() end },
{ "taku25/ULG.nvim", config = function() require("ULG").setup() end },
{
"taku25/neo-tree-unl.nvim",
dependencies = {
"nvim-neo-tree/neo-tree.nvim",
"nvim-lua/plenary.nvim",
"nvim-tree/nvim-web-devicons", -- optional
"MunifTanjim/nui.nvim",
},
},
}
🚀 The Workflow
Step 1: Index Your Project - The Foundation
First things first. Navigate to the root of your Unreal Engine project (where the .uproject
file is) and run this command:
:UEP refresh
This is the most important command in the suite. It scans your entire project, analyzes module structures, resolves dependencies, and builds an intelligent cache. This cache is what makes all subsequent file searches, tree views, and builds incredibly fast.
- First Run: This can take a moment, depending on your project size. Be patient; it's worth it.
- Subsequent Runs: It only checks for differences, making it extremely fast.
When to use refresh!
, refresh! --force
-
:UEP refresh!
: Use this after switching branches in Git or checking out files from Perforce. It intelligently compares file hashes to update only what's changed. -
:UEP refresh! --force
: Use this if you suspect the cache is corrupted. It nukes the old cache and rebuilds everything from scratch.
Once a project is indexed, the suite remembers it. From then on, you can be in any directory when you start Neovim and jump straight to your project with:
:UEP cd
Step 2: Edit Code - Instant Navigation
With the cache built, it's time to code. There are two primary ways to find and open files.
1. The Logical Tree View (:UEP tree
)
If you have neo-tree.nvim
installed, this is a game-changer that surpasses any standard IDE solution explorer.
:UEP tree [--all-deps]
The real power of this command is its ability to switch contexts on the fly.
-
Default (
:UEP tree
): Shows only the minimal set of modules directly related to your game code (Shallow Dependencies). This keeps your view clean and focused. -
With
--all-deps
: Shows all recursive dependencies, including core Engine modules. This is incredibly powerful when you need a bird's-eye view to understand how your code connects with the underlying engine.
This dynamic view allows you to access relevant files faster than navigating a rigid physical folder structure.
2. The High-Speed Picker (:UEP files
)
When you know the name of the file you want, the picker is the fastest way to get there.
:UEP files [--all-deps]
It provides a fuzzy-findable list of all source and config files in your project's dependency graph.
Step 3: Create & Manage Files - The Magic of UCM
One of the most tedious parts of UE development is creating new .h
and .cpp
file pairs in the correct directories. UCM.nvim
makes this process instant and painless.
:UCM new
This command interactively prompts you for the class name, parent class, and destination. It then generates perfectly templated files with _API
macros, include guards, and more. delete
, rename
, and move
are also available to safely manage file pairs.
🔥 Supercharged with neo-tree
integration
If you're using the neo-tree-unl.nvim
source, you can perform these actions directly from the tree view with single key presses, just like in an IDE.
-
a
: Add a new class (UCM new
) -
d
: Delete the class pair (UCM delete
) -
r
: Rename the class pair (UCM rename
) -
m
: Move the class pair (UCM move
)
Step 4: Build & View Logs
When you're ready to compile, UBT.nvim
handles the call to the Unreal Build Tool.
:UBT build
Use :UBT build!
to open a picker and select a specific build configuration (DebugGame
, Development Editor
, etc.).
To see the build output in real-time or to review past logs, use ULG.nvim
:
:ULG start
Step 5: Run Your Project - Straight from Neovim
Once your build is complete, you can launch it without ever leaving the editor.
-
Launch the Editor:
:UBT run
This is the most common command, launching the full Unreal Editor with your project loaded.
-
Select a Preset to Run:
:UBT run!
The
!
opens a UI picker. If you select a preset withIsEditor = false
(likeWin64DebugGame
), it will launch the standalone game. If you select one withIsEditor = true
, it will launch the editor.
Step 6: Live Coding & Remote Commands
Live Coding is a powerful feature, but the default Ctrl+Alt+F11
shortcut is a nightmare, especially for those of us on 40% or 60% keyboards. ULG.nvim
solves this with a remote command feature.
Setup: In Unreal Editor
First, you need to enable the Remote Control API
plugin in the Editor. (Note: Depending on your UE version, it might be called Remote Execution
or something similar).
-
Go to
Project Settings
->Remote Control
and check the following boxes:Enable Remote Control
-
Allow Remote Console Command Execution
#### Execution: Trigger Live Coding from Neovim!
Make sure your Unreal Editor is running.
In Neovim, run
:ULG start
to open the log window.With the log window active, press the
P
key. A command prompt will open.Type
livecoding.compile
and hit Enter. The compile will run!
You can also run familiar console commands like stat fps
and stat unit
this way.
🔥 Supercharge It with a Keymap
This feature is also exposed as an API, making it perfect for keymaps.
-- Example: map <leader>lc to trigger livecoding.compile
vim.keymap.set("n", "<leader>lc", function()
require("UNL.api").kismet_command("livecoding.compile")
end, { desc = "[L]ive [C]oding Compile" })
Now you can trigger a compile from anywhere, anytime, with a simple key press.
Step 7: Supercharge Your LSP - The Automation Advantage
To get perfect IntelliSense from clangd
, you need an up-to-date compile_commands.json
and headers generated by the Unreal Header Tool (UHT). UBT.nvim
can handle this for you.
-
:UBT gencompiledb
: Generatescompile_commands.json
. -
:UBT genheader
: Runs the UHT to generate headers.
Even better, you can make this completely automatic. By enabling the automation
flags in your UBT.nvim
config, these commands will run automatically in the background when you do things like create a new class with :UCM new
.
-- Example UBT.nvim setup
require("UBT").setup({
automation = {
-- Automatically run UHT after file changes (from UCM, etc.)
auto_gen_header_after_lightweight_refresh = true,
-- Also generate project files after a successful UHT run
auto_gen_project_after_gen_header_success = true,
-- Also generate project files after a full :UEP refresh
auto_gen_project_after_refresh_completed = true,
},
})
Enable these, and you can focus purely on writing C++ code while the plugins handle the tedious project management tasks for you.
Conclusion
I hope this guide shows how you can transform Neovim into a truly first-class development environment for Unreal Engine.
Please give the suite a try! Feedback, contributions, and GitHub stars are always deeply appreciated and give me a huge motivation boost. Happy coding!
Top comments (0)