Skip to content

Commit

Permalink
created doxygen comments for the todo_ops
Browse files Browse the repository at this point in the history
  • Loading branch information
teju85 committed Oct 27, 2020
1 parent 8cf43e7 commit 2020bc0
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 1 deletion.
1 change: 1 addition & 0 deletions docs/tutorials.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,3 +31,4 @@ Given below are the groups of extensions that are currently supported:
2. @ref dir_ops
3. @ref grep_ops
4. @ref ledger_ops
5. @ref todo_ops
2 changes: 1 addition & 1 deletion src/extensions/ledger/ops.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ Buffer& getLedgerShowBuff(Editor& ed) {
* @page ledger_ops
* @section ledger-open
* Opens the ledger file in a new Buffer, if not already done, and switches to
* it. Location of this file can be configured with the Option `ledger::file`.
* it. Location of this file can be configured with the Option `ledger:file`.
*
* @note Available since v1.3.0
*/
Expand Down
23 changes: 23 additions & 0 deletions src/extensions/todo/ops.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,13 @@ namespace teditor {
namespace todo {
namespace ops {

/**
* @page todo_ops Operations supported under todo-mode
* All operations supported under `todo-mode`.
*
* @tableofcontents
*/

Buffer& getTodoShowBuff(Editor& ed) {
bool newOne;
auto& buf = ed.getBuff("*todo", true, newOne);
Expand All @@ -18,6 +25,14 @@ Buffer& getTodoShowBuff(Editor& ed) {
return buf;
}

/**
* @page todo_ops
* @section todo-open
* Open the todo file in a new Buffer, if not already done, and switch to it.
* The location of this file can be configured with the Option `todo:file`.
*
* @note Available since v1.8.0.
*/
DEF_CMD(
TodoOpen, "todo-open", DEF_OP() {
auto todoFile = Option::get("todo:file").getStr();
Expand Down Expand Up @@ -45,6 +60,14 @@ void showTodosFor(Buffer& buf, const TimePoint& start, const TimePoint& end) {
buf.insert(ss.str());
}

/**
* @page todo_ops
* @section todo-show-this-week
* Show all todo's to be done in the current week. Current week starts from
* Sunday.
*
* @note Available since v1.8.0.
*/
DEF_CMD(
TodoShowThisWeek, "todo-show-this-week", DEF_OP() {
auto& buf = getTodoShowBuff(ed);
Expand Down

0 comments on commit 2020bc0

Please sign in to comment.