init.lua 595 B

12345678910111213141516171819
  1. require("globals")
  2. require("config.options")
  3. require("config.remap")
  4. require("config.autocomands")
  5. require("config.lazy")
  6. vim.api.nvim_create_autocmd("VimEnter", {
  7. callback = function()
  8. local config_path = vim.fn.stdpath("config")
  9. local current_dir = vim.fn.getcwd()
  10. if current_dir == config_path then
  11. vim.fn.system("git config core.hooksPath .githooks")
  12. if vim.v.shell_error ~= 0 then
  13. vim.notify("Failed to set git hooks path for Neovim config", vim.log.levels.WARN)
  14. end
  15. end
  16. end,
  17. desc = "Set git hooks path for Neovim config directory only",
  18. })