Skip to content

Commit

Permalink
[WIP]: Thu 13 Aug 2020 10:49:21 PM EDT
Browse files Browse the repository at this point in the history
  • Loading branch information
tjdevries committed Aug 14, 2020
1 parent 39d4804 commit a04ff2a
Show file tree
Hide file tree
Showing 3 changed files with 33 additions and 7 deletions.
22 changes: 22 additions & 0 deletions lua/docs.lua
Expand Up @@ -247,6 +247,28 @@ function docs.test()
print(vim.inspect(t))
end

local text_width = 78
function docs.transform_function(name, metadata)
end

--[[
["M.example"] = {
description = "--- Example function",
parameters = {
a = {
description = { "This is a number" },
name = "a",
type = "number"
},
b = {
description = { "Also a number" },
name = "b",
type = "number"
}
}
}
--]]
vim.cmd [[nnoremap asdf :lua package.loaded['docs'] = nil; require('docs').test()<CR>]]

Expand Down
7 changes: 5 additions & 2 deletions query/lua/_test.scm
@@ -1,2 +1,5 @@
(function_statement (emmy_documentation)) @func
(variable_declaration (emmy_documentation)) @var
(function_statement
documentation: (emmy_documentation)) @func

(variable_declaration
documentation: (emmy_documentation)) @var
11 changes: 6 additions & 5 deletions scratch/module_example.lua
Expand Up @@ -24,11 +24,12 @@ end
M.not_documented = function()
end

local NotExported = {}
-- TODO: Figure out how to exclude the not exported stuff.
--local NotExported = {}

--- Should not get exported
---@param wow string: Yup
function NotExported.not_exported()
end
----- Should not get exported
-----@param wow string: Yup
--NotExported.not_exported = function()
--end

return M

0 comments on commit a04ff2a

Please sign in to comment.