-
-
Notifications
You must be signed in to change notification settings - Fork 20
Closed
Description
Neovim version (nvim -v)
v0.11.0
Operating system/version
NixOS 25.05
Output of :checkhealth haskell-tools
haskell-tools: require("haskell-tools.health").check()
Checking for Lua dependencies ~
- β
OK [nvim-telescope/telescope.nvim](https://github.com/nvim-telescope/telescope.nvim) installed.
Checking external dependencies ~
- β
OK haskell-language-server: found nix (Nix) 2.28.2
- β
OK hoogle: found Hoogle 5.0.18.4, https://hoogle.haskell.org/
- β
OK fast-tags: found fast-tags, version 2.0.2
- β
OK curl: found curl 8.12.1 (x86_64-pc-linux-gnu) libcurl/8.12.1 OpenSSL/3.4.1 zlib/1.3.1 brotli/1.1.0 zstd/1.5.7 libidn2/2.3.8 libpsl/0.21.5 libssh2/1.11.1 nghttp2/1.65.0
- β οΈ WARNING haskell-debug-adapter: not found.
Install [haskell-debug-adapter](https://github.com/phoityne/haskell-debug-adapter) for extended capabilities.
Optional, for `dap` support.
- β οΈ WARNING ghci-dap: not found.
Install [ghci-dap](https://github.com/phoityne/ghci-dap) for extended capabilities.
Optional, for `dap` support.
Checking config ~
- β
OK No errors found in config.
Checking for conflicting plugins ~
- β
OK No conflicting plugins detected.
How to reproduce the issue
- Open a Haskell file.
- Hit
<leader>f
to format. - Run
:LspInfo
Expected behaviour
Formatted via fourmolu
respecting the project's fourmolu.yaml
. This was the behaviour before v5.0.0.
Expected no errors from :LspInfo
.
Actual behaviour
Formatted via some default, presumably ormolu
.
:LspInfo
produces:
==============================================================================
vim.lsp: require("vim.lsp.health").check()
- LSP log level : WARN
- Log path: /home/burtannia/.local/state/nvim/lsp.log
- Log size: 87974 KB
vim.lsp: Active Clients ~
- β ERROR Failed to run healthcheck for "vim.lsp" plugin. Exception:
Vim:E729: Using a Funcref as a String
I believe this is down to haskell-tools
since running hls
via lspconfig
with an identical config works fine:
lspconfig.hls.setup({
on_attach = on_attach,
cmd = { "nix", "run", ".#hls", "--", "--lsp" },
settings = {
haskell = {
formattingProvider = "fourmolu",
},
},
})
Log files
The minimal config used to reproduce this issue.
local on_attach = function(_, bufnr)
bufmap("<leader>f", function()
vim.lsp.buf.format({ async = true })
end)
end
vim.g.haskell_tools = {
hls = {
on_attach = on_attach,
cmd = { "nix", "run", ".#hls", "--", "--lsp" },
settings = {
haskell = {
formattingProvider = "fourmolu",
},
},
},
}