mirror of
https://github.com/LazyVim/LazyVim.git
synced 2025-07-13 19:04:36 +02:00
feat(haskell): update haskell-tools version and add ormolu
- Updates haskell-tools to use the recommended version in the plugin's README - Adds ormolu as a formatter
This commit is contained in:
parent
25abbf546d
commit
99aa382f95
1 changed files with 60 additions and 1 deletions
|
@ -14,11 +14,49 @@ return {
|
||||||
|
|
||||||
{
|
{
|
||||||
"mrcjkb/haskell-tools.nvim",
|
"mrcjkb/haskell-tools.nvim",
|
||||||
version = "^3",
|
version = false,
|
||||||
ft = { "haskell", "lhaskell", "cabal", "cabalproject" },
|
ft = { "haskell", "lhaskell", "cabal", "cabalproject" },
|
||||||
dependencies = {
|
dependencies = {
|
||||||
{ "nvim-telescope/telescope.nvim", optional = true },
|
{ "nvim-telescope/telescope.nvim", optional = true },
|
||||||
},
|
},
|
||||||
|
keys = {
|
||||||
|
{
|
||||||
|
"<leader>ce",
|
||||||
|
ft = "haskell",
|
||||||
|
"<cmd>HlsEvalAll<cr>",
|
||||||
|
desc = "Haskell Evaluate All",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"<leader>so",
|
||||||
|
ft = "haskell",
|
||||||
|
function()
|
||||||
|
require("haskell-tools").hoogle.hoogle_signature()
|
||||||
|
end,
|
||||||
|
desc = "Hoogle (Function Signature)",
|
||||||
|
},
|
||||||
|
LazyVim.has("telescope.nvim") and {
|
||||||
|
"<leader>sO",
|
||||||
|
ft = "haskell",
|
||||||
|
"<cmd>Telescope hoogle<cr>",
|
||||||
|
desc = "Hoogle (Global)",
|
||||||
|
} or nil,
|
||||||
|
{
|
||||||
|
"<leader>fl",
|
||||||
|
ft = "haskell",
|
||||||
|
function()
|
||||||
|
require("haskell-tools").repl.toggle()
|
||||||
|
end,
|
||||||
|
desc = "GHCi REPL (Package)",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"<leader>fL",
|
||||||
|
ft = "haskell",
|
||||||
|
function()
|
||||||
|
require("haskell-tools").repl.toggle(vim.api.nvim_buf_get_name(0))
|
||||||
|
end,
|
||||||
|
desc = "GHCi REPL (Current File)",
|
||||||
|
},
|
||||||
|
},
|
||||||
config = function()
|
config = function()
|
||||||
local ok, telescope = pcall(require, "telescope")
|
local ok, telescope = pcall(require, "telescope")
|
||||||
if ok then
|
if ok then
|
||||||
|
@ -80,6 +118,27 @@ return {
|
||||||
end,
|
end,
|
||||||
},
|
},
|
||||||
|
|
||||||
|
{
|
||||||
|
"stevearc/conform.nvim",
|
||||||
|
optional = true,
|
||||||
|
opts = {
|
||||||
|
formatters_by_ft = {
|
||||||
|
haskell = { "fourmolu" },
|
||||||
|
cabal = { "cabal_fmt" },
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
|
||||||
|
{
|
||||||
|
"mfussenegger/nvim-lint",
|
||||||
|
optional = true,
|
||||||
|
opts = {
|
||||||
|
linters_by_ft = {
|
||||||
|
haskell = { "hlint" },
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
|
||||||
-- Make sure lspconfig doesn't start hls,
|
-- Make sure lspconfig doesn't start hls,
|
||||||
-- as it conflicts with haskell-tools
|
-- as it conflicts with haskell-tools
|
||||||
{
|
{
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue