pull/1/head
delta 2 months ago
parent 7074e3e4c3
commit 3c00f00f06
  1. 2
      README.md
  2. 28
      bulb.toml
  3. 45
      init.lua

@ -1,4 +1,4 @@
# lite-bulb
<p style="text-align: center;">lite-bulb</p>
💡minimalist, vim-plug inspired plugin manager for lite-xl

@ -1,21 +1,9 @@
[info]
name = "bulb"
version = "3"
# Plugin "mod-version"
# Required
# Format: MAJOR[.MINOR]
# Note: If MINOR is omitted,
[dep]
[install]
pre = ""
# Run before installation
# Can be used for installing external dependencies
# Default: ""
post = ""
# Run after installation
# Can be used to overwrite other plugins
# Default: ""
version = "3.0" # --REQUIRED--
# Description : Plugin mod-version
# Format : <int>[.<int>], where first <int> is MAJOR version and second <int> is MINOR
# Note : If MINOR is omitted, bulb will default to MAJOR.0
type = "plugin"
# Description : Type of the plugin
# Format : One of the following: "plugin", "syntax"

@ -1,16 +1,55 @@
--mod-version:3.0
local config = require "core.config"
-- local common = require "core.common"
local common = require "core.common"
local core = require "core"
local os = require "os"
-- TODO: Add config support
-- Options:
-- keep_plugins: <bool> -- Whether to keep plugins installed after delinking them | DEFAULT: true
-- plugins: <table: <string>=<float/int> > -- List of enabled plugins
config.plugins.bulb = {
-- Check if git is installed and if not exit
local git = {os.execute("git help >/dev/null 2>&1")}
if git[3] ~= 0 then
core.error("git is not installed, please install git to use bulb")
os.exit()
end
config.plugins.bulb = common.merge {
keep_plugins = true,
plugins = {} -- Format: <string>/{string + extra bs (see docs)} = <float/int>
}
for _, plugin in ipairs(config.plugins.bulb.plugins) do
core.log "plugin: "..plugin[1].."\n".."d"
end
local git_repo = "https://github.com/lite-xl/lite-xl-plugins"
-- local function exists(file)
-- local ok, err, code = os.rename(file, file)
-- if not ok then
-- if code == 13 then
-- -- Permission denied, but it exists
-- return true
-- end
-- end
-- return ok, err
-- end
-- if not exists
-- local bulb = {}
-- function bulb.validate_plugins()
-- for _, name in ipairs(config.plugins.bulb.plugins) do
-- end
-- end
---@param string plugin
-- function bulb(plugin)

Loading…
Cancel
Save