init.lua 714 B

1234567891011121314151617181920212223
  1. -- Fuck off with the warnings...
  2. ---@diagnostic disable-next-line: duplicate-set-field
  3. vim.deprecate = function() end
  4. require("globals")
  5. require("config.options")
  6. require("config.remap")
  7. require("config.autocomands")
  8. require("config.lazy")
  9. vim.api.nvim_create_autocmd("VimEnter", {
  10. callback = function()
  11. local config_path = vim.fn.stdpath("config")
  12. local current_dir = vim.fn.getcwd()
  13. if current_dir == config_path then
  14. vim.fn.system("git config core.hooksPath .githooks")
  15. if vim.v.shell_error ~= 0 then
  16. vim.notify("Failed to set git hooks path for Neovim config", vim.log.levels.WARN)
  17. end
  18. end
  19. end,
  20. desc = "Set git hooks path for Neovim config directory only",
  21. })