Convert Haskell code into point-free Haskell code, within Neovim!
This plugin lets you use the pointfree
tool inside the editor, transforming
the current line, or with a visual selection.
Requirements:
pointfree
package (e.g.stack install pointfree
)plenary.nvim
plugin
Then, add this plugin using your favourite Neovim package manager:
use({
"farbodsz/pointfree.nvim",
requires = "nvim-lua/plenary.nvim",
ft = "haskell"
})
- Run
:Pointfree
to replace your current line with the pointfree version - In visual mode, use
:PointfreeSelection
to replace your selection with the pointfree version
Haskell programmers often write in pointfree style, which is considered cleaner. The existing tools for transforming a function definition into pointfree style are wonderful, but it would be even better if these were integrated into the text-editing experience.
- bmillwood/pointfree for the standalone version of the Haskell point-free tool
- keathley/pointfree.io for the web version of this tool, which I have used countless times
There are a couple similar Vim plugins which I was unaware of when developing this one. These work slightly differently to this plugin:
This plugin is licensed under the MIT License.