-
Notifications
You must be signed in to change notification settings - Fork 1
/
init.lua
145 lines (136 loc) · 3.37 KB
/
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
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
-- This may be done automatically in the future (see https://github.com/neovim/neovim/pull/24044)
vim.loader.enable()
vim.g.mapleader = " "
vim.g.maplocalleader = "," -- TODO: I don't use this much. I should.
local lazy_path = vim.fn.stdpath("data") .. "/lazy/lazy.nvim"
vim.opt.rtp:prepend(lazy_path)
-- Loading shada is SLOW, so we're going to load it manually,
-- after UI-enter so it doesn't block startup.
local shada = vim.o.shada
vim.o.shada = ""
vim.api.nvim_create_autocmd("User", {
pattern = "VeryLazy",
callback = function()
vim.o.shada = shada
pcall(vim.cmd.rshada, { bang = true })
end,
})
-- package.preload["sidecar"] = function()
-- local path = conf_path .. "/lua/sidecar.so"
-- local lib = package.loadlib(path, "luaopen_sidecar")
-- if not lib then
-- vim.notify("sidecar.so not found.", vim.log.levels.WARN)
-- return
-- -- this could get annoying. I'd rather have an error I think.
-- -- once this module is more developed I will move it into a "plugin"
-- -- so lazy can manage it.
-- -- vim
-- -- .system({ "cargo", "build", "--release" }, {
-- -- cwd = conf_path,
-- -- timeout = 60000,
-- -- })
-- -- :wait()
-- -- vim.uv.fs_rename(conf_path .. "/target/release/libsidecar.so", path)
-- -- lib = package.loadlib(path, "luaopen_sidecar")
-- end
-- return lib()
-- end
require("willothy")
require("willothy.settings")
vim.api.nvim_create_autocmd("User", {
pattern = "VeryLazy",
callback = function()
require("willothy.autocmds")
require("willothy.keymap")
require("willothy.commands")
require("willothy.state")
require("willothy.line-numbers")
end,
})
require("lazy").setup({
{ import = "plugins.editor" },
{ import = "plugins.ui" },
{ import = "plugins.libraries" },
{ import = "plugins.lsp" },
{ import = "plugins.util" },
{
"willothy/minimus",
priority = 100,
config = function()
vim.cmd.colorscheme("minimus")
end,
event = "UiEnter",
},
-- {
-- "willothy/libsql-lua",
-- -- dir = "~/projects/rust/libsql-lua/",
-- lazy = false,
-- build = "build.lua",
-- },
"loganswartz/polychrome.nvim",
"folke/tokyonight.nvim",
"rebelot/kanagawa.nvim",
"eldritch-theme/eldritch.nvim",
"diegoulloao/neofusion.nvim",
"comfysage/evergarden",
"ray-x/aurora",
"vague2k/vague.nvim",
}, {
defaults = {
lazy = true,
cond = not vim.g.started_by_firenvim,
},
install = {
missing = true,
colorscheme = { "minimus" },
},
browser = "brave",
diff = {
cmd = "diffview.nvim",
},
ui = {
border = "solid",
},
dev = {
path = "~/projects/lua/",
},
-- profiling = {
-- loader = true,
-- require = true,
-- },
pkg = {
enabled = true,
-- dir = conf_path,
sources = {
"lazy",
"rockspec",
"packspec",
},
},
-- rocks = {
-- -- server = "https://nvim-neorocks.github.io/rocks-binaries",
-- },
performance = {
cache = {
enabled = true,
-- disable_events = { "UiEnter" },
},
reset_packpath = true,
rtp = {
reset = true,
disabled_plugins = {
"gzip",
"matchit",
"matchparen",
"netrwPlugin",
"tarPlugin",
"tohtml",
"tutor",
"zipPlugin",
"man",
"osc52", -- Wezterm doesn't support osc52 yet
"spellfile",
},
},
},
})