mirror of
https://github.com/zoriya/telescope.nvim.git
synced 2025-12-06 06:46:10 +00:00
feat: Add vim docs & generators (#370)
* feat: Add vim docs & generators * example of what we could start to do * Docgen CI job * wip * incremental updates. soon good validation * [Actions] Generate Documentation skip-checks: true * pretty cool now * [Actions] Generate Documentation skip-checks: true * make sure telescope is loaded first * Add updates. Maybe this will not delete now? * Add defaults tags as well * 😄 Co-authored-by: Simon Hauser <Simon-Hauser@outlook.de> Co-authored-by: Github Actions <actions@github>
This commit is contained in:
34
scripts/gendocs.lua
Normal file
34
scripts/gendocs.lua
Normal file
@@ -0,0 +1,34 @@
|
||||
-- Setup telescope with defaults
|
||||
require('telescope').setup()
|
||||
|
||||
local docgen = require('docgen')
|
||||
|
||||
local docs = {}
|
||||
|
||||
docs.test = function()
|
||||
-- TODO: Fix the other files so that we can add them here.
|
||||
local input_files = {
|
||||
"./lua/telescope/init.lua",
|
||||
"./lua/telescope/builtin/init.lua",
|
||||
"./lua/telescope/pickers/layout_strategies.lua",
|
||||
}
|
||||
|
||||
table.sort(input_files, function(a, b)
|
||||
return #a < #b
|
||||
end)
|
||||
|
||||
local output_file = "./doc/telescope.txt"
|
||||
local output_file_handle = io.open(output_file, "w")
|
||||
|
||||
for _, input_file in ipairs(input_files) do
|
||||
docgen.write(input_file, output_file_handle)
|
||||
end
|
||||
|
||||
output_file_handle:write(" vim:tw=78:ts=8:ft=help:norl:\n")
|
||||
output_file_handle:close()
|
||||
vim.cmd [[checktime]]
|
||||
end
|
||||
|
||||
docs.test()
|
||||
|
||||
return docs
|
||||
@@ -1,6 +1,7 @@
|
||||
set rtp+=.
|
||||
set rtp+=../plenary.nvim/
|
||||
set rtp+=../popup.nvim/
|
||||
set rtp+=../tree-sitter-lua/
|
||||
|
||||
runtime! plugin/plenary.vim
|
||||
runtime! plugin/telescope.vim
|
||||
|
||||
Reference in New Issue
Block a user