Skip to content

Quick start: Lua (neovim)

glyh edited this page Sep 26, 2022 · 5 revisions

Prerequisites

  1. Install the latest Neovim.

  2. Install the Conjure plugin.

  3. Install the nvim-treesitter plugin.

  4. Run :TSInstall lua to install parser for Lua.

  5. (Optional) Install the nvim-treesitter-textobjects plugin. With this plugin, you can use shortcut keys to select, e.g. a function, and the send it to Conjure for evaluation.

Configuration

You just need to configure Conjure to enable tree-sitter support:

vim.g['conjure#extract#tree_sitter#enabled'] = true

After that, update your config, open a Lua buffer and you’re good to go.

Constraint

  • By default we’re using debug tools to help locals persistent across evaluation. If you don’t want this behavior, you can set g:conjure#client#lua#neovim#persistent to none.

  • Right now the code evaluation is blocking. Later there might be other clients implemented as a standalone REPL that provide non-blocking evaluation.