mirror of
https://github.com/xmonad/xmonad-contrib.git
synced 2025-05-19 11:30:22 -07:00
Improves haddock documentation
This commit is contained in:
parent
7245766c6d
commit
0af63a4767
@ -31,7 +31,7 @@ import XMonad.Prompt
|
|||||||
import XMonad.Util.Run
|
import XMonad.Util.Run
|
||||||
|
|
||||||
{- $description
|
{- $description
|
||||||
This module lets you combine and switch between different types of prompts (XMonad.Prompt). It includes a set of default modes:
|
This module lets you combine and switch between different types of prompts (`XMonad.Prompt.XPrompt`). It includes a set of default modes:
|
||||||
|
|
||||||
* Hoogle mode: Search for functions using hoogle, choosing a function leads you to documentation in Haddock.
|
* Hoogle mode: Search for functions using hoogle, choosing a function leads you to documentation in Haddock.
|
||||||
|
|
||||||
@ -63,7 +63,8 @@ extensionActions = M.fromList $ [
|
|||||||
|
|
||||||
To try it, restart xmonad. Press Ctrl + Your_Modkey + L and the first prompt should pop up.
|
To try it, restart xmonad. Press Ctrl + Your_Modkey + L and the first prompt should pop up.
|
||||||
|
|
||||||
You can change mode with xK_grave if you used defaultXP or change the value of changeModeKey in your XPConfig-}
|
If you used `defaultXPConfig`, you can change mode with xK_grave. If you are using your own `XPConfig`, define the value for `changeModeKey`.
|
||||||
|
-}
|
||||||
|
|
||||||
data LocateFileMode = LMode ExtensionActions
|
data LocateFileMode = LMode ExtensionActions
|
||||||
data LocateFileRegexMode = LRMode ExtensionActions
|
data LocateFileRegexMode = LRMode ExtensionActions
|
||||||
@ -107,7 +108,7 @@ instance XPrompt HoogleMode where
|
|||||||
modeAction (HMode pathToHoogleBin'' browser') query result = do
|
modeAction (HMode pathToHoogleBin'' browser') query result = do
|
||||||
completionsWithLink <- liftIO $ completionFunctionWith pathToHoogleBin'' ["--count","5","--link",query]
|
completionsWithLink <- liftIO $ completionFunctionWith pathToHoogleBin'' ["--count","5","--link",query]
|
||||||
let link = do
|
let link = do
|
||||||
s <- find (isJust . \c -> findSeqIndex c result) completionsWithLink
|
s <- find (isJust . \complStr -> findSeqIndex complStr result) completionsWithLink
|
||||||
i <- findSeqIndex s "http://"
|
i <- findSeqIndex s "http://"
|
||||||
return $ drop i s
|
return $ drop i s
|
||||||
case link of
|
case link of
|
||||||
|
@ -241,7 +241,7 @@ defaultXPConfig =
|
|||||||
, promptBorderWidth = 1
|
, promptBorderWidth = 1
|
||||||
, promptKeymap = defaultXPKeymap
|
, promptKeymap = defaultXPKeymap
|
||||||
, completionKey = xK_Tab
|
, completionKey = xK_Tab
|
||||||
, changeModeKey = xK_asciitilde
|
, changeModeKey = xK_grave
|
||||||
, position = Bottom
|
, position = Bottom
|
||||||
, height = 18
|
, height = 18
|
||||||
, historySize = 256
|
, historySize = 256
|
||||||
|
Loading…
x
Reference in New Issue
Block a user