-
Notifications
You must be signed in to change notification settings - Fork 0
/
init.lua
42 lines (35 loc) · 867 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
37
38
39
40
41
42
require("base")
local lazypath = vim.fn.stdpath("data") .. "/lazy/lazy.nvim"
local uv = vim.uv or vim.loop
-- Auto-install lazy.nvim if not present
if not uv.fs_stat(lazypath) then
print("Installing lazy.nvim....")
vim.fn.system({
"git",
"clone",
"--filter=blob:none",
"https://github.com/folke/lazy.nvim.git",
"--branch=stable", -- latest stable release
lazypath,
})
print("Done.")
end
vim.opt.rtp:prepend(lazypath)
require("lazy").setup({
spec = {
{ import = "plugins" },
},
dev = {
path = "~/Workspace/perso/nvim-plugins",
},
})
require("keymap")
local filetype_mapping = require("filetypes")
for filetype, patterns in pairs(filetype_mapping) do
vim.api.nvim_create_autocmd({ "BufNewFile", "BufRead" }, {
pattern = patterns,
callback = function()
vim.opt.filetype = filetype
end,
})
end