Copyright | (c) Sebastian Witte |
---|---|
License | Apache-2.0 |
Maintainer | woozletoff@gmail.com |
Stability | experimental |
Portability | GHC |
Safe Haskell | None |
Language | Haskell2010 |
- debug :: r -> st -> Neovim r st a -> IO (Either String (a, st))
- debug' :: Neovim' a -> IO (Either String a)
- develMain :: Maybe NeovimConfig -> IO (Either String ([ThreadId], Config RPCConfig ()))
- quitDevelMain :: Config r st -> IO ()
- restartDevelMain :: Config RPCConfig () -> Maybe NeovimConfig -> IO (Either String ([ThreadId], Config RPCConfig ()))
- runNeovim :: Config r st -> st -> Neovim r st a -> IO (Either String (a, st))
- runNeovim' :: Config r st -> Neovim' a -> IO (Either String a)
- module Neovim
Documentation
debug :: r -> st -> Neovim r st a -> IO (Either String (a, st)) Source
Run a Neovim
function.
This function connects to the socket pointed to by the environment variable
$NVIM_LISTEN_ADDRESS
and executes the command. It does not register itself
as a real plugin provider, you can simply call neovim-functions from the
module Neovim.API.String this way.
Tip: If you run a terminal inside a neovim instance, then this variable is automatically set.
develMain :: Maybe NeovimConfig -> IO (Either String ([ThreadId], Config RPCConfig ())) Source
This function is intended to be run _once_ in a ghci session that to give a REPL based workflow when developing a plugin.
Note that the dyre-based reload mechanisms, i.e. the Neovim.Plugin.ConfigHelper plugin, is not started this way.
To use this in ghci, you simply bind the results to some variables. After each reload of ghci, you have to rebind those variables.
Example:
λRight
(tids, cfg) <-develMain
Nothing
λrunNeovim'
cfg $ vim_call_function "getqflist" []Right
(Right
(ObjectArray
[])) λ :r λRight
(tids, cfg) <-develMain
Nothing
quitDevelMain :: Config r st -> IO () Source
Quit a previously started plugin provider.
restartDevelMain :: Config RPCConfig () -> Maybe NeovimConfig -> IO (Either String ([ThreadId], Config RPCConfig ())) Source
Restart the development plugin provider.
runNeovim :: Config r st -> st -> Neovim r st a -> IO (Either String (a, st)) Source
Initialize a Neovim
context by supplying an InternalEnvironment
.
runNeovim' :: Config r st -> Neovim' a -> IO (Either String a) Source
Convenience function to run a stateless Neovim
function.
module Neovim