Merge branch 'main' of https://git.araozu.dev/fernando/dotfiles
This commit is contained in:
commit
ba029eb9e2
2
.gitignore
vendored
Normal file
2
.gitignore
vendored
Normal file
@ -0,0 +1,2 @@
|
||||
config/nvim/lua
|
||||
|
@ -7,6 +7,14 @@ set -gx EDITOR vi
|
||||
set -gx VISUAL vi
|
||||
set -gx TERM foot
|
||||
|
||||
function git-push
|
||||
git push github (git rev-parse --abbrev-ref HEAD)
|
||||
end
|
||||
|
||||
function git-pull
|
||||
git pull github develop --no-rebase
|
||||
end
|
||||
|
||||
# Proper PATH handling
|
||||
fish_add_path $HOME/.local/bin
|
||||
fish_add_path $HOME/.cargo/bin
|
||||
|
19
config/nvim/.hotpot.lua
Normal file
19
config/nvim/.hotpot.lua
Normal file
@ -0,0 +1,19 @@
|
||||
-- By default, the Fennel compiler wont complain if unknown variables are
|
||||
-- referenced, we can force a compiler error so we don't try to run faulty code.
|
||||
local allowed_globals = {}
|
||||
for key, _ in pairs(_G) do
|
||||
table.insert(allowed_globals, key)
|
||||
end
|
||||
|
||||
return {
|
||||
-- by default, build all fnl/ files into lua/
|
||||
build = true,
|
||||
-- remove stale lua/ files
|
||||
clean = true,
|
||||
compiler = {
|
||||
modules = {
|
||||
-- enforce unknown variable errors
|
||||
allowedGlobals = allowed_globals,
|
||||
},
|
||||
},
|
||||
}
|
8
config/nvim/fnl/config.fnl
Normal file
8
config/nvim/fnl/config.fnl
Normal file
@ -0,0 +1,8 @@
|
||||
(set vim.g.mapleader " ")
|
||||
(set vim.g.maplocalleader " ")
|
||||
(set vim.g.have_nerd_font true)
|
||||
(set vim.opt.number true)
|
||||
(set vim.opt.relativenumber true)
|
||||
|
||||
(print "I have been setup :D")
|
||||
|
3
config/nvim/fnl/plugins/init.fnl
Normal file
3
config/nvim/fnl/plugins/init.fnl
Normal file
@ -0,0 +1,3 @@
|
||||
(print ":D (happy) (fennel lazy module)")
|
||||
|
||||
[]
|
53
config/nvim/init.lua
Normal file
53
config/nvim/init.lua
Normal file
@ -0,0 +1,53 @@
|
||||
-- Ensure lazy and hotpot are always installed
|
||||
local function ensure_installed(plugin, branch)
|
||||
local user, repo = string.match(plugin, "(.+)/(.+)")
|
||||
local repo_path = vim.fn.stdpath("data") .. "/lazy/" .. repo
|
||||
if not (vim.uv or vim.loop).fs_stat(repo_path) then
|
||||
vim.notify("Installing " .. plugin .. " " .. branch)
|
||||
local repo_url = "https://github.com/" .. plugin .. ".git"
|
||||
local out = vim.fn.system({
|
||||
"git",
|
||||
"clone",
|
||||
"--filter=blob:none",
|
||||
"--branch=" .. branch,
|
||||
repo_url,
|
||||
repo_path,
|
||||
})
|
||||
if vim.v.shell_error ~= 0 then
|
||||
vim.api.nvim_echo({
|
||||
{ "Failed to clone " .. plugin .. ":\n", "ErrorMsg" },
|
||||
{ out, "WarningMsg" },
|
||||
{ "\nPress any key to exit..." },
|
||||
}, true, {})
|
||||
vim.fn.getchar()
|
||||
os.exit(1)
|
||||
end
|
||||
end
|
||||
return repo_path
|
||||
end
|
||||
local lazy_path = ensure_installed("folke/lazy.nvim", "stable")
|
||||
local hotpot_path = ensure_installed("rktjmp/hotpot.nvim", "v0.14.6")
|
||||
-- As per Lazy's install instructions, but also include hotpot
|
||||
vim.opt.runtimepath:prepend({ hotpot_path, lazy_path })
|
||||
|
||||
-- You must call vim.loader.enable() before requiring hotpot unless you are
|
||||
-- passing {performance = {cache = false}} to Lazy.
|
||||
vim.loader.enable()
|
||||
|
||||
require("hotpot") -- Optionally you may call require("hotpot").setup(...) here
|
||||
|
||||
-- config defined in fnl
|
||||
require("config")
|
||||
|
||||
-- You must include Hotpot in your plugin list for it to function correctly.
|
||||
-- If you want to use Lazy's "structured" style, see the next code sample.
|
||||
require("lazy").setup({
|
||||
spec = {
|
||||
-- Add hotpot directly here
|
||||
{ "rktjmp/hotpot.nvim" },
|
||||
-- Then import your other plugins
|
||||
{ import = "plugins" },
|
||||
},
|
||||
})
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user