Copyright | (c) Sebastian Witte |
---|---|
License | Apache-2.0 |
Maintainer | woozletoff@gmail.com |
Stability | experimental |
Safe Haskell | None |
Language | Haskell2010 |
- logger :: String
- data CommandLineOptions = Opt {}
- optParser :: Parser CommandLineOptions
- opts :: ParserInfo CommandLineOptions
- neovim :: NeovimConfig -> IO ()
- type TransitionHandler a = [Async ()] -> Config RPCConfig -> IO a
- realMain :: TransitionHandler a -> Maybe (Params NeovimConfig) -> NeovimConfig -> IO ()
- runPluginProvider :: CommandLineOptions -> Maybe NeovimConfig -> TransitionHandler a -> Maybe (Params NeovimConfig) -> IO a
- finishDyre :: TransitionHandler ()
Documentation
data CommandLineOptions Source #
neovim :: NeovimConfig -> IO () Source #
This is essentially the main function for nvim-hs, at least if you want to use Config.Dyre for the configuration.
type TransitionHandler a = [Async ()] -> Config RPCConfig -> IO a Source #
A TransitionHandler
function receives the ThreadId
s of all running
threads which have been started by the plugin provider as well as the
Config
with the custom field set to RPCConfig
. These information
can be used to properly clean up a session and then do something else.
The transition handler is first called after the plugin provider has started.
realMain :: TransitionHandler a -> Maybe (Params NeovimConfig) -> NeovimConfig -> IO () Source #
This main functions can be used to create a custom executable without using the Config.Dyre library while still using the nvim-hs specific configuration facilities.
:: CommandLineOptions | See nvim-hs executables --help function or |
-> Maybe NeovimConfig | |
-> TransitionHandler a | |
-> Maybe (Params NeovimConfig) | |
-> IO a |
Generic main function. Most arguments are optional or have sane defaults.
finishDyre :: TransitionHandler () Source #
If the plugin provider is started with dyre, this handler is used to handle a restart.