https://github.com/devk0n/cmakex.nvim
CMake + Ninja build runner for Neovim with zero config
https://github.com/devk0n/cmakex.nvim
build-system cmake cpp neovim neovim-plugin ninja
Last synced: about 2 months ago
JSON representation
CMake + Ninja build runner for Neovim with zero config
- Host: GitHub
- URL: https://github.com/devk0n/cmakex.nvim
- Owner: devk0n
- Created: 2025-06-18T23:26:55.000Z (about 1 year ago)
- Default Branch: master
- Last Pushed: 2025-06-19T00:14:37.000Z (about 1 year ago)
- Last Synced: 2025-06-19T00:27:03.040Z (about 1 year ago)
- Topics: build-system, cmake, cpp, neovim, neovim-plugin, ninja
- Language: Lua
- Homepage:
- Size: 0 Bytes
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# cmakex.nvim
🛠️ A fast, zero-config CMake + Ninja runner for Neovim.
`cmakex.nvim` provides a simple set of commands to generate, build, run, and clean your C++ projects using CMake and Ninja — directly from Neovim.
---
## ✨ Features
- `:Generate [Debug|Release]` — Configure your project with CMake
- `:Build [Debug|Release]` — Compile your project using Ninja
- `:Run` — Run the built executable in a terminal split
- `:Clean` — Remove the build directory
No setup or config files required — works out of the box for most CMake projects.
---
## 🚀 Installation
Using [lazy.nvim](https://github.com/folke/lazy.nvim):
```lua
{
"devk0n/cmakex.nvim",
cmd = { "Generate", "Build", "Run", "Clean" },
config = function()
require("cmakex").setup()
end,
}
```
## 📂 Requirements
- CMake
- Ninja
- A `CMakeLists.txt` file with `project(...)` and `add_executable(...)`
## 📦 Commands
| Command | Description |
|-------------|------------------------------------------|
| `:Generate` | Configure the project (default: Debug) |
| `:Build` | Build the project with Ninja |
| `:Run` | Run the generated executable |
| `:Clean` | Remove the `build/` directory |
---
## 🧠 Example `CMakeLists.txt`
```cmake
cmake_minimum_required(VERSION 3.15)
project(MyApp)
add_executable(MyApp main.cpp)
```