Home

Awesome

👩‍🔬 lab.nvim

<br>

:warning: Heads up: lab.nvim is very early in development and is currently in a proof of concept state. Right now lab.nvim is more-or-less stable and usable, but in any case, consider this pre-release beta software.

Goal

Provide a collection of unique prototyping tools for neovim. These tools should be extremely configurable and modular in nature.

Features

<a id="code-runner"></a> ✳️ Code Runner

code-runner-demo.mp4

Commands

CommandAction
Lab code runRun or resume the code runner on the current file.
Lab code stopStop the code runner on the current file.
Lab code panelShow the code runner info buffer.
Lab code configShow the code runner config for the current file.

Note: that the run command is also automatically invoked each time you save changes to a file that is currently active.

Languages

LanguageSupported
JS / TSconsole, debugger, error
Pythonprint, breakpoint, error
Luaprint, error

<a id="quick-data"></a> ✳️ Quick Data

quick-data-demo.mp4

Configuration

sources = cmp.config.sources({
  { name = 'lab.quick_data', keyword_length = 4 }
}, 
require('lab').setup {
  quick_data = {
    enabled = false,
  }
}

Requirements

Optional Requirements

Example Setup

Important: Notice the post install hook. Lab.nvim has a few internal node dependencies that should be installed. See: package.json

Packer

return require('packer').startup(function(use)
  use { '0x100101/lab.nvim', run = 'cd js && npm ci', requires = { 'nvim-lua/plenary.nvim' } }
end)

Vim Plug

Plug 'nvim-lua/plenary.nvim'
Plug '0x100101/lab.nvim', { 'do': 'cd js && npm ci' }

Setup options (defualts illustrated below)

require('lab').setup {
  code_runner = {
    enabled = true,
  },
  quick_data = {
    enabled = true,
  }
}

Key Mappings

nnoremap <F4> :Lab code stop<CR>
nnoremap <F5> :Lab code run<CR>
nnoremap <F6> :Lab code panel<CR>

📝 Roadmap