nvim-hs-0.2.5: Haskell plugin backend for neovim

Neovim.API.TH

Description

Synopsis

# Documentation

generateAPI :: Map String (Q Type) -> Q [Dec] Source #

Generate the API types and functions provided by nvim --api-info.

The provided map allows the use of different Haskell types for the types defined in the API. The types must be an instance of NvimObject and they must form an isomorphism with the sent messages types. Currently, it provides a Convenient way to replace the String type with Text, ByteString or String.

Define an exported function by providing a custom name and referencing the function you want to export.

Example:  $(function "MyExportedFunction" 'myDefinedFunction) Sync  Define an exported function. This function works exactly like function, but it generates the exported name automatically by converting the first letter to upper case. Similarly to function, this function is used to export a command with a custom name. Note that commands must start with an upper case letter. Due to limitations on the side of (neo)vim, commands can only have one of the following five signatures, where you can replace String with ByteString or Text if you wish: • CommandArguments -> Neovim r st () • CommandArguments -> Maybe String -> Neovim r st () • CommandArguments -> String -> Neovim r st () • CommandArguments -> [String] -> Neovim r st () • CommandArguments -> String -> [String] -> Neovim r st () Example: $(command "RememberThePrime" 'someFunction) [CmdBang]
Define an exported command. This function works exactly like command, but it generates the command name by converting the first letter to upper case.