nvim-hs-2.3.2.1: Haskell plugin backend for neovim
Copyright(c) Sebastian Witte
LicenseApache-2.0
Maintainerwoozletoff@gmail.com
Stabilityexperimental
PortabilityGHC
Safe HaskellSafe-Inferred
LanguageHaskell2010

Neovim.Plugin

Description

 
Synopsis

Documentation

wrapPlugin :: Applicative m => Plugin env -> m NeovimPlugin Source #

Wrap a Plugin in some nice blankets, so that we can put them in a simple list.

data NeovimPlugin Source #

Plugin values are wraped inside this data type via wrapPlugin so that we can put plugins in an ordinary list.

data Plugin env Source #

This data type contains meta information for the plugin manager.

Constructors

Plugin 

Fields

data Synchronous Source #

This option detemines how neovim should behave when calling some functionality on a remote host.

Constructors

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. This means that the GUI will (probably) not allow any user input until a reult is received.

Instances

Instances details
IsString Synchronous Source # 
Instance details

Defined in Neovim.Plugin.Classes

Enum Synchronous Source # 
Instance details

Defined in Neovim.Plugin.Classes

Generic Synchronous Source # 
Instance details

Defined in Neovim.Plugin.Classes

Associated Types

type Rep Synchronous :: Type -> Type #

Read Synchronous Source # 
Instance details

Defined in Neovim.Plugin.Classes

Show Synchronous Source # 
Instance details

Defined in Neovim.Plugin.Classes

NFData Synchronous Source # 
Instance details

Defined in Neovim.Plugin.Classes

Methods

rnf :: Synchronous -> () #

Eq Synchronous Source # 
Instance details

Defined in Neovim.Plugin.Classes

Ord Synchronous Source # 
Instance details

Defined in Neovim.Plugin.Classes

NvimObject Synchronous Source # 
Instance details

Defined in Neovim.Plugin.Classes

Pretty Synchronous Source # 
Instance details

Defined in Neovim.Plugin.Classes

Methods

pretty :: Synchronous -> Doc ann #

prettyList :: [Synchronous] -> Doc ann #

type Rep Synchronous Source # 
Instance details

Defined in Neovim.Plugin.Classes

type Rep Synchronous = D1 ('MetaData "Synchronous" "Neovim.Plugin.Classes" "nvim-hs-2.3.2.1-Dn9vtyvzlIoLeTTi8kgU1Z" 'False) (C1 ('MetaCons "Async" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "Sync" 'PrefixI 'False) (U1 :: Type -> Type))

data CommandOption Source #

Options for commands.

Some command can also be described by using the OverloadedString extensions. This means that you can write a literal String inside your source file in place for a CommandOption value. See the documentation for each value on how these strings should look like (Both versions are compile time checked.)

Constructors

CmdSync Synchronous

Stringliteral "sync" or "async"

CmdRegister

Register passed to the command.

Stringliteral: "\""

CmdNargs String

Command takes a specific amount of arguments

Automatically set via template haskell functions. You really shouldn't use this option yourself unless you have to.

CmdRange RangeSpecification

Determines how neovim passes the range.

Stringliterals: "%" for WholeFile, "," for line and ",123" for 123 lines.

CmdCount Word

Command handles a count. The argument defines the default count.

Stringliteral: string of numbers (e.g. "132")

CmdBang

Command handles a bang

Stringliteral: "!"

CmdComplete String

Verbatim string passed to the -complete= command attribute

Instances

Instances details
IsString CommandOption Source # 
Instance details

Defined in Neovim.Plugin.Classes

Generic CommandOption Source # 
Instance details

Defined in Neovim.Plugin.Classes

Associated Types

type Rep CommandOption :: Type -> Type #

Read CommandOption Source # 
Instance details

Defined in Neovim.Plugin.Classes

Show CommandOption Source # 
Instance details

Defined in Neovim.Plugin.Classes

NFData CommandOption Source # 
Instance details

Defined in Neovim.Plugin.Classes

Methods

rnf :: CommandOption -> () #

Eq CommandOption Source # 
Instance details

Defined in Neovim.Plugin.Classes

Ord CommandOption Source # 
Instance details

Defined in Neovim.Plugin.Classes

Pretty CommandOption Source # 
Instance details

Defined in Neovim.Plugin.Classes

Methods

pretty :: CommandOption -> Doc ann #

prettyList :: [CommandOption] -> Doc ann #

type Rep CommandOption Source # 
Instance details

Defined in Neovim.Plugin.Classes

addAutocmd Source #

Arguments

:: Text

The event to register to (e.g. BufWritePost)

-> Synchronous 
-> AutocmdOptions 
-> Neovim env ()

Fully applied function to register

-> Neovim env (Either (Doc AnsiStyle) FunctionMapEntry)

A ReleaseKey if the registration worked

Register an autocmd in the current context. This means that, if you are currently in a stateful plugin, the function will be called in the current thread and has access to the configuration and state of this thread. .

Note that the function you pass must be fully applied.

getProviderName :: Neovim env (Either String Int) Source #

Return or retrive the provider name that the current instance is associated with on the neovim side.