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

Copyright(c) Sebastian Witte
LicenseApache-2.0
Maintainerwoozletoff@gmail.com
Stabilityexperimental
PortabilityGHC
Safe HaskellNone
LanguageHaskell2010

Neovim.Ghcid.Plugin

Description

 

Synopsis

Documentation

data ProjectSettings Source #

Simple data type containing a few information on how to start ghcid.

Constructors

ProjectSettings 

Fields

  • rootDir :: FilePath

    Project directory from which ghcid can be started successfully.

  • cmd :: String

    Command to start a ghci session (usually cabal repl or stack ghci).

Instances

Eq ProjectSettings Source # 
Ord ProjectSettings Source # 
Show ProjectSettings Source # 
Generic ProjectSettings Source # 
ToJSON ProjectSettings Source # 
FromJSON ProjectSettings Source # 
type Rep ProjectSettings Source # 
type Rep ProjectSettings = D1 * (MetaData "ProjectSettings" "Neovim.Ghcid.Plugin" "nvim-hs-ghcid-1.0.0.0-2SCjQ5t4f2H1mj84Wigpjx" False) (C1 * (MetaCons "ProjectSettings" PrefixI True) ((:*:) * (S1 * (MetaSel (Just Symbol "rootDir") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 * FilePath)) (S1 * (MetaSel (Just Symbol "cmd") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 * String))))

data GhcidEnv Source #

Constructors

GhcidEnv 

Fields

ghcidStart :: CommandArguments -> Neovim GhcidEnv () Source #

Start or update a ghcid session.

This will call determineProjectSettings and ask you to confirm or overwrite its proposed settings. If you prepend a bang, it acts as if you have confirmed all settings.

startOrReload :: ProjectSettings -> Neovim GhcidEnv () Source #

Start a new ghcid session or reload the modules to update the quickfix list.

ghcidStop :: CommandArguments -> Neovim GhcidEnv () Source #

Stop a ghcid session associated to the currently active buffer.

ghcidRestart :: CommandArguments -> Neovim GhcidEnv () Source #

Same as :GhcidStop followed by :GhcidStart!. Note the bang!

determineProjectSettings' :: FilePath -> IO (Maybe ProjectSettings) Source #

Determine project settings for a directory.

This will traverse through all parent directories and search for a hint on how to start the ghcid background process. The following configurations will be tried in this order:

  • A ghcid.yaml file which can be created with the GhcidStart command
  • A stack.yaml file
  • A cabal.sandbox.config file
  • A *.cabal file

Note that ghcidStart prompts for confirmation unless you prepend a bang. So, if you want to use your preferred settings, simply save them to the ghcid.yaml file and you're done.