Change syntax highlighting
This commit is contained in:
parent
05f4343d40
commit
54e192aa8c
3 changed files with 8 additions and 4 deletions
|
|
@ -30,7 +30,10 @@ withSpace :: B.Widget n -> B.Widget n
|
|||
withSpace w = w B.<+> B.withDefAttr taskAttr (B.str " ")
|
||||
|
||||
renderCompletion :: Completion -> B.Widget n
|
||||
renderCompletion = B.withDefAttr taskCompletionAttr . B.str . formatCompletion
|
||||
renderCompletion Incomplete = B.str "-"
|
||||
renderCompletion (Complete Nothing) = B.str "x"
|
||||
renderCompletion (Complete (Just day)) =
|
||||
B.str "x" B.<+> B.withDefAttr taskCompletionAttr (B.str $ formatDate day)
|
||||
|
||||
renderPriority :: Priority -> B.Widget n
|
||||
renderPriority p =
|
||||
|
|
|
|||
|
|
@ -53,7 +53,7 @@ defaultTheme = B.newTheme VTY.defAttr
|
|||
, (B.listSelectedAttr, st' VTY.bold)
|
||||
, (B.listSelectedFocusedAttr, bg VTY.blue $ st' VTY.bold)
|
||||
, (taskAttr, none)
|
||||
, (taskCompletionAttr, none)
|
||||
, (taskCompletionAttr, fg' VTY.brightBlack)
|
||||
, (taskPriorityAttr, fg VTY.cyan $ st' VTY.bold)
|
||||
, (taskPriorityAttr <> "A", fg VTY.red $ st' VTY.bold)
|
||||
, (taskPriorityAttr <> "B", fg VTY.yellow $ st' VTY.bold)
|
||||
|
|
|
|||
5
todo.txt
5
todo.txt
|
|
@ -1,6 +1,6 @@
|
|||
- c2018-09-18 Offer to clean up file when loading (adding creation/completion dates)
|
||||
- c2018-09-18 Clean up file (adding creation/completion dates)
|
||||
- c2018-09-18 Purge - move completed tasks to a separate file
|
||||
- c2018-09-28 Move cursor to beginning of task description when editing tasks
|
||||
x2018-10-23 c2018-09-28 Move cursor to beginning of task description when editing tasks
|
||||
- c2018-09-28 Syntax highlighting while editing tasks
|
||||
x2018-10-23 c2018-09-30 Display "-empty-" when TaskList is empty
|
||||
x2018-09-27 c2018-09-18 Quit using Esc or q
|
||||
|
|
@ -9,3 +9,4 @@ x2018-09-30 c2018-09-18 Offer "retry" or "quit" +dialogue - couldn't load from t
|
|||
x2018-09-30 c2018-09-18 Offer "retry" or "quit" +dialogue - couldn't save to todo file
|
||||
x2018-09-30 c2018-09-18 Offer "retry" or "quit" +dialogue - syntax error in todo file
|
||||
x2018-09-30 c2018-09-30 Custom exception messages
|
||||
- c2018-10-23 Don't crash on parse errors etc.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue