Skip to content

Commit

Permalink
feat: fixed titles
Browse files Browse the repository at this point in the history
  • Loading branch information
max397574 committed Apr 1, 2022
1 parent 2b40563 commit a44d785
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 13 deletions.
1 change: 1 addition & 0 deletions lua/neorg/telescope_utils.lua
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ utils.pick_project_tasks = function(project)
pickers.new(opts, {
prompt_title = "Pick Project Tasks: " .. project.content,
results_title = "Tasks",
preview_title = "Task details",
finder = finders.new_table({
results = tasks,
entry_maker = function(entry)
Expand Down
4 changes: 3 additions & 1 deletion lua/telescope/_extensions/neorg/find_aof_project_tasks.lua
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,8 @@ local function pick_projects(aof)

pickers.new(opts, {
prompt_title = "Pick Neorg Gtd Projects",
results_title = "Projects from ",
results_title = "Projects from " .. aof,
preview_title = "Tasks inside project",
finder = finders.new_table({
results = projects_by_aof[aof],
entry_maker = function(entry)
Expand Down Expand Up @@ -131,6 +132,7 @@ return function(opts)
pickers.new(opts, {
prompt_title = "Pick Area Of Focus",
results_title = "AOFs",
preview_title = "Projects inside AOF",
finder = finders.new_table({
results = get_aofs(),
entry_maker = function(entry)
Expand Down
12 changes: 2 additions & 10 deletions lua/telescope/_extensions/neorg/find_aof_tasks.lua
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ local function pick_aof_tasks(aof)
pickers.new(opts, {
prompt_title = "Pick AOF Tasks: " .. aof,
results_title = "Tasks",
preview_title = "Task Details",
finder = finders.new_table({
results = tasks,
entry_maker = function(entry)
Expand Down Expand Up @@ -137,22 +138,13 @@ local function pick_aof_tasks(aof)
}):find()
end

local function get_project_list(aof)
local aof_projects = get_aof_projects()
local projects = aof_projects[aof]
local project_names = {}
for _, project in ipairs(projects) do
table.insert(project_names, project.content)
end
return project_names
end

return function(opts)
opts = opts or {}

pickers.new(opts, {
prompt_title = "Pick Area Of Focus",
results_title = "AOFs",
preview_title = "Tasks inside AOF",
finder = finders.new_table({
results = vim.tbl_keys(get_aof_projects()),
entry_maker = function(entry)
Expand Down
4 changes: 2 additions & 2 deletions lua/telescope/_extensions/neorg/find_context_tasks.lua
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ local function pick_tasks(context)
pickers.new(opts, {
prompt_title = title,
results_title = "Tasks",
preview_title = "Details",
preview_title = "Task Details",
finder = finders.new_table({
results = tasks,
entry_maker = function(entry)
Expand Down Expand Up @@ -132,7 +132,7 @@ return function(opts)
pickers.new(opts, {
prompt_title = "Pick Neorg Gtd Contexts",
results_title = "Contexts",
preview_title = "Tasks",
preview_title = "Tasks inside context",
finder = finders.new_table({
results = vim.tbl_keys(get_context_tasks()),
entry_maker = function(entry)
Expand Down
1 change: 1 addition & 0 deletions lua/telescope/_extensions/neorg/find_project_tasks.lua
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ return function(opts)
pickers.new(opts, {
prompt_title = "Pick Neorg Gtd Projects",
results_title = "Projects",
preview_title = "Tasks inside project",
finder = finders.new_table({
results = utils.get_projects(),
entry_maker = function(entry)
Expand Down

0 comments on commit a44d785

Please sign in to comment.