A Neovim plugin for the sapf language and interpreter
It's still very WIP. Feel free to contribute.
\z[z .995 leakdc 1 clip2 play] = play
local sapf = require 'sapf'
local map = sapf.map
sapf.setup {
lang = {
executable = "sapf",
prelude = '<PATH-TO>/prelude.txt'
},
window = {
size = 0.35,
wrap = true
},
keymaps = {
['<leader>st'] = map(sapf.start, 'n', {desc ="sapf start"}),
['<leader>sq'] = map(sapf.quit, 'n', {desc ="sapf quit"}),
['<C-e>'] = {
map('editor.send_block', {'i', 'n'}, {desc ="sapf evaluate block/line"}),
map('editor.send_selection', 'x', {desc ="sapf evaluate selection"}),
},
['<M-e>'] = map('editor.send_line', {'n', 'x', 'i'}, {desc = "sapf evaluate line"}),
['<C-s>'] = map('lang.stop', {'n', 'i'}, {desc ="sapf stop"}),
['<C-k>'] = map('help.word', {'n', 'i'}, {desc ="show help for word under cursor"}),
['<M-h>'] = map('help.all', 'n', {desc ="list help for all built-ins"}),
['<leader>cc'] = map('lang.clear', {'n', 'i'}, {desc = "sapf clear"}),
['<leader>cd'] = map('lang.cleard', {'n', 'i'}, {desc = "sapf cleard"}),
},
documentation = {
bif_examples = '<PATH-TO>/sapf-bif-examples.txt',
examples = '<PATH-TO>/sapf-examples.txt',
},
}
(
; this is a block
)
This plugin is heavily based on scnvim by David Granström.