In some cases, inspecting the source is not sufficient; the relevant behavior is only visible in the generated machine code.
splitasm.nvim supports that workflow inside Neovim by opening objdump
output beside the current file and keeping source and assembly aligned during
navigation.
Assembly inspection often requires repeatedly switching between source code and disassembled output. SplitAsm keeps both views in a single workspace:
- source on one side
- disassembly on the other
- optional build step before loading
- cursor sync between both buffers
- optional cleaned asm for easier reading
- stable row coloring for asm lines that map back to source
- Open a source file.
- Run
:SplitAsmOpen. - Read both sides together.
If SplitAsm already knows the executable path, no further setup is required.
Otherwise, it attempts to locate a nearby executable. If that fails, it directs
you to :SplitAsmSetup, :SplitAsmConfig, or a one-time explicit path.
Within the assembly split:
qcloses the splitrrefreshes the assembly viewstoggles synchronization
The same s mapping is also added to source buffers while a SplitAsm session
is active.
{
"NickTsaizer/splitasm.nvim",
cmd = {
"SplitAsm",
"SplitAsmOpen",
"SplitAsmSetup",
"SplitAsmConfig",
"SplitAsmToggleSync",
},
opts = {},
}require("splitasm").setup()require("splitasm").setup({
compiler_cmd = "cargo build --release",
executable_path = "./target/release/myapp",
auto_sync = true,
clean_asm = false,
source_row_colors = true,
})Use the configured or auto-detected executable:
:SplitAsmOpenUse a specific executable for a single invocation:
:SplitAsmOpen ./build/myappWindows example:
:SplitAsmOpen .\build\myapp.exeWhen executable_path is unset, SplitAsm searches in:
../build./bin./out./dist
On Windows, auto-detection also tries .exe variants.
require("splitasm").setup({
compiler_cmd = nil,
executable_path = nil,
auto_sync = true,
clean_asm = false,
source_row_colors = true,
})| Option | Default | Description |
|---|---|---|
compiler_cmd |
nil |
Command to run before loading assembly |
executable_path |
nil |
Executable to inspect; when unset, SplitAsm auto-detects one, including .exe candidates on Windows |
auto_sync |
true |
Keep source and assembly cursors aligned on movement |
clean_asm |
false |
Remove source markers and normalize instruction text |
source_row_colors |
true |
Apply stable subtle line highlights to asm rows that map back to a source line |
require("splitasm").setup() remains intentionally small. SplitAsm validates
option types up front and reports invalid values immediately.
| Command | Description |
|---|---|
:SplitAsmOpen [path] |
Open the assembly view for the configured executable or an explicit path |
:SplitAsm [path] |
Alias for :SplitAsmOpen |
:SplitAsmSetup |
Guided setup for build command and executable path |
:SplitAsmConfig |
Show current settings, then prompt for updates |
:SplitAsmToggleSync |
Toggle automatic source/assembly sync |
SplitAsm depends on the following conditions:
- Neovim 0.9+
- A supported disassembler backend on your
PATH:- GNU
objdump/objdump.exe - LLVM
llvm-objdump/llvm-objdump.exe
- GNU
- Any external build tool referenced by
compiler_cmdmust already be installed and runnable from Neovim's current working directory - A compiled executable with debug line info for best source mapping
SplitAsm reads assembly through one of these backend-specific commands:
- GNU
objdump -d -Mintel --no-show-raw-insn -l -C - LLVM
llvm-objdump -d -M intel --no-show-raw-insn -l -C
- Source-to-assembly mapping depends on debug line markers in the binary
- Auto-detection is heuristic and may not fit every project layout
clean_asm = trueimproves readability, but slightly changes rawobjdumppresentation- Build failures and missing executables are reported clearly, but SplitAsm does not infer project-specific build steps for you
- SplitAsm only supports GNU/LLVM
objdump-style backends - Mixed shell environments on Windows may still require manual
PATHor executable-path configuration
After installation, see :help splitasm.
