In all IDEs out there ( for example Jetbrains Intelij,... ) there is a consistent interface for doing same action for different languages, for example the green play button always runs the project no matter what is the language or the framework.
actions.nvim brings this idea to neovim space, providing a simple API to define actions for a prediacte.
actions:setup {
mappings = {
['n ,ab'] = 'build',
['n ,at'] = 'test_all',
['n ,tt'] = 'test_this',
['n ,ar'] = 'run',
},
{
predicate = utils.make_language_predicate('lua'),
actions = {
run = function(bufnr)
vim.cmd(string.format([[luafile %s]], vim.api.nvim_buf_get_name(bufnr)))
end,
},
},
{
predicate = utils.make_language_predicate('go'),
actions = {
build = function(_)
print('go build command')
end,
test_all = function(_)
print('go test all command')
end,
test_this = function(_)
print('go test this command')
end
}
},
}
Loki, experimental language that compiles to C.
My world in code
Async webserver implemented in both Zig and Rust
Simple, Customizable start screen for Neovim
Simple statusline for neovim, all in lua, all the time :)
Made luv.spawn easy :))
Fuzzy matching for Neovim
Another lisp that compiles to lua