-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathinit.lua
80 lines (62 loc) · 1.85 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
-- Set up rocks.nvim
local rocks_config = vim.g.rocks_nvim or { -- g:rocks_nvim may have been set in bundle.lua
rocks_path = vim.fs.normalize("~/.local/share/nvim/rocks"),
}
vim.g.rocks_nvim = rocks_config
local luarocks_path = {
vim.fs.joinpath(rocks_config.rocks_path, "share", "lua", "5.1", "?.lua"),
vim.fs.joinpath(rocks_config.rocks_path, "share", "lua", "5.1", "?", "init.lua"),
}
package.path = package.path .. ";" .. table.concat(luarocks_path, ";")
local luarocks_cpath = {
vim.fs.joinpath(rocks_config.rocks_path, "lib", "lua", "5.1", "?.so"),
vim.fs.joinpath(rocks_config.rocks_path, "lib64", "lua", "5.1", "?.so"),
}
package.cpath = package.cpath .. ";" .. table.concat(luarocks_cpath, ";")
local rocks_rtp = {
rocks_config.rocks_path,
"lib",
"luarocks",
"rocks-5.1",
"rocks.nvim",
"*"
}
vim.opt.runtimepath:append(vim.fs.joinpath(unpack(rocks_rtp)))
-- Variables
-- remapping leader to comma
vim.g.mapleader = ","
-- See $VIMRUNTIME/ftplugin/markdown.vim
vim.g.markdown_recommended_style = 0
-- Modules
require("lbrayner.autocmds")
require("lbrayner.clipboard")
require("lbrayner.clojure")
require("lbrayner.coerce")
require("lbrayner.diagnostic")
require("lbrayner.diff")
require("lbrayner.flash")
require("lbrayner.highlight")
require("lbrayner.java")
require("lbrayner.lsp")
require("lbrayner.mappings")
require("lbrayner.marks")
require("lbrayner.options")
require("lbrayner.ripgrep")
require("lbrayner.statusline")
require("lbrayner.tab")
require("lbrayner.tabline")
require("lbrayner.user_commands")
require("lbrayner.vim_plugins")
require("lbrayner.wipe")
-- Source init files
local vim_dir = vim.fn.expand("<sfile>:p:h")
local files = {
vim.fs.joinpath(vim_dir, "local.lua"),
}
for _, init in ipairs(files) do
if vim.uv.fs_stat(init) then
vim.cmd.source(init)
end
end
-- Configure Neovim Lua plugins
require("lbrayner.setup")