Skip to content

Commit

Permalink
docs: auto generate docs
Browse files Browse the repository at this point in the history
  • Loading branch information
sontungexpt committed Sep 22, 2023
1 parent d5f5d0c commit b6d60b9
Show file tree
Hide file tree
Showing 11 changed files with 25 additions and 16 deletions.
2 changes: 1 addition & 1 deletion docs/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ <h2>Topics</h2>
</div> <!-- id="main" -->
<div id="about">
<i>generated by <a href="http://github.com/lunarmodules/LDoc">LDoc 1.5.0</a></i>
<i style="float:right;">Last updated 2023-09-22 07:05:36 </i>
<i style="float:right;">Last updated 2023-09-22 07:44:50 </i>
</div> <!-- id="about" -->
</div> <!-- id="container" -->

Expand Down
2 changes: 1 addition & 1 deletion docs/modules/url-open.html
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ <h3>Usage:</h3>
</div> <!-- id="main" -->
<div id="about">
<i>generated by <a href="http://github.com/lunarmodules/LDoc">LDoc 1.5.0</a></i>
<i style="float:right;">Last updated 2023-09-22 07:05:36 </i>
<i style="float:right;">Last updated 2023-09-22 07:44:50 </i>
</div> <!-- id="about" -->
</div> <!-- id="container" -->

Expand Down
2 changes: 1 addition & 1 deletion docs/modules/url-open.modules.autocmd.html
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ <h3>See also:</h3>
</div> <!-- id="main" -->
<div id="about">
<i>generated by <a href="http://github.com/lunarmodules/LDoc">LDoc 1.5.0</a></i>
<i style="float:right;">Last updated 2023-09-22 07:05:36 </i>
<i style="float:right;">Last updated 2023-09-22 07:44:50 </i>
</div> <!-- id="about" -->
</div> <!-- id="container" -->

Expand Down
10 changes: 6 additions & 4 deletions docs/modules/url-open.modules.commands.html
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ <h2><a href="#Functions">Functions</a></h2>
<table class="function_list">
<tr>
<td class="name" nowrap><a href="#setup">setup (user_opts)</a></td>
<td class="summary">Setup the OpenUrlUnderCursor command.</td>
<td class="summary">Setup the OpenUrlUnderCursor command and HighlightAllUrls command.</td>
</tr>
</table>

Expand All @@ -83,7 +83,7 @@ <h2 class="section-header "><a name="Functions"></a>Functions</h2>
<strong>setup (user_opts)</strong>
</dt>
<dd>
Setup the OpenUrlUnderCursor command.
Setup the OpenUrlUnderCursor command and HighlightAllUrls command.


<h3>Parameters:</h3>
Expand All @@ -98,7 +98,9 @@ <h3>Parameters:</h3>

<h3>See also:</h3>
<ul>
<a href="../modules/url-open.modules.handlers.html#open_url">url-open.modules.handlers.open_url</a>
<li><a href="../modules/url-open.modules.handlers.html#open_url">url-open.modules.handlers.open_url</a></li>
<li><a href="../modules/url-open.modules.handlers.html#set_url_effect">url-open.modules.handlers.set_url_effect</a></li>
<li><a href="../modules/url-open.modules.handlers.html#change_color_highlight">url-open.modules.handlers.change_color_highlight</a></li>
</ul>

<h3>Usage:</h3>
Expand All @@ -114,7 +116,7 @@ <h3>Usage:</h3>
</div> <!-- id="main" -->
<div id="about">
<i>generated by <a href="http://github.com/lunarmodules/LDoc">LDoc 1.5.0</a></i>
<i style="float:right;">Last updated 2023-09-22 07:05:36 </i>
<i style="float:right;">Last updated 2023-09-22 07:44:50 </i>
</div> <!-- id="about" -->
</div> <!-- id="container" -->

Expand Down
2 changes: 1 addition & 1 deletion docs/modules/url-open.modules.handlers.html
Original file line number Diff line number Diff line change
Expand Up @@ -385,7 +385,7 @@ <h3>See also:</h3>
</div> <!-- id="main" -->
<div id="about">
<i>generated by <a href="http://github.com/lunarmodules/LDoc">LDoc 1.5.0</a></i>
<i style="float:right;">Last updated 2023-09-22 07:05:36 </i>
<i style="float:right;">Last updated 2023-09-22 07:44:50 </i>
</div> <!-- id="about" -->
</div> <!-- id="container" -->

