yi-dynamic-configuration-0.19.1: Dynamic configuration support for Yi

Yi.Option

Description

Command-line options

Synopsis

# Types

An option is a function that attempts to change the configuration of the editor at runtime.

data YiOptions Source #

Custom options that should be accepted. Provided in user configuration.

The general flow is that the user adds options to his configuration. Options are essentially functions describing how to modify the configuration at runtime. When an option is called, it gets the current config and may modify it (to encode its value)

#### Instances

Instances details
 Source # Instance detailsDefined in Yi.Option Methods Source # Instance detailsDefined in Yi.Option

Constructors

 OptionError Text ExitCode

# Core

Lens for accessing the list of custom options.

You can pretty much create whatever types of options you want with this. But most cases are taken care of by one of the helper functions in this module.

Includes an extra option in the configuration. Small wrapper around yiCustomOptions

Like consYiOption but supports multiple options. Convenient for keymaps which might want to install lots of options.

# Argument-less options

An argument which sets some configuration value to True.

yiFlagOption :: Lens' Config a -> (a -> a) -> ArgDescr YiOption Source #

An argument which applies a function transforming some inner value of the configuration.

Flag that appends an action to the startup actions.

# Argument-taking options

Sets the value of an option which is any string type (hopefully text...)

This is not meant to be fully applied. By only passing in the lens you will obtain a value suitable for use in OptDescr.

Just like yiStringOption, except it applies a Just. Useful for setting string-like values whose default is None.

yiActionOption :: IsString a => (a -> Action) -> String -> ArgDescr YiOption Source #

Option that appends a parameterized action to the startup actions.