diff options
| author | Michael Lingelbach <m.j.lbach@gmail.com> | 2022-03-20 12:15:43 -0700 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-03-20 12:15:43 -0700 |
| commit | 9dc02492c4a457479f8a0ec7a65aac1852ff59c0 (patch) | |
| tree | f45267cd5677265888d2b4568246470233ed798b /scripts | |
| parent | docs: update server_configurations.md (diff) | |
| download | nvim-lspconfig-9dc02492c4a457479f8a0ec7a65aac1852ff59c0.tar nvim-lspconfig-9dc02492c4a457479f8a0ec7a65aac1852ff59c0.tar.gz nvim-lspconfig-9dc02492c4a457479f8a0ec7a65aac1852ff59c0.tar.bz2 nvim-lspconfig-9dc02492c4a457479f8a0ec7a65aac1852ff59c0.tar.lz nvim-lspconfig-9dc02492c4a457479f8a0ec7a65aac1852ff59c0.tar.xz nvim-lspconfig-9dc02492c4a457479f8a0ec7a65aac1852ff59c0.tar.zst nvim-lspconfig-9dc02492c4a457479f8a0ec7a65aac1852ff59c0.zip | |
docs: remove use of debug module for automatically extracting root pattern (#1799)
Diffstat (limited to 'scripts')
| -rw-r--r-- | scripts/docgen.lua | 17 |
1 files changed, 1 insertions, 16 deletions
diff --git a/scripts/docgen.lua b/scripts/docgen.lua index d6dbbef1..375c5bd4 100644 --- a/scripts/docgen.lua +++ b/scripts/docgen.lua @@ -132,22 +132,7 @@ local function make_lsp_sections() if description and type(description) ~= 'string' then description = inspect(description) elseif not description and type(v) == 'function' then - local info = debug.getinfo(v) - local file = io.open(string.sub(info.source, 2), 'r') - - local fileContent = {} - for line in file:lines() do - table.insert(fileContent, line) - end - io.close(file) - - local root_dir = {} - for i = info.linedefined, info.lastlinedefined do - table.insert(root_dir, fileContent[i]) - end - - description = table.concat(root_dir, '\n') - description = string.gsub(description, '.*function', 'function') + description = 'see source file' end return string.format('- `%s` : \n```lua\n%s\n```', k, description or inspect(v)) end), |
