refactor(config): use local.lua for machine-specific paths

- Load local.lua at startup and expose via vim.g.cargdev_local
- Update avante.lua to use local config for paths and settings
- Update ideaMap.lua to use IDEA_DIR from local config
- Remove all hardcoded user paths from plugin configs
- Plugins gracefully skip if required local config is missing
This commit is contained in:
2026-01-10 23:14:04 -05:00
parent 537c0c4a41
commit ebb7ed7793
6 changed files with 69 additions and 19 deletions

View File

@@ -1,3 +1,11 @@
-- Get local config (loaded in core/init.lua)
local local_cfg = vim.g.cargdev_local or {}
-- Skip plugin if IDEA_DIR is not configured
if not local_cfg.IDEA_DIR then
return {}
end
return {
"CarGDev/ideadrop.nvim",
name = "ideaDrop",
@@ -7,7 +15,7 @@ return {
},
config = function()
require("ideaDrop").setup({
idea_dir = vim.env.IDEA_DIR,
idea_dir = vim.g.cargdev_local.IDEA_DIR,
})
-- Set up convenient keymaps for ideaDrop