extra: nvim: Add haskell-tools.nvim plugins

Signed-off-by: Christoph Heiss <christoph@c8h4.io>
This commit is contained in:
Christoph Heiss 2023-04-22 15:03:06 +02:00
parent f06c9efc4b
commit 40971c6a27
Signed by: c8h4
GPG key ID: 6817E9C75C0785D7

View file

@ -286,6 +286,31 @@ require('lazy').setup({
})
end,
},
{
'mrcjkb/haskell-tools.nvim',
dependencies = { 'nvim-lua/plenary.nvim' },
opts = {
hls = {
settings = {
haskell = {
formattingProvider = 'stylish-haskell',
},
},
on_attach = function(client, bufnr)
local opts = vim.tbl_extend('keep', def_opts, { buffer = bufnr })
-- haskell-language-server relies heavily on codeLenses,
-- so auto-refresh (see advanced configuration) is enabled by default
vim.keymap.set('n', '<leader>ll', vim.lsp.codelens.run, opts)
vim.keymap.set(
'n',
'<leader>lh',
ht.hoogle.hoogle_signature,
opts
)
end,
},
},
},
},
config = function()
local cmp = require('cmp')