Neovim Plugins and Configuration Recipes | 4

alpha2phi
5 min readOct 22, 2023

Series to explore Neovim plugins and configuration recipes.

Neovim Plugins and Configuration Recipes | 4

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 = {},
}
compiler-explorer.nvim

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.

--

--

alpha2phi

Software engineer, Data Science and ML practitioner.