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

Ribosome.Host.Data.Range

Description

Special command parameter that governs the range modifier.

Synopsis

Documentation

data RangeStyle Source #

Neovim offers different semantics for the command range (see :help :command-range).

This type determines the position (prefix line number/postfix count) and default values.

Constructors

RangeFile

Prefix line range, defaulting to the entire file (-range=%).

RangeLine (Maybe Nat)

Nothing: Prefix line range defaulting to the current line (-range). |Just N: Prefix count defaulting to N (-range=N).

RangeCount (Maybe Nat)

Just N: Prefix or postfix count defaulting to N (-count=N). |Nothing: Same as Just 0 (-count).

data Range (style :: RangeStyle) Source #

When this type is used as a parameter of a command handler function, the command is declared with the -range option, and when invoked, the argument passed to the handler contains the line range specified by the user, as in:

:5Reverse
:5,20Reverse

In the first case, the field $sel:high:Range is Nothing.

The type has a phantom parameter of kind RangeStyle that configures the semantics of the range, as defined by Neovim (see :help :command-range).

Constructors

Range 

Fields

Instances

Instances details
Show (Range style) Source # 
Instance details

Defined in Ribosome.Host.Data.Range

Methods

showsPrec :: Int -> Range style -> ShowS #

show :: Range style -> String #

showList :: [Range style] -> ShowS #

Eq (Range style) Source # 
Instance details

Defined in Ribosome.Host.Data.Range

Methods

(==) :: Range style -> Range style -> Bool #

(/=) :: Range style -> Range style -> Bool #

MsgpackDecode (Range style) Source # 
Instance details

Defined in Ribosome.Host.Data.Range

(BeforeRegular al (Range rs), RangeStyleOpt rs) => SpecialParam ('OptionState al c ac) (Range rs) Source # 
Instance details

Defined in Ribosome.Host.Handler.Command

Associated Types

type TransSpecial ('OptionState al c ac) (Range rs) :: OptionState Source #

type TransSpecial ('OptionState al c ac) (Range rs) Source # 
Instance details

Defined in Ribosome.Host.Handler.Command

type TransSpecial ('OptionState al c ac) (Range rs) = 'OptionState al c ac