License | GPL-2 |
---|---|
Maintainer | yi-devel@googlegroups.com |
Stability | experimental |
Portability | portable |
Safe Haskell | None |
Language | Haskell2010 |
Extensions |
|
This module is the host of the most prevalent types throughout Yi. It is unfortunately a necessary evil to avoid use of bootfiles.
You're encouraged to import from more idiomatic modules which will re-export these where appropriate.
- data Action
- emptyAction :: Action
- class (Default a, Binary a, Typeable a) => YiVariable a
- class (Default a, Typeable a) => YiConfigVariable a
- type Interact ev a = I ev Action a
- type KeymapM a = Interact Event a
- type Keymap = KeymapM ()
- type KeymapEndo = Keymap -> Keymap
- type KeymapProcess = P Event Action
- data IsRefreshNeeded
- data Yi = Yi {}
- data YiVar = YiVar {}
- newtype YiM a = YiM {}
- unsafeWithEditor :: Config -> MVar YiVar -> EditorM a -> IO a
- data KeymapSet = KeymapSet {}
- extractTopKeymap :: KeymapSet -> Keymap
- newtype BufferM a = BufferM {
- fromBufferM :: RWS Window [Update] FBuffer a
- data IndentSettings = IndentSettings {
- expandTabs :: Bool
- tabSize :: Int
- shiftWidth :: Int
- data FBuffer = FBuffer {
- bmode :: !(Mode syntax)
- rawbuf :: !(BufferImpl syntax)
- attributes :: !Attributes
- type WinMarks = MarkSet Mark
- data MarkSet a = MarkSet {}
- data Attributes = Attributes {
- ident :: !BufferId
- bkey__ :: !BufferRef
- undos :: !URList
- bufferDynamic :: !DynamicState
- preferCol :: !(Maybe Int)
- preferVisCol :: !(Maybe Int)
- stickyEol :: !Bool
- pendingUpdates :: ![UIUpdate]
- selectionStyle :: !SelectionStyle
- keymapProcess :: !KeymapProcess
- winMarks :: !(Map WindowRef WinMarks)
- lastActiveWindow :: !Window
- lastSyncTime :: !UTCTime
- readOnly :: !Bool
- inserting :: !Bool
- directoryContent :: !Bool
- pointFollowsWindow :: !(WindowRef -> Bool)
- updateTransactionInFlight :: !Bool
- updateTransactionAccum :: ![Update]
- fontsizeVariation :: !Int
- encodingConverterName :: Maybe ConverterName
- data BufferId
- data SelectionStyle = SelectionStyle {}
- data AnyMode = AnyMode (Mode syntax)
- data Mode syntax = Mode {
- modeName :: Text
- modeApplies :: FilePath -> YiString -> Bool
- modeHL :: ExtHL syntax
- modePrettify :: syntax -> BufferM ()
- modeKeymap :: KeymapSet -> KeymapSet
- modeIndent :: syntax -> IndentBehaviour -> BufferM ()
- modeAdjustBlock :: syntax -> Int -> BufferM ()
- modeFollow :: syntax -> Action
- modeIndentSettings :: IndentSettings
- modeToggleCommentSelection :: Maybe (BufferM ())
- modeGetStrokes :: syntax -> Point -> Point -> Point -> [Stroke]
- modeOnLoad :: BufferM ()
- modeModeLine :: [Text] -> BufferM Text
- modeGotoDeclaration :: BufferM ()
- data IndentBehaviour
- type Status = ([Text], StyleName)
- type Statuses = DelayList Status
- data Editor = Editor {
- bufferStack :: !(NonEmpty BufferRef)
- buffers :: !(Map BufferRef FBuffer)
- refSupply :: !Int
- tabs_ :: !(PointedList Tab)
- dynamic :: !DynamicState
- statusLines :: !Statuses
- maxStatusHeight :: !Int
- killring :: !Killring
- currentRegex :: !(Maybe SearchExp)
- searchDirection :: !Direction
- pendingEvents :: ![Event]
- onCloseActions :: !(Map BufferRef (EditorM ()))
- newtype EditorM a = EditorM {
- fromEditorM :: ReaderT Config (State Editor) a
- class (Monad m, MonadState Editor m) => MonadEditor m where
- runEditor :: Config -> EditorM a -> Editor -> (Editor, a)
- data UIConfig = UIConfig {
- configFontName :: Maybe String
- configFontSize :: Maybe Int
- configScrollStyle :: Maybe ScrollStyle
- configScrollWheelAmount :: Int
- configLeftSideScrollBar :: Bool
- configAutoHideScrollBar :: Bool
- configAutoHideTabBar :: Bool
- configLineWrap :: Bool
- configCursorStyle :: CursorStyle
- configWindowFill :: Char
- configTheme :: Theme
- type UIBoot = Config -> ([Event] -> IO ()) -> ([Action] -> IO ()) -> Editor -> IO (UI Editor)
- data CursorStyle
- data Config = Config {
- startFrontEnd :: UIBoot
- configUI :: UIConfig
- startActions :: [Action]
- initialActions :: [Action]
- defaultKm :: KeymapSet
- configInputPreprocess :: P Event Event
- modeTable :: [AnyMode]
- debugMode :: Bool
- configRegionStyle :: RegionStyle
- configKillringAccumulate :: Bool
- configCheckExternalChangesObsessively :: Bool
- bufferUpdateHandler :: [[Update] -> BufferM ()]
- layoutManagers :: [AnyLayoutManager]
- configVars :: DynamicState
- data RegionStyle
Documentation
emptyAction :: Action Source #
class (Default a, Typeable a) => YiConfigVariable a Source #
type KeymapEndo = Keymap -> Keymap Source #
data IsRefreshNeeded Source #
The type of user-bindable functions TODO: doc how these are actually user-bindable are they?
KeymapSet | |
|
extractTopKeymap :: KeymapSet -> Keymap Source #
The BufferM monad writes the updates performed.
data IndentSettings Source #
Currently duplicates some of Vim's indent settings. Allowing a buffer to specify settings that are more dynamic, perhaps via closures, could be useful.
IndentSettings | |
|
FBuffer | |
|
data Attributes Source #
Attributes | |
|
data SelectionStyle Source #
A Mode customizes the Yi interface for editing a particular data format. It specifies when the mode should be used and controls file-specific syntax highlighting and command input, among other things.
Mode | |
|
data IndentBehaviour Source #
Used to specify the behaviour of the automatic indent command.
IncreaseCycle | Increase the indentation to the next higher indentation hint. If we are currently at the highest level of indentation then cycle back to the lowest. |
DecreaseCycle | Decrease the indentation to the next smaller indentation hint. If we are currently at the smallest level then cycle back to the largest |
IncreaseOnly | Increase the indentation to the next higher hint if no such hint exists do nothing. |
DecreaseOnly | Decrease the indentation to the next smaller indentation hint, if no such hint exists do nothing. |
The Editor state
Editor | |
|
class (Monad m, MonadState Editor m) => MonadEditor m where Source #
withEditor :: EditorM a -> m a Source #
withEditor_ :: EditorM a -> m () Source #
UIConfig | |
|
type UIBoot = Config -> ([Event] -> IO ()) -> ([Action] -> IO ()) -> Editor -> IO (UI Editor) Source #
data CursorStyle Source #
When should we use a "fat" cursor (i.e. 2 pixels wide, rather than 1)? Fat cursors have only been implemented for the Pango frontend.
Configuration record. All Yi hooks can be set here.
Config | |
|