|
|
@ -2823,7 +2823,12 @@ following procedure:</p>
|
|
|
|
<ul>
|
|
|
|
<ul>
|
|
|
|
<li>
|
|
|
|
<li>
|
|
|
|
<p>Add the following line in <code>~/.config/xplr/init.lua</code></p>
|
|
|
|
<p>Add the following line in <code>~/.config/xplr/init.lua</code></p>
|
|
|
|
<pre><code class="language-lua">package.path = os.getenv("HOME") .. '/.config/xplr/plugins/?/src/init.lua'
|
|
|
|
<pre><code class="language-lua">local home = os.getenv("HOME")
|
|
|
|
|
|
|
|
package.path = home
|
|
|
|
|
|
|
|
.. "/.config/xplr/plugins/?/src/init.lua;"
|
|
|
|
|
|
|
|
.. home
|
|
|
|
|
|
|
|
.. "/.config/xplr/plugins/?.lua;"
|
|
|
|
|
|
|
|
.. package.path
|
|
|
|
</code></pre>
|
|
|
|
</code></pre>
|
|
|
|
</li>
|
|
|
|
</li>
|
|
|
|
<li>
|
|
|
|
<li>
|
|
|
@ -2852,14 +2857,13 @@ integers. They will be plugged using the <code>require()</code> function in Lua.
|
|
|
|
<p>A minimal plugin should confirm to the following structure:</p>
|
|
|
|
<p>A minimal plugin should confirm to the following structure:</p>
|
|
|
|
<pre><code>plugin-name
|
|
|
|
<pre><code>plugin-name
|
|
|
|
├── README.md
|
|
|
|
├── README.md
|
|
|
|
└── src
|
|
|
|
└── init.lua
|
|
|
|
└── init.lua
|
|
|
|
|
|
|
|
</code></pre>
|
|
|
|
</code></pre>
|
|
|
|
<p>You can also use
|
|
|
|
<p>You can also use
|
|
|
|
<a href="https://github.com/sayanarijit/plugin-template1.xplr">this template</a>.</p>
|
|
|
|
<a href="https://github.com/sayanarijit/plugin-template1.xplr">this template</a>.</p>
|
|
|
|
<h3 id="readmemd"><a class="header" href="#readmemd">README.md</a></h3>
|
|
|
|
<h3 id="readmemd"><a class="header" href="#readmemd">README.md</a></h3>
|
|
|
|
<p>This is where you document what the plugin does, how to use it, etc.</p>
|
|
|
|
<p>This is where you document what the plugin does, how to use it, etc.</p>
|
|
|
|
<h3 id="srcinitlua"><a class="header" href="#srcinitlua">src/init.lua</a></h3>
|
|
|
|
<h3 id="initlua"><a class="header" href="#initlua">init.lua</a></h3>
|
|
|
|
<p>This file is executed to load the plugin. It should expose a <code>setup()</code>
|
|
|
|
<p>This file is executed to load the plugin. It should expose a <code>setup()</code>
|
|
|
|
function, which will be used by the users to setup the plugin.</p>
|
|
|
|
function, which will be used by the users to setup the plugin.</p>
|
|
|
|
<p>Example:</p>
|
|
|
|
<p>Example:</p>
|
|
|
|