yi-0.6.5.0: The Haskell-Scriptable Editor

Safe HaskellSafe-Infered

Yi.Modes

Synopsis

Documentation

type TokenBasedMode tok = Mode (Tree (Tok tok))Source

anyExtension :: [String] -> FilePath -> String -> BoolSource

When applied to an extensions list, creates a modeApplies function.

extensionOrContentsMatch :: [String] -> String -> FilePath -> String -> BoolSource

When applied to an extensions list and regular expression pattern, creates a modeApplies function.

linearSyntaxMode :: forall lexerState t. Show lexerState => lexerState -> ((AlexState lexerState, AlexInput) -> Maybe (Tok t, (AlexState lexerState, AlexInput))) -> (t -> StyleName) -> Mode (Tree (Tok t))Source

hookModes :: (AnyMode -> Bool) -> BufferM () -> [AnyMode] -> [AnyMode]Source

Adds a hook to all matching hooks in a list

applyModeHooks :: [(AnyMode -> Bool, BufferM ())] -> [AnyMode] -> [AnyMode]Source

Apply a list of mode hooks to a list of AnyModes

lookupMode :: AnyMode -> YiM AnyModeSource

Check whether a mode of the same name is already in modeTable and returns the original mode, if it isn't the case.