mirror of https://github.com/sayanarijit/xplr
parent
7ed89a4aff
commit
3cadaf8880
@ -0,0 +1,21 @@
|
||||
Awesome Plugins
|
||||
===============
|
||||
|
||||
Categories
|
||||
----------
|
||||
|
||||
- [Theme](#theme)
|
||||
- [Integration](#integration)
|
||||
|
||||
|
||||
Theme
|
||||
-----
|
||||
|
||||
- [material-landscape.xplr](https://github.com/sayanarijit/material-landscape.xplr)
|
||||
- [material-landscape2.xplr](https://github.com/sayanarijit/material-landscape2.xplr)
|
||||
|
||||
|
||||
Integration
|
||||
-----------
|
||||
|
||||
foo
|
@ -0,0 +1,28 @@
|
||||
Installing Plugins
|
||||
==================
|
||||
|
||||
Until we get a cool plugin manager, let's install plugins manually using the
|
||||
following procedure:
|
||||
|
||||
- Add the following line in `~/.config/xplr/init.lua`
|
||||
|
||||
```lua
|
||||
package.path = os.getenv("HOME") .. '/.config/xplr/plugins/?/src/init.lua'
|
||||
```
|
||||
|
||||
- Clone the plugin
|
||||
|
||||
```bash
|
||||
mkdir -p ~/.config/xplr/plugins
|
||||
|
||||
git clone https://github.com/sayanarijit/material-landscape2.xplr ~/.config/xplr/plugins/material-landscape2
|
||||
```
|
||||
|
||||
- Require the module in `~/.config/xplr/init.lua`
|
||||
|
||||
```lua
|
||||
require("material-landscape2").setup()
|
||||
|
||||
-- The setup arguments might differ for different plugins.
|
||||
-- Visit the project README for setup instructions.
|
||||
```
|
@ -0,0 +1,9 @@
|
||||
Plugin
|
||||
======
|
||||
|
||||
xplr supports pluggable Lua modules that can be used to easily configure or
|
||||
extend xplr UI and functionalities.
|
||||
|
||||
- [Installing Plugins](installing-plugins.md)
|
||||
- [Writing Plugins](writing-plugins.md)
|
||||
- [Awesome Plugins](awesome-plugins.md)
|
@ -1,5 +1,8 @@
|
||||
Quickstart
|
||||
==========
|
||||
|
||||
In this chapter, we'll learn how to install and configure xplr on our machine
|
||||
for the first time.
|
||||
Nice yo have to have here! Let's start quickly start our xplr journey with the
|
||||
following steps:
|
||||
|
||||
- [Install](install.md)
|
||||
- [Post Install](post-install.md)
|
||||
|
@ -0,0 +1,63 @@
|
||||
Writing Plugins
|
||||
===============
|
||||
|
||||
Anyone who can write [Lua](https://www.lua.org) code, can write xplr plugins.
|
||||
|
||||
Just follow the instructions and best practices:
|
||||
|
||||
|
||||
Naming
|
||||
------
|
||||
|
||||
xplr plugins are named using hiphen (`-`) separated words that may also include
|
||||
integers. They will be plugged using the `require()` function in Lua.
|
||||
|
||||
|
||||
Structure
|
||||
---------
|
||||
|
||||
A minimal plugin should confirm to the following structure:
|
||||
|
||||
```
|
||||
material-landscape
|
||||
├── README.md
|
||||
└── src
|
||||
└── init.lua
|
||||
```
|
||||
|
||||
You can also use
|
||||
[this template](https://github.com/sayanarijit/plugin-template1.xplr).
|
||||
|
||||
|
||||
### README.md
|
||||
|
||||
This is where you document what the plugin does, how to use it, etc.
|
||||
|
||||
### src/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.
|
||||
|
||||
Example:
|
||||
|
||||
```lua
|
||||
local function setup(args)
|
||||
local xplr = xplr
|
||||
-- do stuff with xplr
|
||||
end
|
||||
|
||||
return { setup = setup }
|
||||
```
|
||||
|
||||
Publishing
|
||||
----------
|
||||
|
||||
When publishing plugins to GitHub or other repositories, it's a best practice
|
||||
to append `.xplr` to the name to make them distinguishable. Similar to the
|
||||
`*.nvim` naming convention for [Neovim](https://neovim.io) plugins.
|
||||
|
||||
|
||||
Examples
|
||||
--------
|
||||
|
||||
Visit [Awesome Plugins](awesome-plugins.md) for xplr plugin examples.
|
Loading…
Reference in New Issue