Version 2.x.x rewrite released
#227
Replies: 4 comments 24 replies
-
|
Why use |
Beta Was this translation helpful? Give feedback.
-
|
@sondr3 Thanks for your feedback 😃. Defaulting to For this plugin, the most logical time for initialisation is when opening a Haskell or Cabal file. In case there is a need to conditonally enable individual modules of this plugin, I have enhanced the API in the Not calling If you have a use case that isn't covered by that, please let me know, and I will gladly help you find a solution. That's why I published this announcement and am testing it before releasing 😄. |
Beta Was this translation helpful? Give feedback.
-
|
Would you be open to make an alias for |
Beta Was this translation helpful? Give feedback.
-
|
I don't understand lua, nvim enough to be able to figure this out for myself. It seems the README quickstart documentation is not up to date, after reading this discussion. So I ask: What's an (minimal) example of a configuration that just works? I am using NixOS + home-manager not sure if that helps/matters. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Hey!
I have decided to revamp this plugin's architecture. The
2.x.xbranch is ready.Improvements
Simplified configuration
No need to call a
setupfunction or callrequire('haskell-tools').setup_or_attach().This is all done automatically.
To modify the default configuration, you only need to set
vim.g.haskell_toolssomewhere in yourinit.lua.Internal improvements
This rewrite comes with some internal architectural and type-system related improvements, which should provide more stability.
More info
How to migrate from version
1.x.xAny options you have passed to
setuporstart_or_attachcan be migrated over tovim.g.haskell_tools.For example,
or
become
Example for
lazy.nvimusers:{ 'mrcjkb/haskell-tools.nvim', dependencies = { 'nvim-lua/plenary.nvim', }, branch = '2.x.x', -- Recommended config = function() -- Optional, see Advanced configuration vim.g.haskell_tools = { -- ... }, end, -- load the plugin when opening one of the following file types ft = { 'haskell', 'lhaskell', 'cabal', 'cabalproject' }, }Once done, you can delete any calls to
setuporstart_or_attach.As before, I recommend to either define keymaps in the
~/after/ftplugin/haskell.luaand~/after/ftplugin/cabal.lua, or in thevim.g.haskell_tools.hls.on_attachfunction.Breaking config changes
hover.disablehas been changed tohover.enablefor consistency.hls_log(undocumented) has been moved tohls.logfile.Beta Was this translation helpful? Give feedback.
All reactions