This commit is contained in:
NotAShelf 2024-12-10 20:40:03 +00:00
parent 037ee44b24
commit 79d192ade0
6 changed files with 98 additions and 6 deletions

View file

@ -6,7 +6,7 @@
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>nvf manual</title> <title>nvf manual</title>
<link rel="stylesheet" type="text/css" href="style.css" /> <link rel="stylesheet" type="text/css" href="style.css" />
<script src="highlightjs/highlight.pack.js" type="text/javascript"></script><script src="highlightjs/loader.js" type="text/javascript"></script><script src="script/anchor-use.js" type="text/javascript"></script><script src="script/anchor-min.js" type="text/javascript"></script> <script src="highlightjs/highlight.pack.js" type="text/javascript"></script><script src="highlightjs/loader.js" type="text/javascript"></script><script src="script/anchor-use.js" type="text/javascript"></script><script src="script/anchor-min.js" type="text/javascript"></script><script src="script/search.js" type="text/javascript"></script>
<meta name="generator" content="nixos-render-docs" /> <meta name="generator" content="nixos-render-docs" />
<link rel="home" href="index.xhtml" title="nvf manual" /> <link rel="home" href="index.xhtml" title="nvf manual" />
<link rel="next" href="quirks.html" title="Appendix A. Known Issues and Quirks" /> <link rel="next" href="quirks.html" title="Appendix A. Known Issues and Quirks" />

View file

@ -6,7 +6,7 @@
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Appendix B. Neovim Flake Configuration Options</title> <title>Appendix B. Neovim Flake Configuration Options</title>
<link rel="stylesheet" type="text/css" href="style.css" /> <link rel="stylesheet" type="text/css" href="style.css" />
<script src="highlightjs/highlight.pack.js" type="text/javascript"></script><script src="highlightjs/loader.js" type="text/javascript"></script><script src="script/anchor-use.js" type="text/javascript"></script><script src="script/anchor-min.js" type="text/javascript"></script> <script src="highlightjs/highlight.pack.js" type="text/javascript"></script><script src="highlightjs/loader.js" type="text/javascript"></script><script src="script/anchor-use.js" type="text/javascript"></script><script src="script/anchor-min.js" type="text/javascript"></script><script src="script/search.js" type="text/javascript"></script>
<meta name="generator" content="nixos-render-docs" /> <meta name="generator" content="nixos-render-docs" />
<link rel="home" href="index.xhtml" title="nvf manual" /> <link rel="home" href="index.xhtml" title="nvf manual" />
<link rel="up" href="index.xhtml" title="nvf manual" /><link rel="prev" href="quirks.html" title="Appendix A. Known Issues and Quirks" /><link rel="next" href="release-notes.html" title="Appendix C. Release Notes" /> <link rel="up" href="index.xhtml" title="nvf manual" /><link rel="prev" href="quirks.html" title="Appendix A. Known Issues and Quirks" /><link rel="next" href="release-notes.html" title="Appendix C. Release Notes" />
@ -103,8 +103,9 @@ boolean</p>
</span> </span>
</dt> </dt>
<dd> <dd>
<p>Whether to enable [<code class="option">official documentation</code>]: https://neovim.io/doc/user/lua.html#vim.loader.enable()</p><p>the experimental Lua module loader to speed up the start up process</p><p>If <code class="literal">true</code>, this will enable the experimental Lua module loader which:</p><div class="itemizedlist"><ul class="itemizedlist " style="list-style-type: disc;"><li class="listitem"><p>overrides loadfile</p></li><li class="listitem"><p>adds the lua loader using the byte-compilation cache</p></li><li class="listitem"><p>adds the libs loader</p></li><li class="listitem"><p>removes the default Neovim loader</p></li></ul></div><div class="note"><h3 class="title">Note</h3><p>This is disabled by default. Before setting this option, please <p>the experimental Lua module loader to speed up the start up process</p><p>If <code class="literal">true</code>, this will enable the experimental Lua module loader which:</p><div class="itemizedlist"><ul class="itemizedlist " style="list-style-type: disc;"><li class="listitem"><p>overrides loadfile</p></li><li class="listitem"><p>adds the lua loader using the byte-compilation cache</p></li><li class="listitem"><p>adds the libs loader</p></li><li class="listitem"><p>removes the default Neovim loader</p></li></ul></div><div class="note"><h3 class="title">Note</h3><p>The Lua module loader is <span class="emphasis"><em>disabled</em></span> by default. Before setting this option, please
take a look at the [<code class="option">official documentation</code>].</p></div><p>.</p> take a look at the <a class="link" href="https://neovim.io/doc/user/lua.html#vim.loader.enable()" target="_top"><code class="option">official documentation</code></a>. This option may be enabled by
default in the future.</p></div>
<p><span class="emphasis"><em>Type:</em></span> <p><span class="emphasis"><em>Type:</em></span>
boolean</p> boolean</p>

View file

