Copyright | (c) Sebastian Witte |
---|---|
License | Apache-2.0 |
Maintainer | woozletoff@gmail.com |
Stability | experimental |
Portability | GHC |
Safe Haskell | None |
Language | Haskell2010 |
- newtype ExportedFunctionality r st = EF (FunctionalityDescription, [Object] -> Neovim r st Object)
- getFunction :: ExportedFunctionality r st -> [Object] -> Neovim r st Object
- getDescription :: ExportedFunctionality r st -> FunctionalityDescription
- data FunctionalityDescription
- = Function Text Synchronous
- | Command Text CommandOptions
- | Autocmd Text Text AutocmdOptions
- class FunctionName a where
- name :: a -> Text
- data NeovimPlugin = forall r st . NeovimPlugin (Plugin r st)
- data Plugin r st = Plugin {
- exports :: [ExportedFunctionality () ()]
- statefulExports :: [(r, st, [ExportedFunctionality r st])]
- wrapPlugin :: Monad m => Plugin r st -> m NeovimPlugin
- data Synchronous
- data CommandOptions = CommandOptions {}
- data AutocmdOptions = AutocmdOptions {
- acmdSync :: Synchronous
- acmdPattern :: Text
- acmdNested :: Bool
Documentation
newtype ExportedFunctionality r st Source
This data type is used in the plugin registration to properly register the functions.
EF (FunctionalityDescription, [Object] -> Neovim r st Object) |
getFunction :: ExportedFunctionality r st -> [Object] -> Neovim r st Object Source
Extract the function of an ExportedFunctionality
.
getDescription :: ExportedFunctionality r st -> FunctionalityDescription Source
Extract the description of an ExportedFunctionality
.
data FunctionalityDescription Source
Functionality specific functional description entries.
All fields which are directly specified in these constructors are not
optional, but can partialy be generated via the Template Haskell functions.
The last field is a data type that contains all relevant options with
sensible defaults, hence def
can be used as an argument.
Function Text Synchronous | Exported function. Callable via
|
Command Text CommandOptions | Exported Command. Callable via
|
Autocmd Text Text AutocmdOptions | Exported autocommand. Will call the given function if the type and filter match. NB: Since we are registering this on the Haskell side of things, the number of accepted arguments should be 0. TODO Should this be enforced somehow? Possibly via the TH generator.
|
class FunctionName a where Source
Conveniennce class to extract a name from some value.
data NeovimPlugin Source
forall r st . NeovimPlugin (Plugin r st) |
This data type contains meta information for the plugin manager.
Plugin | |
|
wrapPlugin :: Monad m => Plugin r st -> m NeovimPlugin Source
Wrap a Plugin
in some nice blankets, so that we can put them in a simple
list.
data Synchronous Source
This option detemines how neovim should behave when calling some functionality on a remote host.
Async | Call the functionality entirely for its side effects and do not wait for it to finish. Calling a functionality with this flag set is completely asynchronous and nothing is really expected to happen. This is why a call like this is called notification on the neovim side of things. |
Sync | Call the function and wait for its result. This is only synchronous on the neovim side. For comands it means that the GUI will (probably) not allow any user input until a reult is received. Functions run asynchronously inside neovim (or in one of its plugin providers) can use these functions concurrently. |
data CommandOptions Source
Options that can be optionally set for commands.
TODO Determine which of these make sense, how they are transmitted back and which options are still missing. (see remoteCommandOnHost in runtime/autoload/remote/define.vim))
CommandOptions | |
|
data AutocmdOptions Source
AutocmdOptions | |
|