All notable changes to this project will be documented in this file. This project adheres to Semantic Versioning.
4.3.1 (2024-10-22)
4.3.0 (2024-10-20)
4.2.0 (2024-10-04)
4.1.0 (2024-09-20)
- lsp: disable hover actions if luajit is not available (24865bf)
- nil error when trying to invoke some subcommands (e7a5bdb)
- repl: Accidental use of Neovim 0.11 (nightly) API.
- Require Neovim
>= 0.10
- Rename types in LuaCATS annotations and vimdoc.
- Merge
HlsStart
,HlsStop
,HlsRestart
andHlsEvalAll
intoHls
start
,stop
,restart
andevalAll
subcommands. - Merge
HsRepl*
commands intoHaskell repl *
subcommands. - Merge
HsProjectFile
HsPackageYaml
andHsPackageCabal
commands intoHaskell {projectFile|packageYaml|packageCabal}
subcommands. - Merge logging commands into respective
Haskell log
subcommands.
- Repl: subcommands for remaining Lua functions:
paste_type
,cword_type
,paste_info
,cword_info
.
- LSP: Force-extend Neovim's default client capabilities with detected plugin capabilities, to ensure plugin capability extensions take precedence in case of conflict.
- Add compatibility layers for Neovim API that has been deprecated in Neovim nightly.
- Don't run
ftplugin
more than once on the same buffer. This prevented the LSP client from reattaching when running:e
.
- Missing vimdoc in generated helpfile.
- Don't run
ftplugin
more than once on the same buffer.
- Initialization: Lazy-require
haskell-tools
fields. This prevents configs from being initialized early if callingrequire('haskell-tools')
before settingvim.g.haskell_tools
.
- Hoogle: Don't escape URLs when opening in browser [#336].
- LSP: Add safety to
:HlsRestart
command, to prevent it from retrying indefinitely.
- Hoogle (web): Error handling for invalid
curl
output [#322].
- Health: Only report error if
lspconfig.hls
has been set up, not other configurations.
- Health: Warn if there are unrecognized configs in
vim.g.haskell_tools
.
- Health: Check if
vim.g.haskell_tools
is set, but hasn't been sourced before initialization. - Hoogle (web): Make
curl
silent.
- Remove default setting for
cabalFormattingProvider
, falling back to haskell-language-server's default.
- Don't attempt to generate project tags if no project root is found.
- Remove
plenary.nvim
dependency. POTENTIALLY BREAKING: This should not break anything, but removing a dependency is worth a major version bump, just in case. NOTE:plenary.nvim
is still a dependency oftelescope.nvim
. - POTENTIALLY BREAKING: Bump minimum Neovim version requirement to
0.9
. This plugin may still work with Neovim0.8
, but its compatibility is not tested. - New, fabulous logo.
- Add filetype information to the LSP client #275.
vim.g.haskell_tools
can now also be a function that returns a configuration table.HlsLog
andHtLog
,HtSetLogLevel
commands.
- Configure
haskell-language-server
to log to a temporary file by default, to prevent huge log files #264.
- Don't send an error notification if the name of the buffer cannot be determined when starting the LSP client.
checkhealth
: Report on whether or notvim.g.haskell_tools
is set.
- Health: Check for conflicting
lspconfig.hls
configuration. - New commands:
HlsEvalAll
,HtReplToggle
,HtReplQuit
,HtReplLoad
,HtReplReload
- Builtin repl: Broken toggle
- Automatically add
foldingRange
LSP client capabilities ifnvim-ufo
is installed.
- Automatically discover debug adapter launch configurations if
nvim-dap
andhaskell-debug-adapter
are detected. This can be disabled by setting thevim.g.haskell_tools.dap.auto_discover
option tofalse
.
- Hoogle replace (
<C-r>
) no longer switches to insert mode.
- Hover: Decode url-encoded (type-)definition paths in hover actions (#238).
- Re-add public
haskell-tools.log
API.
- New, more stable architecture.
- BREAKING: Remove
setup
API. - BREAKING: Remove
start_or_attach
API.vim.g.haskell_tools
can be used for configuration instead. - BREAKING:
haskell-tools
now automatically initialises and attaches when opening a Haskell or Cabal file. You can fine-tune this behaviour in the config. - BREAKING: Removed
haskell-tools.dap.nvim_dap
(copy of thedap
module). - BREAKING configuration changes:
hover.disable
has been changed tohover.enable
for consistency.hls_log
(undocumented) has been moved tohls.logfile
.
- Repl: Add
--ghc-option -Wwarn
tocabal repl
command.
- Only attach cabal LSP clients if using
haskell-language-server > 1.9.0.0
. - By default, fall back to
haskell-language-server
ifhaskell-language-server-wrapper
is not found #233.
- LSP client: Don't fail if
hls.on_attach
fails.
- Fix bug that broke codelens auto-refresh and lsp stop/restart #229.
- Cabal: Do not advertise
server_capabilities
forfoldingRangeProvider
andselectionRangeProvider
(#223). Prevents error messages caused by plugins that provide LSP client capabilities that are not built-in to Neovim.
- Hover: Fix error message when using go-to-definition/typeDefinition hover actions with neovim-nightly (10.x).
- Improvements to type signature detection from
textDocument/hover
docs.
- Hover: Hoogle search entries for all detected type signatures.
- repl: If both stack and cabal files are present, prefer stack if it is installed.
This is configurable with the option
tools.repl.prefer
.
- Do not use deprecated health check API in neovim > 0.9.
- Health checks: Parsing of dependency versions without a newline causes error message.
- Typo in
dap
module potentially leading to errors on warning logs.
- Support for
nvim-dap
withhaskell-debug-adapter
, an experimental debug adapter for Haskell.
- Remove some prints.
- Loading files with
'builtin'
repl handler (#177).
- Prevent infinite recursion on strange operating systems in path iteration (#171).
- Repl: Detection of single-package cabal projects.
- Hoogle (web): URL escaping.
- Remove rockspec (not needed, due to luarocks-tag-release-workflow).
HsProjectFile
: Trystack.yml
first, then fall back tocabal.project
and then to*.cabal
.
- Silent failure and unexpected error message if
haskell-language-server
executable is not found (#154).
- Initialisation of client capabilities when
nvim-cmp
is not installed.
- Typo in the logfile name.
- LSP: Evaluate all code snippets in comments at once.
- Support setup in ftplugin/haskell.lua.
- Check if attached LSP client supports codeLens before refreshing.
- Telescope extension can now be registered before haskell-tools has been setup.
- Set up LSP client without
nvim-lspconfig
(removes the dependency). - Hover actions: Shorten locations relative to file, package or project.
- Only show definition/typeDefinition hover actions if they are in different locations.
- Rockspec for automatic dependency management by LuaRocks-compatible plugin managers.
- LuaRocks tag release workflow.
HlsStart
,HlsStop
andHlsRestart
commands.- Dynamically load
haskell-language-server
settings JSON from project root, if available. - Health checks, runnable with
:checkhealth haskell-tools
. - Validate configs during setup.
- Hover action for
textDocument/typeDefinition
.
- Fall back to hoogle browser search if telescope is not set up.
- Do not set a default layout for telescope Hoogle search.
- Ability to temporarily set the log level via
ht.log.set_level(level)
. tools.repl.auto_focus
option.- Vimdocs
- repl.toggleterm: Do not close on failure.
- repl: Quote file names.
- Set default log level to
vim.log.levels.WARN
.
- Support for
hls-cabal-plugin
andhls-cabal-fmt
plugins. - Add logging
- Packer init in minimal config for reproducing issues locally.
- Pass the custom options to hoogle telescope, so that users' custom telescope themes, etc. can be supported.
- Error message shown if hoogle is installed, but telescope is missing
- Bug causing hls to always use default settings
- Prevent concatenatenation with nil on tags generation if package root can't be found
- Project tags not being generated on session start
- Automatically generate project & package tags if
fast-tags
is installed. - Configuration for falling back to hoogle search if
vim.lsp.definition
fails. - Nix flake setup.
- Hover actions improvements:
- Always show 'Go to definition' if location is found.
- Offer Hoogle search for package <> name if location is not found.
- Hoogle search: Replace multiple whitespace with single space.
- CodeLens: Only auto-refresh on buffer the LSP client has attached to.
- Hover actions
- Command for loading files into the repl.
- Ability to paste multiple valid Haskell lines into the repl.
repl.paste_info
andrepl.cword_info
functions.- Telescope live_grep and find_files commands for current package
- Register Telescope extension
- Fix broken
<C-b>
keymap to open Hoogle entry in the browser
- GHCi repl integration: Automagically detect the command to start GHCi and load the current buffer.
- Interact with the GHCi repl from any buffer using lua functions.
:HsProjectFile
,:HsPackageYaml
and:HsPackageCabal
commands to open project/package files for the current buffer.
- Do not close Hoogle Telescope prompt on
<C-b>
(open hackage docs in browser).
- Auto-refresh code lenses only for Haskell files
- Keymap to replace word under cursor when hoogling type signature
- Fix broken telescope hoogle_attach_mappings call, causing error message on entry selection
- Hoogle search (BREAKING CHANGE: Depends on
plenary.nvim
) - Hoogle search for signature under cursor (telescope-local, telescope-web or browser)
- Automatic registration of selection range capabilities if nvim-lsp-selection-range is loaded.
- Basic automatic codeLens refresh (can be disabled by setting
tools.codeLens.autoRefresh = false
).
- Clean exit of language server on quit.
- Basic haskell-language-server client support on par with
nvim-lspconfig.hls
. - Clean shutdown on exit to prevent file corruption (see ghc #14533).