nvim-hs-ghcid: Neovim plugin that runs ghcid to update the quickfix list

[ apache, editor, library, program ] [ Propose Tags ] [ Report a vulnerability ]

This plugin uses the nvim-hs plugin backend for neovim and fills the quickfix list on file-saves with the errors and warnings that ghcid determines.

The only limitation for this tool is that it needs a .cabal file to work.

This plugin provides 3 commands:

:GhcidStart will prompt you for the configuration you want to use. It should guess a reasonable option based on the files present in your project directory and so you will just have to press enter all the time. If you provide a bang, these questions will not be asked.

:GhcidStop stops the current ghcid process.

:GhcidRestart combines the two previous commands.

Simply import the plugin definition from Neovim.Ghcid and add it to your plugin list.


[Skip to Readme]

Downloads

Maintainer's Corner

Package maintainers

For package maintainers and hackage trustees

Candidates

  • No Candidates
Versions [RSS] 0.1.0, 0.2.0, 1.0.0.0, 2.0.0.0, 2.0.1.0
Dependencies base (>=4.9 && <5), bytestring, containers (>=0.5), directory, filepath, ghcid (>=0.6.1 && <1), nvim-hs (>=2 && <3), nvim-hs-contrib (>=2.0 && <3), nvim-hs-ghcid, resourcet, transformers, unliftio, yaml [details]
License Apache-2.0
Copyright Sebastian Witte <woozletoff@gmail.com>
Author Sebastian Witte
Maintainer woozletoff@gmail.com
Category Editor
Home page https://github.com/saep/nvim-hs-ghcid
Uploaded by saep at 2022-12-16T21:59:50Z
Distributions LTSHaskell:2.0.1.0, NixOS:2.0.1.0, Stackage:2.0.1.0
Reverse Dependencies 1 direct, 0 indirect [details]
Executables nvim-hs-ghcid
Downloads 2949 total (16 in the last 30 days)
Rating (no votes yet) [estimated by Bayesian average]
Your Rating
  • λ
  • λ
  • λ
Status Docs available [build log]
Last success reported on 2022-12-16 [all 1 reports]

Readme for nvim-hs-ghcid-2.0.1.0

[back to package description]

nvim-hs-ghcid

Ghcid integration plugin for nvim-hs.

This plugin fills the quickfix list with location of compiler errors and warnings. Warnings are only added to the quickfix list if no errors are present.

Disclaimer

I don't know if anyone uses this plugin, but I (saep) have not been using it for years. I usually compile it and test it shortly if it stops compiling on stackage, but that's about it. It can still be a useful template to write your own plugin as it is as complicated as it gets for a plugin.

If you want to have a development environment to program haskell in, try haskell-language-server which handles different compiler versions and has far more features.

Installation

You need stack for the automatic compilation and starting of the plugin to work.

Then add the plugin and its dependency to your neovim config file (Example uses vim-plug):

Plug 'neovimhaskell/nvim-hs.vim'
Plug 'saep/nvim-hs-ghcid'

Usage

:GhcidStart

To initialize a Ghcid session which will fill the quickfix list on errors/warnings. If you add a bang, it will not ask you for the configuration and uses the last saved configuration for the project or guesses a configuration.

:GhcidStop

Stop the Ghcid session for the project in which the current file resides.

:GhcidRestart

Same as :GhcidStop followed by :GhcidStart!.