Update Writing Plugins docs

pull/435/head
Arijit Basu 2 years ago
parent e2c3251736
commit ef0d37e9f6
No known key found for this signature in database
GPG Key ID: 0F8EF5258DC38077

@ -6,7 +6,12 @@ following procedure:
- Add the following line in `~/.config/xplr/init.lua`
```lua
package.path = os.getenv("HOME") .. '/.config/xplr/plugins/?/src/init.lua'
local home = os.getenv("HOME")
package.path = home
.. "/.config/xplr/plugins/?/src/init.lua;"
.. home
.. "/.config/xplr/plugins/?.lua;"
.. package.path
```
- Clone the plugin

@ -16,8 +16,7 @@ A minimal plugin should confirm to the following structure:
```
plugin-name
├── README.md
└── src
└── init.lua
└── init.lua
```
You can also use
@ -27,7 +26,7 @@ You can also use
This is where you document what the plugin does, how to use it, etc.
### src/init.lua
### init.lua
This file is executed to load the plugin. It should expose a `setup()`
function, which will be used by the users to setup the plugin.

Loading…
Cancel
Save