| Safe Haskell | Safe-Inferred |
|---|---|
| Language | Haskell2010 |
Ribosome.Data.Mapping
Description
Data types for Neovim mappings
Synopsis
- newtype MappingLhs = MappingLhs {
- unMappingLhs :: Text
- newtype MappingId = MappingId {
- unMappingId :: Text
- data MapMode
- mapModePrefix :: MapMode -> Text
- mapModeSuffix :: MapMode -> Text
- mapModeShortName :: MapMode -> Text
- data MappingAction
- data MappingSpec = MappingSpec {
- lhs :: MappingLhs
- mode :: NonEmpty MapMode
- data Mapping = Mapping {}
Documentation
newtype MappingLhs Source #
The sequence of keys that triggers a mapping.
Constructors
| MappingLhs | |
Fields
| |
Instances
| IsString MappingLhs Source # | |
Defined in Ribosome.Data.Mapping Methods fromString :: String -> MappingLhs # | |
| Show MappingLhs Source # | |
Defined in Ribosome.Data.Mapping Methods showsPrec :: Int -> MappingLhs -> ShowS # show :: MappingLhs -> String # showList :: [MappingLhs] -> ShowS # | |
| Eq MappingLhs Source # | |
Defined in Ribosome.Data.Mapping | |
| Ord MappingLhs Source # | |
Defined in Ribosome.Data.Mapping Methods compare :: MappingLhs -> MappingLhs -> Ordering # (<) :: MappingLhs -> MappingLhs -> Bool # (<=) :: MappingLhs -> MappingLhs -> Bool # (>) :: MappingLhs -> MappingLhs -> Bool # (>=) :: MappingLhs -> MappingLhs -> Bool # max :: MappingLhs -> MappingLhs -> MappingLhs # min :: MappingLhs -> MappingLhs -> MappingLhs # | |
This ID type is intended to carry information about what buffer or other component triggered a mapping, if needed.
Constructors
| MappingId | |
Fields
| |
Instances
| IsString MappingId Source # | |
Defined in Ribosome.Data.Mapping Methods fromString :: String -> MappingId # | |
| Show MappingId Source # | |
| Eq MappingId Source # | |
| Ord MappingId Source # | |
| MsgpackDecode MappingId Source # | |
Defined in Ribosome.Data.Mapping | |
| MsgpackEncode MappingId Source # | |
Defined in Ribosome.Data.Mapping | |
All possible variants of Neovim's map commands, causing mappings to be registered for different modes.
Constructors
| MapDefault |
|
| MapNormal |
|
| MapInsertCmdline |
|
| MapInsert |
|
| MapCmdline |
|
| MapLangArg |
|
| MapVisual |
|
| MapSelect |
|
| MapVisualSelect |
|
| MapOperator |
|
Instances
| Enum MapMode Source # | |
| Show MapMode Source # | |
| Default MapMode Source # | |
Defined in Ribosome.Data.Mapping | |
| Eq MapMode Source # | |
| Ord MapMode Source # | |
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 |
| MappingEvent EventName | The event to publish when the mapping is triggered. |
Instances
| Show MappingAction Source # | |
Defined in Ribosome.Data.Mapping Methods showsPrec :: Int -> MappingAction -> ShowS # show :: MappingAction -> String # showList :: [MappingAction] -> ShowS # | |
| Eq MappingAction Source # | |
Defined in Ribosome.Data.Mapping Methods (==) :: MappingAction -> MappingAction -> Bool # (/=) :: MappingAction -> MappingAction -> Bool # | |
data MappingSpec Source #
The configuration for a mapping that is specific to Neovim.
Constructors
| MappingSpec | |
Fields
| |
Instances
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
| |
Instances
| Generic Mapping Source # | |
| Show Mapping Source # | |
| Eq Mapping Source # | |
| type Rep Mapping Source # | |
Defined in Ribosome.Data.Mapping type Rep Mapping = D1 ('MetaData "Mapping" "Ribosome.Data.Mapping" "ribosome-0.9.9.9-2kHabuyTX5NGSYChGwh5iS" 'False) (C1 ('MetaCons "Mapping" 'PrefixI 'True) ((S1 ('MetaSel ('Just "action") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 MappingAction) :*: S1 ('MetaSel ('Just "spec") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 MappingSpec)) :*: (S1 ('MetaSel ('Just "id") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe MappingId)) :*: S1 ('MetaSel ('Just "opts") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Map Text Object))))) | |