ribosome-0.9.9.9: Neovim plugin framework for Polysemy
Safe HaskellSafe-Inferred
LanguageHaskell2010

Ribosome.Data.Mapping

Description

Data types for Neovim mappings

Synopsis

Documentation

newtype MappingLhs Source #

The sequence of keys that triggers a mapping.

Constructors

MappingLhs 

Fields

newtype MappingId Source #

This ID type is intended to carry information about what buffer or other component triggered a mapping, if needed.

Constructors

MappingId 

Fields

data MapMode Source #

All possible variants of Neovim's map commands, causing mappings to be registered for different modes.

Constructors

MapDefault

:map – normal, visual, select and operator-pending

MapNormal

:nmap – normal

MapInsertCmdline

:map! – insert and cmdline

MapInsert

:imap – insert

MapCmdline

:cmap – cmdline

MapLangArg

:lmap – insert, cmdline, lang-arg

MapVisual

:xmap – visual

MapSelect

:smap – select

MapVisualSelect

:vmap – visual and select

MapOperator

:omap – operator-pending

Instances

Instances details
Enum MapMode Source # 
Instance details

Defined in Ribosome.Data.Mapping

Show MapMode Source # 
Instance details

Defined in Ribosome.Data.Mapping

Default MapMode Source # 
Instance details

Defined in Ribosome.Data.Mapping

Methods

def :: MapMode #

Eq MapMode Source # 
Instance details

Defined in Ribosome.Data.Mapping

Methods

(==) :: MapMode -> MapMode -> Bool #

(/=) :: MapMode -> MapMode -> Bool #

Ord MapMode Source # 
Instance details

Defined in Ribosome.Data.Mapping

mapModePrefix :: MapMode -> Text Source #

The character representing a map mode prefixing a map command.

mapModeSuffix :: MapMode -> Text Source #

The bang suffixing the insert+cmdline map cmd.

mapModeShortName :: MapMode -> Text Source #

The character representing a map mode when passing it to an api function.

data MappingAction Source #

The action that should be performed when a mapping is triggered.

Constructors

MappingCall RpcName

The name of the RpcHandler that should be called when the mapping is triggered.

MappingEvent EventName

The event to publish when the mapping is triggered.

Instances

Instances details
Show MappingAction Source # 
Instance details

Defined in Ribosome.Data.Mapping

Eq MappingAction Source # 
Instance details

Defined in Ribosome.Data.Mapping

data MappingSpec Source #

The configuration for a mapping that is specific to Neovim.

Constructors

MappingSpec 

Fields

Instances

Instances details
IsString MappingSpec Source # 
Instance details

Defined in Ribosome.Data.Mapping

Generic MappingSpec Source # 
Instance details

Defined in Ribosome.Data.Mapping

Associated Types

type Rep MappingSpec :: Type -> Type #

Show MappingSpec Source # 
Instance details

Defined in Ribosome.Data.Mapping

Eq MappingSpec Source # 
Instance details

Defined in Ribosome.Data.Mapping

Ord MappingSpec Source # 
Instance details

Defined in Ribosome.Data.Mapping

type Rep MappingSpec Source # 
Instance details

Defined in Ribosome.Data.Mapping

type Rep MappingSpec = D1 ('MetaData "MappingSpec" "Ribosome.Data.Mapping" "ribosome-0.9.9.9-9qviHqnn5IlBIAvGWfH18d" 'False) (C1 ('MetaCons "MappingSpec" 'PrefixI 'True) (S1 ('MetaSel ('Just "lhs") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 MappingLhs) :*: S1 ('MetaSel ('Just "mode") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (NonEmpty MapMode))))

data Mapping Source #

This type associates a sequence of keys and a mode for a Neovim mapping with an RPC handler or event. It is intended to be used with mappingFor or eventMapping and activateBufferMapping.

Constructors

Mapping 

Fields

  • action :: MappingAction

    The action to take when the mapping is triggered.

  • spec :: MappingSpec

    The Neovim related configuration for the mapping, i.e. its key sequence and modes.

  • id :: Maybe MappingId

    An optional string identifying the source of the mapping, for example when adding it to multiple buffers.

  • opts :: Map Text Object

    Options like remap, nowait or desc.

Instances

Instances details
Generic Mapping Source # 
Instance details

Defined in Ribosome.Data.Mapping

Associated Types

type Rep Mapping :: Type -> Type #

Methods

from :: Mapping -> Rep Mapping x #

to :: Rep Mapping x -> Mapping #

Show Mapping Source # 
Instance details

Defined in Ribosome.Data.Mapping

Eq Mapping Source # 
Instance details

Defined in Ribosome.Data.Mapping

Methods

(==) :: Mapping -> Mapping -> Bool #

(/=) :: Mapping -> Mapping -> Bool #

type Rep Mapping Source # 
Instance details

Defined in Ribosome.Data.Mapping