Skip to content

Commit

Permalink
Merge pull request #29 from amiroslaw/taskwarrior-tui
Browse files Browse the repository at this point in the history
feat: Taskwarrior-tui support
  • Loading branch information
is0n committed Oct 11, 2022
2 parents e5df86a + c5c25f3 commit 8e6a770
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 2 deletions.
5 changes: 4 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@
<summary>Extra</summary>

- [Neomutt](https://github.com/neomutt/neomutt)<sup>1</sup>
- [Taskwarrior-tui](https://github.com/kdheepak/taskwarrior-tui)<sup>1</sup>

</details>
</p>
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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`).

Expand Down
10 changes: 9 additions & 1 deletion lua/fm-nvim.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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 = "<C-v>",
Expand Down Expand Up @@ -281,5 +282,12 @@ function M.Neomutt()
createSplit(config.cmds.neomutt_cmd, "<CR>")
end
end
function M.TaskWarriorTUI()
if config.ui.default == "float" then
createWin(config.cmds.taskwarrior_cmd, "<CR>")
elseif config.ui.default == "split" then
createSplit(config.cmds.taskwarrior_cmd, "<CR>")
end
end

return M
4 changes: 4 additions & 0 deletions plugin/fm-nvim.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit 8e6a770

Please sign in to comment.