2021-10-06 22:25:51 +01:00
|
|
|
-- This is where your custom modules and plugins goes.
|
2021-09-24 09:03:33 +01:00
|
|
|
-- See the wiki for a guide on how to extend NvChad
|
|
|
|
|
|
|
|
local hooks = require "core.hooks"
|
|
|
|
|
|
|
|
-- NOTE: To use this, make a copy with `cp example_init.lua init.lua`
|
|
|
|
|
|
|
|
--------------------------------------------------------------------
|
|
|
|
|
|
|
|
-- To modify packaged plugin configs, use the overrides functionality
|
|
|
|
-- if the override does not exist in the plugin config, make or request a PR,
|
|
|
|
-- or you can override the whole plugin config with 'chadrc' -> M.plugins.default_plugin_config_replace{}
|
2021-09-24 10:30:20 +01:00
|
|
|
-- this will run your config instead of the NvChad config for the given plugin
|
2021-09-24 09:03:33 +01:00
|
|
|
|
|
|
|
-- hooks.override("lsp", "publish_diagnostics", function(current)
|
|
|
|
-- current.virtual_text = false;
|
|
|
|
-- return current;
|
|
|
|
-- end)
|
|
|
|
|
|
|
|
-- To add new mappings, use the "setup_mappings" hook,
|
|
|
|
-- you can set one or many mappings
|
|
|
|
-- example below:
|
2021-09-24 10:30:20 +01:00
|
|
|
|
2021-09-24 09:03:33 +01:00
|
|
|
-- hooks.add("setup_mappings", function(map)
|
|
|
|
-- map("n", "<leader>cc", "gg0vG$d", opt) -- example to delete the buffer
|
|
|
|
-- .... many more mappings ....
|
|
|
|
-- end)
|
|
|
|
|
|
|
|
-- To add new plugins, use the "install_plugin" hook,
|
|
|
|
-- NOTE: we heavily suggest using Packer's lazy loading (with the 'event' field)
|
2021-09-24 10:30:20 +01:00
|
|
|
-- see: https://github.com/wbthomason/packer.nvim
|
2021-09-24 09:03:33 +01:00
|
|
|
-- examples below:
|
|
|
|
|
|
|
|
-- hooks.add("install_plugins", function(use)
|
|
|
|
-- use {
|
|
|
|
-- "max397574/better-escape.nvim",
|
|
|
|
-- event = "InsertEnter",
|
|
|
|
-- }
|
|
|
|
-- end)
|
|
|
|
|
|
|
|
-- alternatively, put this in a sub-folder like "lua/custom/plugins/mkdir"
|
|
|
|
-- then source it with
|
|
|
|
|
|
|
|
-- require "custom.plugins.mkdir"
|