ref(nvim): fennel keymap

This commit is contained in:
Léana 江 2024-01-26 00:19:40 +01:00 committed by Léana 江
parent e544decd09
commit 28bf2dda1e
4 changed files with 162 additions and 129 deletions

View file

@ -1,3 +1,44 @@
-------------------
-- tangerin.nvim --
-------------------
local pack = "lazy"
local function bootstrap(url, ref)
local name = url:gsub(".*/", "")
local path
if pack == "lazy" then
path = vim.fn.stdpath "data" .. "/lazy/" .. name
vim.opt.rtp:prepend(path)
else
path = vim.fn.stdpath "data" .. "/site/pack/" .. pack .. "/start/" .. name
end
if vim.fn.isdirectory(path) == 0 then
print(name .. ": installing in data dir...")
vim.fn.system { "git", "clone", url, path }
if ref then
vim.fn.system { "git", "-C", path, "checkout", ref }
end
vim.cmd "redraw"
print(name .. ": finished installing")
end
end
bootstrap("https://github.com/udayvir-singh/tangerine.nvim", "v2.8")
bootstrap "https://github.com/udayvir-singh/hibiscus.nvim"
require "tangerine".setup {
target = vim.fn.stdpath [[data]] .. "/tangerine",
compiler = {
verbose = false,
hooks = { "onsave", "oninit" },
},
}
----------
-- Lazy --
----------
local lazypath = vim.fn.stdpath "data" .. "/lazy/lazy.nvim"
if not vim.loop.fs_stat(lazypath) then
vim.fn.system {
@ -11,10 +52,6 @@ if not vim.loop.fs_stat(lazypath) then
end
vim.opt.rtp:prepend(lazypath)
require "keymap"
require "options"
require "autocmds"
require "lazy".setup {
----------------------
@ -165,4 +202,7 @@ require "lazy".setup {
}
require "options"
require "autocmds"
vim.cmd.colorscheme "curry"