Minimalist-ish Lite XL plugin manager inspired by vim-plug. The goal of this project was to write a small and simple plugin manager for Lite XL that doesn't depend on any lua modules or programs (except git) that aren't included with the text editor already.
Clone this repo to your ~/.config/lite-xl
directory (NOT in the plugins
)
git clone https://github.com/tunalad/lixling.git ~/.config/lite-xl
First, you have to import lixling
to your init.lua
config file and call the plugins
function, giving it a table.
local lixling = require("lixling")
lixling.plugins({
-- plugins go here
})
Note: I will be writing keys as ["name"]
, but you can still write them simply as name
.
["name"] = "raw .lua or .git link",
-- OR
["name"] = { "raw .lua or .git link" },
You simply give the key a link of a raw .lua
file or a valid .git
repository. If it's a raw .lua
link, it will curl
to your plugins
directory with the key as name. So if we called our plugin banana
, it will download that plugin as banana.lua
. Same goes with the git repo link, it will clone everything into banana/
directory.
Note: Don't add private repositories to the list. When cloning, git will ask for your password, thus stopping the plugin from installing and updating the latter plugins in the list.
By default, Lixling will assume that we're cloning and pulling from the master
branch. If we want to clone from a different branch, you'll have to specify it as the second element:
["name"] = { "git link", "branch" }
Some plugins require extra steps after downloading. In those cases, you can add a command as the third element.
["name"] = { "`.git` link", "branch", "post-download hook" }
Post-download hook is being executed inside the plugin's directory.
Command | Description |
---|---|
Lixling: Install | Installs listed plugins |
Lixling: Update | Updates listed plugins |
Lixling: Upgrade | Updates Lixling itself |
Lixling: Clear | "Exiles" unlisted plugins |
"Exiled" plugins will be moved to ~/.config/lite-xl/lixling/exiled
.
To whitelist a plugin, give it an empty url value:
["name"] = "",
-- OR
["name"] = {""},
lixling.plugins({
-- Lixling will ignore this plugin when exiling
["testplug"] = "",
-- Lixling will download (curl) the linked file as "minimap.lua"
["minimap"] = "https://raw.githubusercontent.com/lite-xl/lite-xl-plugins/master/plugins/minimap.lua",
-- Lixling wll clone/pull the repository as "lite-xl-vibe/"
["lite-xl-vibe"] = "https://github.com/eugenpt/lite-xl-vibe.git",
-- Lixling will download (curl) the linked file as "wordcount.lua"
["wordcount"] = {"https://raw.githubusercontent.com/lite-xl/lite-xl-plugins/master/plugins/wordcount.lua"},
-- Lixling will clone/pull the repository as "console/" from the "dev" branch
["console"] = {"https://github.com/lite-xl/console.git", "dev"},
-- Lixling will clone/pull "terminal/" from the "master" and run the "make release" command
["terminal"] = { "https://github.com/benjcollins/lite-xl-terminal.git", "master", "make release" },
-- Lixling will clone/pull "exterm" from the "main" and run the "mv exterm.lua init.lua" command
["exterm"] = { "https://github.com/ShadiestGoat/lite-xl-exterm.git", "main", "mv exterm.lua init.lua" },
})
- Windows isn't supported.
- Exiling folders won't work if they're already in the
exiled
directory
Note that this is my first time ever coding something in lua. If there's any more problems, report them by opening an issue.