https://github.com/iiibreakeriii/recursion.nvim
A Neovim plugin for disassembling and decompiling C code directly in Neovim.
https://github.com/iiibreakeriii/recursion.nvim
c clang clanguage gcc gcc-complier neovim neovim-plugin nvim nvim-plugin
Last synced: about 2 months ago
JSON representation
A Neovim plugin for disassembling and decompiling C code directly in Neovim.
- Host: GitHub
- URL: https://github.com/iiibreakeriii/recursion.nvim
- Owner: IIIBreakeRIII
- License: mit
- Created: 2025-08-06T09:54:00.000Z (11 months ago)
- Default Branch: main
- Last Pushed: 2025-08-06T13:07:02.000Z (11 months ago)
- Last Synced: 2025-08-06T13:11:37.033Z (11 months ago)
- Topics: c, clang, clanguage, gcc, gcc-complier, neovim, neovim-plugin, nvim, nvim-plugin
- Language: Lua
- Homepage:
- Size: 9.77 KB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: Readme.md
- License: LICENSE
Awesome Lists containing this project
README
# ReCursion.nvim
A Neovim plugin for disassembling and decompiling C code directly in Neovim.\
Uses `objdump` for disassembly and `retdec` for decompilation.
---
## 📦 Installation
### Lazy.nvim
```lua
{
"IIIBreakeRIII/ReCursion.nvim",
config = function()
require("ReCursion").setup()
end,
}
```
### Packer.nvim
```lua
use {
"IIIBreakeRIII/ReCursion.nvim",
config = function()
require("ReCursion").setup()
end,
}
```
---
## âš¡ Requirements
- `gcc` (for compilation with debug symbols)
- `objdump` (for assembly output)
- `retdec` (for C decompilation, requires `retdec-decompiler` CLI)
Ensure these are available in your `PATH`.
---
## 🚀 Usage
```vim
" Disassemble current C file
:ReCDisasm
" Decompile current C file
:ReCDecompile
" Close result buffer
;bd
```
The output opens in a vertical split with syntax highlighting.
---
## 📂 How It Works
1. Saves the current buffer to `/tmp/recursion_code.c`.
2. Compiles with `-g -O0 -fno-builtin` to preserve debug info and disable built-ins.
3. Runs `objdump -d -l -S` (or `otool -tvV` on macOS) for disassembly, or `retdec-decompiler` for decompilation in JSON-human mode.
4. Reconstructs and displays results in a scratch buffer inside Neovim.
---
## 📜 License
MIT