-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathinit.lua
More file actions
25 lines (20 loc) · 1.09 KB
/
init.lua
File metadata and controls
25 lines (20 loc) · 1.09 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
-- =============================================================================
-- Neovim Configuration - Config Picker
-- =============================================================================
-- Get the directory containing this file (follows symlinks)
local project_root = vim.fn.fnamemodify(debug.getinfo(1, "S").source:sub(2), ":p:h")
-- Add project root to runtime path FIRST
vim.opt.rtp:prepend(project_root)
-- Available configs
local available_configs = { "minimal", "balanced", "ide", "tpope-classic", "performance" }
local config_name = vim.env.NVIM_CONFIG or "balanced"
-- Build config path
local config_path = project_root .. "/options/" .. config_name .. ".lua"
if vim.fn.filereadable(config_path) == 0 then
vim.notify("Config not found: " .. config_name .. ".lua", vim.log.levels.ERROR)
vim.notify("Available configs: " .. table.concat(available_configs, ", "), vim.log.levels.WARN)
config_name = "balanced"
config_path = project_root .. "/options/" .. config_name .. ".lua"
end
vim.notify("Loading config: " .. config_name .. ".lua", vim.log.levels.INFO)
dofile(config_path)