diff options
author | Lewis Russell <lewis6991@gmail.com> | 2023-07-16 09:34:50 +0100 |
---|---|---|
committer | Lewis Russell <lewis6991@gmail.com> | 2023-07-17 12:59:10 +0100 |
commit | 3fd504dbec39eeced1bea17d9f3bd06de7f3e4d8 (patch) | |
tree | ff62002ad6c3a03ecf96ef15cf7a3856425b8ac4 /scripts/lua2dox.lua | |
parent | a54f88ea64c02f9fa7bf3d7445cdaaea424d439f (diff) | |
download | rneovim-3fd504dbec39eeced1bea17d9f3bd06de7f3e4d8.tar.gz rneovim-3fd504dbec39eeced1bea17d9f3bd06de7f3e4d8.tar.bz2 rneovim-3fd504dbec39eeced1bea17d9f3bd06de7f3e4d8.zip |
docs: handle whitespace in emmycomments
Diffstat (limited to 'scripts/lua2dox.lua')
-rw-r--r-- | scripts/lua2dox.lua | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/scripts/lua2dox.lua b/scripts/lua2dox.lua index bb5214f091..b0eb4c086c 100644 --- a/scripts/lua2dox.lua +++ b/scripts/lua2dox.lua @@ -328,6 +328,7 @@ function TLua2DoX_filter.filter(this, AppStamp, Filename) line = string_trim(inStream:getLine()) l = l + 1 if string.sub(line, 1, 2) == '--' then -- it's a comment + line = line:gsub('^---%s+@', '---@') -- Allow people to write style similar to EmmyLua (since they are basically the same) -- instead of silently skipping things that start with --- if string.sub(line, 3, 3) == '@' then -- it's a magic comment @@ -341,6 +342,7 @@ function TLua2DoX_filter.filter(this, AppStamp, Filename) if vim.startswith(line, '---@cast') or vim.startswith(line, '---@diagnostic') or vim.startswith(line, '---@overload') + or vim.startswith(line, '---@meta') or vim.startswith(line, '---@type') then -- Ignore LSP directives outStream:writeln('// gg:"' .. line .. '"') |