MyNixOS website logo
Description

Neovim plugin that runs ghcid to update the quickfix list.

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.

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!.

Metadata

Version

2.0.1.0

License

Executables (1)

  • bin/nvim-hs-ghcid

Platforms (75)

    Darwin
    FreeBSD
    Genode
    GHCJS
    Linux
    MMIXware
    NetBSD
    none
    OpenBSD
    Redox
    Solaris
    WASI
    Windows
Show all
  • aarch64-darwin
  • aarch64-genode
  • aarch64-linux
  • aarch64-netbsd
  • aarch64-none
  • aarch64_be-none
  • arm-none
  • armv5tel-linux
  • armv6l-linux
  • armv6l-netbsd
  • armv6l-none
  • armv7a-darwin
  • armv7a-linux
  • armv7a-netbsd
  • armv7l-linux
  • armv7l-netbsd
  • avr-none
  • i686-cygwin
  • i686-darwin
  • i686-freebsd
  • i686-genode
  • i686-linux
  • i686-netbsd
  • i686-none
  • i686-openbsd
  • i686-windows
  • javascript-ghcjs
  • loongarch64-linux
  • m68k-linux
  • m68k-netbsd
  • m68k-none
  • microblaze-linux
  • microblaze-none
  • microblazeel-linux
  • microblazeel-none
  • mips-linux
  • mips-none
  • mips64-linux
  • mips64-none
  • mips64el-linux
  • mipsel-linux
  • mipsel-netbsd
  • mmix-mmixware
  • msp430-none
  • or1k-none
  • powerpc-netbsd
  • powerpc-none
  • powerpc64-linux
  • powerpc64le-linux
  • powerpcle-none
  • riscv32-linux
  • riscv32-netbsd
  • riscv32-none
  • riscv64-linux
  • riscv64-netbsd
  • riscv64-none
  • rx-none
  • s390-linux
  • s390-none
  • s390x-linux
  • s390x-none
  • vc4-none
  • wasm32-wasi
  • wasm64-wasi
  • x86_64-cygwin
  • x86_64-darwin
  • x86_64-freebsd
  • x86_64-genode
  • x86_64-linux
  • x86_64-netbsd
  • x86_64-none
  • x86_64-openbsd
  • x86_64-redox
  • x86_64-solaris
  • x86_64-windows