-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathinit.lua
64 lines (57 loc) · 1.62 KB
/
init.lua
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
-- Welcome to your magic kit!
-- This is the first file Neovim will load.
-- We'll ensure we have a plugin manager and Aniseed.
-- This will allow us to load more Fennel based code and download more plugins.
-- Make some modules easier to access.
local execute = vim.api.nvim_command
local fn = vim.fn
local fmt = string.format
function script_path()
local str = debug.getinfo(2, "S").source:sub(2)
return str:match("(.*/)")
end
local lazypath = vim.fn.stdpath("data") .. "/lazy/lazy.nvim"
if not vim.loop.fs_stat(lazypath) then
vim.fn.system({
"git",
"clone",
"--filter=blob:none",
"https://github.com/folke/lazy.nvim.git",
"--branch=stable", -- latest stable release
lazypath,
})
end
vim.opt.rtp:prepend(lazypath)
local aniseed = fn.stdpath("data") .. "/lazy/aniseed"
if not vim.loop.fs_stat(aniseed) then
vim.fn.system({
"git",
"clone",
"--filter=blob:none",
"https://github.com/Olical/aniseed",
aniseed,
})
end
vim.opt.rtp:prepend(aniseed)
-- Enable Aniseed's automatic compilation and loading of Fennel source code.
-- Aniseed looks for this when it's loaded then loads the rest of your
-- configuration if it's set.
local input = script_path() .. "fnl"
if(vim.env.KITTY_SCROLLBACK_NVIM == 'true') then
vim.g["aniseed#env"] = {
module = "kitty.init",
input = input
}
elseif(vim.g.vscode) then
vim.g["aniseed#env"] = {
module = "vsc.init",
input = input
}
else
vim.g["aniseed#env"] = {
module = "magic.init",
input = input
}
end
-- Now head to fnl/magic/init.fnl to continue your journey.
-- Try pressing gf on the file path to [g]o to the [f]ile.