Skip to content
项目

关于

Small lua script that shows inline assembly in neovim (x64, aarch64) for C, C++, and Rust.

开发工具

这些数字如何统计

实测星标增长

24小时
+2
7天
+11
15天
+24
1个月
正在收集历史

各周期内的星标净变化,周期相互重叠,并非每日新增。缺失的测量保持空白。星标代表关注度,不代表软件质量。

README.md

原文

AssemblyForNeovim

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

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

  1. Automatically re-orders structs to minimize waste.

https://github.com/user-attachments/assets/f5f302b9-8973-419b-813b-24eaaaa8f1f3

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
  • The shortcut key can be changed by passing a new key value: require("asm").setup({ key = "<leader>A" }).
  • In the window: +/- change -O level, R reruns, q closes
  • :SSort inside a C/C++ struct reorders its fields by alignment to remove padding; :'<,'>SSort reorders only the selected fields. Sizes come from the compiler. Positional initializers ({1, 2.0, 'c'}) are not updated.

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

探索相关项目

加载中…