diff --git a/README.md b/README.md index 041235f..dd47b12 100644 --- a/README.md +++ b/README.md @@ -43,6 +43,7 @@ Extra - [Neomutt](https://github.com/neomutt/neomutt)1 +- [Taskwarrior-tui](https://github.com/kdheepak/taskwarrior-tui)1

@@ -185,7 +186,8 @@ require('fm-nvim').setup{ ranger_cmd = "ranger", joshuto_cmd = "joshuto", lazygit_cmd = "lazygit", - neomutt_cmd = "neomutt" + neomutt_cmd = "neomutt", + taskwarrior_cmd = "taskwarrior-tui" }, -- Mappings used with the plugin @@ -223,6 +225,7 @@ Any of the following commands are fine... - `:Fzy` - `:Lf` - `:Fm` + - `:TaskWarriorTUI` but you can add a directory path w/ the command (doesn't work with `skim`, `fzy`, or `fzf`). diff --git a/lua/fm-nvim.lua b/lua/fm-nvim.lua index 1a7d064..4b5a183 100644 --- a/lua/fm-nvim.lua +++ b/lua/fm-nvim.lua @@ -38,7 +38,8 @@ local config = { ranger_cmd = "ranger", joshuto_cmd = "joshuto", lazygit_cmd = "lazygit", - neomutt_cmd = "neomutt" + neomutt_cmd = "neomutt", + taskwarrior_cmd = "taskwarrior-tui" }, mappings = { vert_split = "", @@ -281,5 +282,12 @@ function M.Neomutt() createSplit(config.cmds.neomutt_cmd, "") end end +function M.TaskWarriorTUI() + if config.ui.default == "float" then + createWin(config.cmds.taskwarrior_cmd, "") + elseif config.ui.default == "split" then + createSplit(config.cmds.taskwarrior_cmd, "") + end +end return M diff --git a/plugin/fm-nvim.lua b/plugin/fm-nvim.lua index 53d46c1..f278813 100644 --- a/plugin/fm-nvim.lua +++ b/plugin/fm-nvim.lua @@ -22,3 +22,7 @@ end if executable("neomutt") == 1 then vim.cmd [[ command! Neomutt :lua require('fm-nvim').Neomutt() ]] end + +if executable("taskwarrior-tui") == 1 then + vim.cmd [[ command! TaskWarriorTUI :lua require('fm-nvim').TaskWarriorTUI() ]] +end