@ -6,7 +6,7 @@
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Appendix A. Known Issues and Quirks</title> <title>Appendix A. Known Issues and Quirks</title>
<link rel="stylesheet" type="text/css" href="style.css" /> <link rel="stylesheet" type="text/css" href="style.css" />
<script src="highlightjs/highlight.pack.js" type="text/javascript"></script><script src="highlightjs/loader.js" type="text/javascript"></script><script src="script/anchor-use.js" type="text/javascript"></script><script src="script/anchor-min.js" type="text/javascript"></script> <script src="highlightjs/highlight.pack.js" type="text/javascript"></script><script src="highlightjs/loader.js" type="text/javascript"></script><script src="script/anchor-use.js" type="text/javascript"></script><script src="script/anchor-min.js" type="text/javascript"></script><script src="script/search.js" type="text/javascript"></script>
<meta name="generator" content="nixos-render-docs" /> <meta name="generator" content="nixos-render-docs" />
<link rel="home" href="index.xhtml" title="nvf manual" /> <link rel="home" href="index.xhtml" title="nvf manual" />
<link rel="up" href="index.xhtml" title="nvf manual" /><link rel="prev" href="index.xhtml" title="nvf manual" /><link rel="next" href="options.html" title="Appendix B. Neovim Flake Configuration Options" /> <link rel="up" href="index.xhtml" title="nvf manual" /><link rel="prev" href="index.xhtml" title="nvf manual" /><link rel="next" href="options.html" title="Appendix B. Neovim Flake Configuration Options" />

View file

@ -6,7 +6,7 @@
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Appendix C. Release Notes</title> <title>Appendix C. Release Notes</title>
<link rel="stylesheet" type="text/css" href="style.css" /> <link rel="stylesheet" type="text/css" href="style.css" />
<script src="highlightjs/highlight.pack.js" type="text/javascript"></script><script src="highlightjs/loader.js" type="text/javascript"></script><script src="script/anchor-use.js" type="text/javascript"></script><script src="script/anchor-min.js" type="text/javascript"></script> <script src="highlightjs/highlight.pack.js" type="text/javascript"></script><script src="highlightjs/loader.js" type="text/javascript"></script><script src="script/anchor-use.js" type="text/javascript"></script><script src="script/anchor-min.js" type="text/javascript"></script><script src="script/search.js" type="text/javascript"></script>
<meta name="generator" content="nixos-render-docs" /> <meta name="generator" content="nixos-render-docs" />
<link rel="home" href="index.xhtml" title="nvf manual" /> <link rel="home" href="index.xhtml" title="nvf manual" />
<link rel="up" href="index.xhtml" title="nvf manual" /><link rel="prev" href="options.html" title="Appendix B. Neovim Flake Configuration Options" /> <link rel="up" href="index.xhtml" title="nvf manual" /><link rel="prev" href="options.html" title="Appendix B. Neovim Flake Configuration Options" />

58
script/search.js Normal file
View file

@ -0,0 +1,58 @@
document.addEventListener("DOMContentLoaded", () => {
if (!window.location.pathname.endsWith("options.html")) return;
const searchDiv = document.createElement("div");
searchDiv.id = "search-bar";
searchDiv.innerHTML = `
<input type="text" id="search-input" placeholder="Search options by ID..." />
<div id="search-results"></div>
`;
document.body.prepend(searchDiv);
const dtElements = Array.from(document.querySelectorAll("dt"));
const ddElements = Array.from(document.querySelectorAll("dd"));
const dtOptionIds = dtElements.map(
(dt) => dt.querySelector("a")?.id.toLowerCase() || "",
);
if (dtElements.length === 0 || ddElements.length === 0) {
console.warn("Something went wrong, page may be loaded incorrectly.");
return;
}
const dtElementsData = dtElements.map((dt, index) => ({
element: dt,
id: dtOptionIds[index],
ddElement: ddElements[index],
}));
const hiddenClass = "hidden";
const hiddenStyle = document.createElement("style");
hiddenStyle.innerHTML = `.${hiddenClass} { display: none; }`;
document.head.appendChild(hiddenStyle);
let debounceTimeout;
document.getElementById("search-input").addEventListener("input", (event) => {
clearTimeout(debounceTimeout);
debounceTimeout = setTimeout(() => {
const query = event.target.value.toLowerCase();
const matches = [];
const nonMatches = [];
dtElementsData.forEach(({ element, id, ddElement }) => {
const isMatch = id.includes(query);
if (isMatch) {
matches.push(element, ddElement);
} else {
nonMatches.push(element, ddElement);
}
});
requestAnimationFrame(() => {
matches.forEach((el) => el?.classList.remove(hiddenClass));
nonMatches.forEach((el) => el?.classList.add(hiddenClass));
});
}, 200);
});
});

View file

@ -437,10 +437,14 @@ th:last-child {
dt { dt {
margin: 1.2rem 0 0.8rem; margin: 1.2rem 0 0.8rem;
content-visibility: auto;
contain-intrinsic-size: auto 42px;
} }
dd { dd {
margin-left: 2rem; margin-left: 2rem;
content-visibility: auto;
contain-intrinsic-size: auto 500px;
} }
ul { ul {
@ -494,6 +498,35 @@ li:last-child {
text-decoration: none; text-decoration: none;
} }
#search-bar {
position: sticky;
top: 0;
background: white;
padding: 10px;
border-bottom: 1px solid #e5e7eb;
z-index: 1000;
}
@media (prefers-color-scheme: dark) {
#search-bar {
background: #111827;
color: #f9fafb;
border-bottom: 1px solid black;
}
}
#search-input {
width: 100%;
padding: 8px;
border: 1px solid #ccc;
border-radius: 4px;
background: inherit;
color: inherit;
}
.hidden {
display: none;
}
div.titlepage { div.titlepage {
margin: 40px 0; margin: 40px 0;
} }