ALL INTELLIGENCE
Hacker News AIT2·Tools

Neovim Plugin Brings Live Assembly Viewing to Floating Windows

Original title: Show HN: Godbolt-in-a-floating-window for Neovim (C, C++, Rust)
58AI Score

AssemblyForNeovim is an open-source Neovim plugin that displays the assembly output of C, C++ and Rust code in a floating window, mimicking the Godbolt compiler explorer experience. It runs fully offline against locally installed compilers, supports generating assembly for the function under the cursor or a visual selection, and lets users change -O levels and recompile inside the window.

Full Report

Contents2 sections

AssemblyForNeovim

Shows the assembly for C, C++ and Rust code in a floating window.

https://github.com/user-attachments/assets/737170fb-f232-40c9-929a-52081067274d

Install

lazy.nvim:

LUA
{
	"0xdeadf1sh/AssemblyForNeovim",
	config = function()
		require("asm").setup()
	end,
}

Use

  • <leader>a in normal mode: function under the cursor
  • <leader>a in visual mode, or :'<,'>Asm: selected lines
  • In the window: +/- change -O level, R reruns, q closes

Needs cc/c++ or rustc/cargo on PATH. Uses compile_commands.json if it finds one.


作者发帖说明(HN):

No internet connection needed. Uses a locally-installed compiler for assembly generation.