跳到正文
Hacker News (official RSS)(github.com)·· 11 天前品質評分54

AssemblyForNeovim 在 Neovim 浮動視窗顯示 C、C++ 與 Rust 組譯結果

Show HN: Godbolt-in-a-floating-window for Neovim (C, C++, Rust)

重點導讀

AssemblyForNeovim 可在 Neovim 浮動視窗顯示 C、C++ 與 Rust 程式碼的組譯結果。

  • - 在一般模式按 <leader>a 可檢視遊標所在函式。
  • 在視覺模式按 <leader>a 或執行 :'<,'>Asm,可檢視選取的程式碼。

AI 伴隨問答

自備 Key 深度分析

針對這篇報導有疑問?可直接點選快捷問題或向 AI 追問背景脈絡與技術細節:

正文

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

2026-10-09.14-16-45.mp4

Install

lazy.nvim:

{
	"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.

讀者討論

理性交流 · 即時討論