1 line
23 KiB
HTML
1 line
23 KiB
HTML
|
<!DOCTYPE HTML><html><head><meta charset="UTF-8"><title>NML | Getting Started</title><link rel="stylesheet" href="../style.css"></head><body><div class="layout"><input id="navbar-checkbox" class="toggle" type="checkbox" style="display:none" checked><div id="navbar"><ul><li class="navbar-entry-current"><a href="Getting Started.html">Getting Started</a></li><li class="navbar-entry"><a href="Sections.html">Sections</a></li><li class="navbar-entry"><a href="Variables.html">Variables</a></li><li class="navbar-entry"><a href="References.html">References</a></li><li class="navbar-entry"><a href="Imports.html">Imports</a></li><li class="navbar-entry"><a href="Raw.html">Raw</a></li><li class="navbar-entry"><a href="Comments.html">Comments</a></li><li><details><summary class="navbar-category">External Tools</summary><ul><li class="navbar-entry"><a href="Graphviz.html">Graphviz</a></li><li class="navbar-entry"><a href="LaTeX.html">LaTeX</a></li></ul></details></li><li><details><summary class="navbar-category">Blocks</summary><ul><li class="navbar-entry"><a href="Blockquotes.html">Blockquotes</a></li><li class="navbar-entry"><a href="Code.html">Code</a></li><li class="navbar-entry"><a href="Lists.html">Lists</a></li></ul></details></li><li><details><summary class="navbar-category">Lua</summary><ul><li class="navbar-entry"><a href="Lua Basics.html">Lua</a></li></ul></details></li><li><details><summary class="navbar-category">Styles</summary><ul><li class="navbar-entry"><a href="Basic Styles.html">Basic</a></li><li class="navbar-entry"><a href="Basic Layouts.html">Layouts</a></li><li class="navbar-entry"><a href="User-Defined Styles.html">User-Defined</a></li></ul></details></li></ul></div><label for="navbar-checkbox" class="navbar-checkbox-label">☰</label><div class="content"><div class="toc"><span>Table of Content</span><ol><li value="1"><a href="#Building_NML">Building NML</a></li><li value="2"><a href="#Building_your_first_document">Building your first document</a></li><li value="3"><a href="#Using_the_cache">Using the cache</a></li><li value="4"><a href="#Directory-Processing_mode">Directory-Processing mode</a></li><li value="5"><a href="#Building_the_Language_Server">Building the Language Server</a></li><ol><li style="list-style-type:none"><a href="#Integrating_the_LSP">Integrating the LSP</a></li><ol><li style="list-style-type:none"><a href="#NeoVim">NeoVim</a></li></div><h1 id="Building_NML">1. Building NML <a class="section-link" href="#Building_NML">🔗 </a> </h1><p>You need at least the nightly version of rustc to compile NML. Instruction for your operating system can be found on <a href="https://forge.rust-lang.org/infra/other-installation-methods.html">Rust's website</a>. You'll also need liblua 5.4 installed. You can then move the <em>nml</em> executable in <em>target/release/nml</em> into your <em>$PATH</em></p><p><a class="inline-code"><code><span style="color:#c0c5ce;">cargo build --bin nml</span></code></a> or for release mode: <a class="inline-code"><code><span style="color:#c0c5ce;">cargo build --release --bin nml</span></code></a><i>(Note: The release build binary is much smaller than the debug build one)</i></p><h1 id="Building_your_first_document">2. Building your first document <a class="section-link" href="#Building_your_first_document">🔗 </a> </h1><ul><li><a class="inline-code"><code><span style="color:#c0c5ce;">nml -i input.nml -o output.html</span></code></a></li></ul><h1 id="Using_the_cache">3. Using the cache <a class="section-link" href="#Using_the_cache">🔗 </a> </h1><p>NML relies on sqlite to keep a cache of pre-compiled elements that take a long time to process (e.g <svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" width="2.862216em" height="1.002199em" viewBox="0 -6.807795 25.567823 8.952523" style="vertical-align:-0.240094em"><defs><path id="uDwo_g1-65" d="M3.131258-4.811955C3.089415-4.923537 3.068493-4.972354 2.93599-4.972354S2.782565-4.923537 2.740722-4.811955L1.129763-.732254C1.060025-.557908 .941469-.251059 .313823-.2510
|