Expand Down
2 changes: 1 addition & 1 deletion docs/modules/url-open.modules.logger.html
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,7 @@ <h3>Parameters:</h3>
</div> <!-- id="main" -->
<div id="about">
<i>generated by <a href="http://github.com/lunarmodules/LDoc">LDoc 1.5.0</a></i>
<i style="float:right;">Last updated 2023-09-22 07:05:36 </i>
<i style="float:right;">Last updated 2023-09-22 07:44:50 </i>
</div> <!-- id="about" -->
</div> <!-- id="container" -->

Expand Down
2 changes: 1 addition & 1 deletion docs/modules/url-open.modules.options.html
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,7 @@ <h3>Fields:</h3>
</div> <!-- id="main" -->
<div id="about">
<i>generated by <a href="http://github.com/lunarmodules/LDoc">LDoc 1.5.0</a></i>
<i style="float:right;">Last updated 2023-09-22 07:05:36 </i>
<i style="float:right;">Last updated 2023-09-22 07:44:50 </i>
</div> <!-- id="about" -->
</div> <!-- id="container" -->

Expand Down
2 changes: 1 addition & 1 deletion docs/modules/url-open.modules.patterns.html
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ <h2 class="section-header "><a name="Fields"></a>Fields</h2>
</div> <!-- id="main" -->
<div id="about">
<i>generated by <a href="http://github.com/lunarmodules/LDoc">LDoc 1.5.0</a></i>
<i style="float:right;">Last updated 2023-09-22 07:05:36 </i>
<i style="float:right;">Last updated 2023-09-22 07:44:50 </i>
</div> <!-- id="about" -->
</div> <!-- id="container" -->

Expand Down
6 changes: 5 additions & 1 deletion docs/topics/README.md.html
Original file line number Diff line number Diff line change
Expand Up @@ -231,6 +231,10 @@ <h2>Usage</h2>
</pre>


<ul>
<li>You can also use command <code>:HighlightAllUrls</code> to highlight all urls in the buffer manually</li>
</ul>

<h2>Contributing</h2>

<p>Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.</p>
Expand All @@ -244,7 +248,7 @@ <h2>License</h2>
</div> <!-- id="main" -->
<div id="about">
<i>generated by <a href="http://github.com/lunarmodules/LDoc">LDoc 1.5.0</a></i>
<i style="float:right;">Last updated 2023-09-22 07:05:36 </i>
<i style="float:right;">Last updated 2023-09-22 07:44:50 </i>
</div> <!-- id="about" -->
</div> <!-- id="container" -->

Expand Down
2 changes: 1 addition & 1 deletion lua/url-open/modules/autocmd.lua
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ M.setup = function(user_opts)
end,
})

api.nvim_create_autocmd({ "BufEnter", "WinEnter" }, {
api.nvim_create_autocmd({ "BufEnter", "WinEnter", "VimEnter" }, {
desc = "URL Highlighting",
group = api.nvim_create_augroup("HighlightAllUrl", { clear = true }),
command = "HighlightAllUrls",
Expand Down
9 changes: 6 additions & 3 deletions lua/url-open/modules/commands.lua
Original file line number Diff line number Diff line change
@@ -1,21 +1,24 @@
--- Setup the OpenUrlUnderCursor command.
--
local M = {}
local nvim_create_user_command = vim.api.nvim_create_user_command

local handlers = require("url-open.modules.handlers")

--- Setup the OpenUrlUnderCursor command.
--- Setup the OpenUrlUnderCursor command and HighlightAllUrls command.
--- @tparam table user_opts : User options.
--- @see url-open.modules.handlers.open_url
--- @see url-open.modules.handlers.set_url_effect
--- @see url-open.modules.handlers.change_color_highlight
--- @usage require("url-open.modules.commands").setup(opts)
M.setup = function(user_opts)
vim.api.nvim_create_user_command(
nvim_create_user_command(
"OpenUrlUnderCursor",
function() handlers.open_url(user_opts) end,
{ nargs = 0 }
)

vim.api.nvim_create_user_command("HighlightAllUrls", function()
nvim_create_user_command("HighlightAllUrls", function()
handlers.set_url_effect()
handlers.change_color_highlight(user_opts.highlight_url.all_urls, "HighlightAllUrl")
end, { nargs = 0 })
Expand Down

0 comments on commit b6d60b9

Please sign in to comment.