-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathinit.lua
36 lines (32 loc) · 1001 Bytes
/
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
vim.g.mapleader = " "
local env_file = vim.fn.expand("~/.config/nvim/.env")
if vim.fn.filereadable(env_file) == 1 then
for line in io.lines(env_file) do
local key, value = line:match("([^=]+)=(.+)")
if key and value then
vim.fn.setenv(key, value)
end
end
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
-- Add lazy to the `runtimepath`, this allows us to `require` it.
---@diagnostic disable-next-line: undefined-field
vim.opt.rtp:prepend(lazypath)
-- Set up lazy, and load my `lua/custom/plugins/` folder
require("lazy").setup({ import = "config/plugins" }, {
change_detection = {
notify = false,
},
})
require("config.autocmds")
require("config.keymaps")
require("config.options")
require("personal.git")