-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
NeoVim: Wire in own cli tool, basic functionalities
- Add - List
- Loading branch information
1 parent
d06789a
commit 0471f4d
Showing
3 changed files
with
25 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,9 @@ | ||
local worktree = require "ducktordanny.custom.worktree" | ||
local td = require "ducktordanny.custom.td" | ||
|
||
vim.keymap.set("n", "<leader>si", worktree.select_worktree_dropdown, { desc = "Select work tree" }) | ||
vim.keymap.set("n", "<leader>td", function() | ||
td.add_local_todo "alma" | ||
end) | ||
vim.api.nvim_create_user_command("TdAdd", td.add_local_todo, {}) | ||
vim.api.nvim_create_user_command("TdListUnresolved", td.show_unresolved_todos, {}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
local M = {} | ||
|
||
M.add_local_todo = function(command) | ||
if command.args ~= nil and command.args ~= "" then | ||
vim.fn.system("td -a -c " .. command.args) | ||
print "Done." | ||
else | ||
vim.health.report_error "Missing arguments content for TODO." | ||
end | ||
end | ||
|
||
M.show_unresolved_todos = function() | ||
vim.cmd ":!td -ls-urs" | ||
end | ||
|
||
return M |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,6 @@ | ||
return { | ||
"ducktordanny/jest.nvim", | ||
config = function() | ||
vim.keymap.set("n", "<leader>jf", "<cmd>JestFile<cr>", { desc = "Run this test file with Jest" }) | ||
end, | ||
} |