A lightweight Neovim plugin that shows assembly context (labels, sections, functions) at the top of your editor window as you scroll through assembly files.
- Shows assembly labels and sections as context when they scroll off screen
- Lightweight implementation using Treesitter queries
- Works with common assembly filetypes
- Minimal configuration needed
- Neovim >= 0.8.0
- Treesitter with assembly parser installed
Using packer.nvim:
use {
'username/asm-context.nvim',
requires = {
'nvim-treesitter/nvim-treesitter',
},
config = function()
require('asm-context').setup()
end
}Using lazy.vim:
{
'username/asm-context.nvim',
dependencies = {
'nvim-treesitter/nvim-treesitter',
},
config = function()
require('asm-context').setup()
end
}require('asm-context').setup({
-- Default configuration
enabled = true,
filetypes = { "*.S", "*.s", "*.asm" },
ft_list = { "asm" },
max_lines = 3,
winhighlight = "Normal:AsmContext",
}):AsmContextToggle- Toggle the context display on or off
this plugin uses the AsmContext highlight group. You can customize it in your colorscheme
vim.api.nvim_set_hl(0, "AsmContext", { bg = "#333333", fg = "#ffffff" })After creating these files, you can:
- Install the plugin with your package manager
- Make sure you have Treesitter with the asm parser installed
- Setup the plugin in your Neovim config:
require('asm-context').setup({
-- Customize settings if needed
})