1
Fork 0
satellite/dotfiles/neovim/lua/my/plugins/idris.lua

36 lines
774 B
Lua
Raw Normal View History

local arpeggio = require("my.plugins.arpeggio")
local lspconfig = require("my.plugins.lspconfig")
local M = {}
local idrisChords = {
2022-08-11 12:21:41 +02:00
sc = "case_split",
mc = "make_case",
ml = "make_lemma",
es = "expr_search",
gd = "generate_def",
rh = "refine_hole",
ac = "add_clause"
}
function M.setup()
2022-08-11 12:21:41 +02:00
local idris2 = require("idris2")
2022-05-11 23:11:54 +02:00
2022-08-11 12:21:41 +02:00
idris2.setup({
server = {
on_attach = function(client, bufnr)
lspconfig.on_attach(client, bufnr)
2022-08-11 12:21:41 +02:00
for key, value in pairs(idrisChords) do
arpeggio.chord("n", "i" .. key,
2022-11-14 01:16:10 +01:00
":lua require('idris2.code_action')." .. value .. "()<CR>",
{ settings = "b" })
2022-08-11 12:21:41 +02:00
end
end
},
client = { hover = { use_split = true } }
})
end
return M