A demonstration of embedding the NED text editor into an ImGui application. This project shows how to integrate NED's editor functionality into your own ImGui-based applications.
- Embedded NED text editor with full functionality
- ImGui-based user interface
- Tree Sitter syntax highlighting
- LSP integration support
- Terminal emulator
- Multi-cursor editing
embed.demo.github.mp4
- CMake (version 3.16 or higher)
- C++17 compatible compiler
- OpenGL
- GLFW3
- GLEW
- CURL
- FreeType
brew install clang-format cmake llvm glfw glew pkg-config curl freetypesudo apt install cmake libglfw3-dev libglew-dev libgtk-3-dev pkg-config build-essential libcurl4-openssl-dev clang-format mesa-utils libfreetype6-devThe dependencies are managed by the build script
Clone this repository with all submodules:
git clone --recursive https://github.com/nealmick/ImGui_Ned_Embed.git
cd ImGui_Ned_EmbedImportant: This project uses submodules for both ImGui and NED. Make sure to clone the repo them recursively.
# Initialize all submodules
git submodule init
The NED submodule is configured to track the main branch. To get the latest features and bug fixes:
# Update NED submodule to latest commit on main branch
git submodule update --remote nedRun the build script:
./build.shFor Windows users run the automated build script using powershell:
./build-win.bat
# This may take 10-20 minutes as it requires Visual Studio
# Make sure you restart powershell when promptedThe demo launches automatically after building with build-win.bat. To run it manually:
cd build/Release
ImGuiDemo.exe./ImGuiDemoImGui_Ned_Embed/
├── imgui/ # ImGui library submodule
├── ned/ # NED editor submodule
├── main.cpp # Main application entry point
├── CMakeLists.txt # Build configuration
├── build.sh # Build script
├── build-win.bat # Build script
This project uses two main submodules:
- ImGui (
imgui/): The official ImGui library from the docking branch - NED (
ned/): The NED text editor project with all its dependencies
The NED editor is embedded through the ned_embed library, which provides a API for integration.
You can customize the ImGui configuration by modifying the ned_imgui_config.h file in the NED submodule, or by creating your own configuration file.
This project uses components with different licenses:
- ImGui: MIT License
- NED: MIT License
- Various tree-sitter parsers: MIT License
Please refer to the individual component licenses for more details.