diff options
author | sefidel <contact@sefidel.net> | 2022-02-10 00:24:03 +0900 |
---|---|---|
committer | sefidel <contact@sefidel.net> | 2022-02-10 00:24:03 +0900 |
commit | 72d448e384249103748ee83b587c45924e4bc44d (patch) | |
tree | 2aa05a6aaf8c7aa37a8c278fd2fede6e62ff2218 /init.lua | |
download | nvimrc-72d448e384249103748ee83b587c45924e4bc44d.tar.gz nvimrc-72d448e384249103748ee83b587c45924e4bc44d.zip |
Initial commit
Diffstat (limited to 'init.lua')
-rw-r--r-- | init.lua | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/init.lua b/init.lua new file mode 100644 index 0000000..07f792e --- /dev/null +++ b/init.lua @@ -0,0 +1,35 @@ +local ok, impatient = pcall(require, "impatient") +if ok then + impatient.enable_profile() +else + vim.notify(impatient) +end + +local fmt = string.format +local run = vim.api.nvim_command + +vim.opt.shadafile = "NONE" + +local function assert_installed(repo, type) + local _, _, pack_name = string.find(repo, [[%S+/(%S+)]]) + local install_path = vim.fn.stdpath("data") .. "/site/pack/packer/" .. (type or "start") .. "/" .. pack_name + if vim.fn.empty(vim.fn.glob(install_path)) ~= 0 then + print(fmt("Pack '%s' not found, cloning to %s", pack_name, install_path)) + vim.fn.system { + "git", + "clone", + "https://github.com/" .. repo, + install_path + } + run(fmt("packadd %s", pack_name)) + end +end + +assert_installed("wbthomason/packer.nvim") +assert_installed("rktjmp/hotpot.nvim") + +require("hotpot").setup { provide_require_fennel = true } + +vim.opt.termguicolors = true + +require("nvrc.ignite") |