Copyright | (c) Sebastian Witte |
---|---|
License | Apache-2.0 |
Maintainer | woozletoff@gmail.com |
Stability | experimental |
Portability | GHC |
Safe Haskell | Safe-Inferred |
Language | Haskell2010 |
Synopsis
- data ProjectSettings = ProjectSettings {}
- data GhcidEnv = GhcidEnv {
- startedSessions :: TVar (Map FilePath (Ghci, Neovim GhcidEnv ()))
- quickfixItems :: TVar [QuickfixListItem String]
- initGhcidEnv :: MonadIO m => m GhcidEnv
- modifyStartedSessions :: (Map FilePath (Ghci, Neovim GhcidEnv ()) -> Map FilePath (Ghci, Neovim GhcidEnv ())) -> Neovim GhcidEnv ()
- ghcidStart :: CommandArguments -> Neovim GhcidEnv ()
- startOrReload :: ProjectSettings -> Neovim GhcidEnv ()
- applyQuickfixActions :: [QuickfixListItem String] -> Neovim GhcidEnv ()
- placeSigns :: [QuickfixListItem String] -> Neovim env ()
- ghcidStop :: CommandArguments -> Neovim GhcidEnv ()
- ghcidRestart :: CommandArguments -> Neovim GhcidEnv ()
- loadToQuickfix :: [Load] -> [QuickfixListItem String]
- maybePluginConfig :: MonadIO io => Directory -> io (Maybe BuildTool)
- determineProjectSettings' :: FilePath -> IO (Maybe ProjectSettings)
Documentation
data ProjectSettings Source #
Simple data type containing a few information on how to start ghcid.
Instances
GhcidEnv | |
|
initGhcidEnv :: MonadIO m => m GhcidEnv Source #
modifyStartedSessions :: (Map FilePath (Ghci, Neovim GhcidEnv ()) -> Map FilePath (Ghci, Neovim GhcidEnv ())) -> Neovim GhcidEnv () Source #
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.
applyQuickfixActions :: [QuickfixListItem String] -> Neovim GhcidEnv () Source #
placeSigns :: [QuickfixListItem String] -> Neovim env () Source #
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!
loadToQuickfix :: [Load] -> [QuickfixListItem String] Source #
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 theGhcidStart
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.