Skip to content

A small neovim plugin to spawn and manage a swank server

License

Notifications You must be signed in to change notification settings

spaghettijeff/spank.nvim

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 

Repository files navigation

spank.nvim

A small neovim plugin to spawn and manage a swank server

This is meant to be used along with a plugin like Conjure. It will start a Swank server inside of a nvim terminal emulator.

Requirements

  • a Common Lisp implementation (sbcl is the default)
  • ASDF (this should be included in your Common Lisp implementation)
  • Swank (quicklisp is probably the easiest way to get this. Once quicklisp is installed run (ql:quickload "swank") in your CL repl)

Installation

lazy.nvim

    return { 'spaghettijeff/spank.nvim' }

Configuration

This plugin provides 3 functions spawn(), show(), and quit() to be bound.

You probably want to put the configuration into ftplugin/lisp.lua so that it only runs when a .lisp file is open.

Keybinds

Example:

-- ~/.config/nvim/ftplugin/lisp.lua
local spank = require 'spank'

vim.keymap.set("n", "<leader>ss", spank.spawn)
vim.keymap.set("n", "<leader>sS", spank.show)
vim.keymap.set("n", "<leader>sq", spank.quit)

Settings

The default command to launch the swank server is

{ 
    'sbcl',
    '--eval', '(require "ASDF")',
    '--eval', '(asdf:load-system \'swank)',
    '--eval', '(swank:create-server :dont-close t)' 
}

This can be changed by setting vim.g.spank_settings.swank_cmd. For example:

-- ~/.config/nvim/ftplugin/lisp.lua
require 'spank'
-- settings ...

vim.g.spank_settings.swank_cmd = { 
    'sbcl',
    '--eval', '(ql:quickload "swank")',
    '--eval', '(swank:create-server :dont-close t)' 
}

About

A small neovim plugin to spawn and manage a swank server

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages