Member-only story
Series to explore Neovim plugins and configuration recipes.
This article is part of the Neovim Plugins and Configuration Recipes series.
The Neovim configuration files are available in this repository.
Plugins
Plugins that are selected for this article!
compiler-explorer.nvim
This is an interesting plugin. compiler.explorer.nvim
compiles our code to assembly code from Neovim using the compiler-explorer REST API.
It features:
- Compile code asynchronously using
vim.loop
. - Select the compiler interactively using
vim.ui.select
or passing it as a Vim command parameter. - Compile visual selections.
- Send compiler warnings and errors to the quickfix list.
- Highlight matching lines between source code and assembly.
- Show binary output (opcodes and address) using virtual text.
- Format code.
- Add libraries.
- Show tooltips about specific instructions.
- Jump to label definitions.
- Load example code.
- Open the website with the local state (source code and compilers).
To install it using lazy.nvim
,
return {
"krady21/compiler-explorer.nvim",
cmd = { "CECompile", "CECompileLive", "CEFormat", "CEAddLibrary", "CELoadExample", "CEOpenWebsite", "CEDeleteCache", "CEShowTooltip", "CEGotoLabel" },
opts = {},
}
Alternative plugin:
scope.nvim + hbac.nvim
We can use scope.nvim
and hbac.nvim
for better buffer management.
scope.nvim
revolutionizes tab management by introducing scoped buffers. Using this plugin, we can seamlessly navigate through buffers within each tab using commands like :bnext
and :bprev
.