tangled
alpha
login
or
join now
robinwobin.dev
/
artio.nvim
3
fork
atom
minimal extui fuzzy finder for neovim
3
fork
atom
overview
issues
pulls
pipelines
feat(builtins): add helptags picker
robinwobin.dev
4 months ago
3b5b0677
fc68310e
+25
1 changed file
expand all
collapse all
unified
split
lua
artio
builtins.lua
+25
lua/artio/builtins.lua
···
50
50
})
51
51
end
52
52
53
53
+
local function find_helptags()
54
54
+
local buf = vim.api.nvim_create_buf(false, true)
55
55
+
vim.bo[buf].buftype = "help"
56
56
+
local tags = vim.api.nvim_buf_call(buf, function()
57
57
+
return vim.fn.taglist(".*")
58
58
+
end)
59
59
+
vim.api.nvim_buf_delete(buf, { force = true })
60
60
+
return vim.tbl_map(function(t)
61
61
+
return t.name
62
62
+
end, tags)
63
63
+
end
64
64
+
65
65
+
builtins.helptags = function()
66
66
+
local lst = find_helptags()
67
67
+
68
68
+
return artio.generic(lst, {
69
69
+
prompt = "helptags",
70
70
+
on_close = function(text, _)
71
71
+
vim.schedule(function()
72
72
+
vim.cmd.help(text)
73
73
+
end)
74
74
+
end,
75
75
+
})
76
76
+
end
77
77
+
53
78
return builtins