feat: implement conditional todo return based on global variable and git repo

This commit is contained in:
2024-11-05 05:53:34 -05:00
parent 2fc5ed51ff
commit bebd896c09
+8 -1
View File
@@ -148,7 +148,14 @@ M.tabnine = function()
end
M.todo = function()
return vim.bo.readonly == false
if func.check_global_var("usetodo", true, true) then
if vim.bo.readonly == false then
if func.dir_is_git_repo(vim.fn.expand("%:p:h")) then
return true
end
end
end
return false
end
--- TMux conditional options