-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathinit.lua
More file actions
90 lines (83 loc) · 3.1 KB
/
Copy pathinit.lua
File metadata and controls
90 lines (83 loc) · 3.1 KB
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
-- enable bytecode cache for lua files
vim.loader.enable()
-- -------- Actual configuration ---------
-- average startup time is estimated for:
-- - empty vim options
-- - vim opens a c++ header file with git changes and LSP errors
-- basic setup startup (msec): 16.10/16.15
require("user.base")
require("user.options")
require("user.keymaps")
require("user.autocmds")
require("user.news")
require("user.tree-climb")
-- Core plugins (loaded in all presets)
spec("user.colorscheme")
spec("user.whichkey")
spec("user.noice")
spec("user.fidget")
require("user.treesitter")
spec("user.lspconfig")
spec("user.todocomments")
spec("user.gitsigns")
spec("user.diffview")
spec("user.gitconflicts")
spec("user.navic")
spec("user.mini-statusline")
spec("user.cmp")
spec("user.autopairs")
spec("user.snippets")
spec("user.guess-indent")
spec("user.undo")
spec("user.markdown-toc")
spec("user.flash")
spec("user.outline")
spec("user.qf")
spec("user.oil")
spec("user.conform")
spec("user.trouble")
spec("user.refactoring")
spec("user.optional.colorizer")
spec("user.optional.dial")
spec("user.optional.csv")
spec("user.optional.typst")
spec("user.optional.cloack")
spec("user.optional.haunt")
spec("user.remote-nvim")
-- Full-only plugins (excluded from SSH due to latency/GUI dependencies)
spec("user.snacks", { "full" }) -- Heavy file scanning with latency
spec("user.image", { "full" }) -- Image rendering in-terminal
spec("user.img-clip", { "full" }) -- Clipboard/GUI-dependent
spec("user.project", { "full" }) -- Heavy directory scanning
spec("user.nvimtree", { "full" }) -- Large directory browsing over latency
spec("user.optional.tpipeline", { "full" }) -- Tmux statusline (moved to full-only)
spec("user.optional.cinnamon", { "full" }) -- Scrolling animations
spec("user.render-markdown", { "full" }) -- Heavy markdown rendering
spec("user.incline", { "full" }) -- Floating window decorations
spec("user.atlassian", { "full" }) -- jira & confluence client
-- Load user-config directory (for separate user repo integration)
-- Users can symlink their config repo to ~/.config/nvim/user-config/
local user_config_dir = vim.fn.stdpath("config") .. "/user-config"
local user_config_stat = vim.loop.fs_stat(user_config_dir)
if user_config_stat and user_config_stat.type == "directory" then
-- Add user-config to package path so modules can be required
package.path = user_config_dir .. "/?.lua;" .. user_config_dir .. "/?/init.lua;" .. package.path
-- Load init.lua from user-config if it exists
local user_init = user_config_dir .. "/init.lua"
if vim.loop.fs_stat(user_init) then
dofile(user_init)
end
-- Load all plugin specs from user-config/plugins/
local user_plugins_dir = user_config_dir .. "/plugins"
if vim.loop.fs_stat(user_plugins_dir) then
local files = vim.fn.glob(user_plugins_dir .. "/*.lua", false, true)
for _, file in ipairs(files) do
local ok, plugin_spec = pcall(dofile, file)
if ok and type(plugin_spec) == "table" then
table.insert(LAZY_PLUGIN_SPEC, plugin_spec)
end
end
end
end
-- lazy needs to be loaded last
require("user.lazy")