-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathinit.lua
48 lines (44 loc) · 993 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
43
44
45
46
47
48
_G.dd = function(...)
require("util").dump(...)
end
_G.bt = function(...)
require("util").bt(...)
end
_G.python_format = true
_G.lua_format = true
_G.go_format = true
vim.print = _G.dd
vim.dump = function(tbl, indent)
if not indent then
indent = 2
end
for k, v in pairs(tbl) do
local formatting = string.rep(" ", indent) .. k .. ": "
if type(v) == "table" then
print(formatting)
vim.dump(v, indent + 1)
elseif type(v) == "boolean" then
print(formatting .. tostring(v))
else
print(formatting .. v)
end
end
end
_G.lazyfile = { "BufReadPost", "BufNewFile", "BufWritePre" }
vim.g.mapleader = " " -- Make sure to set `mapleader` before lazy so your mappings are correct
vim.cmd([[
nmap > [
nmap < ]
omap > [
omap < ]
xmap > [
xmap < ]
]])
require("config.lazy")()
require("config.options")
require("config.autocmds")
require("config.keymaps")
if vim.g.neovide then
require("config.neovide")
end
require("util.profile")