This commit is contained in:
siduck 2022-01-07 19:58:05 +05:30
parent 799432e99e
commit 4e54ee0081
6 changed files with 26 additions and 49 deletions

View file

@ -1,5 +1,4 @@
-- This is an example chadrc file , its supposed to be placed in /lua/custom dir
-- lua/custom/chadrc.lua
-- This is an example chadrc file , its supposed to be placed in /lua/custom/
local M = {}
@ -7,7 +6,7 @@ local M = {}
-- example of changing theme:
M.ui = {
theme = "gruvchad",
theme = "onedark",
}
return M

View file

@ -1,28 +1,19 @@
-- This is an example init file , its supposed to be placed in /lua/custom dir
-- lua/custom/init.lua
-- This is an example init file , its supposed to be placed in /lua/custom/
-- This is where your custom modules and plugins go.
-- Please check NvChad docs if you're totally new to nvchad + dont know lua!!
local hooks = require "core.hooks"
-- MAPPINGS
-- To add new plugins, use the "setup_mappings" hook,
local map = require("core.utils").map
hooks.add("setup_mappings", function(map)
map("n", "<leader>cc", ":Telescope <CR>", opt)
map("n", "<leader>q", ":q <CR>", opt)
end)
-- NOTE : opt is a variable there (most likely a table if you want multiple options),
-- you can remove it if you dont have any custom options
map("n", "<leader>cc", ":Telescope <CR>")
map("n", "<leader>q", ":q <CR>")
-- NOTE: the 4th argument in the map function can be a table i.e options but its most likely un-needed so dont worry about it
-- Install plugins
-- To add new plugins, use the "install_plugins" hook,
local customPlugins = require "core.customPlugins"
-- examples below:
hooks.add("install_plugins", function(use)
customPlugins.add(function(use)
use {
"max397574/better-escape.nvim",
event = "InsertEnter",
@ -34,6 +25,6 @@ hooks.add("install_plugins", function(use)
}
end)
-- NOTE: we heavily suggest using Packer's lazy loading (with the 'event' field)
-- NOTE: we heavily suggest using Packer's lazy loading (with the 'event','cmd' fields)
-- see: https://github.com/wbthomason/packer.nvim
-- https://nvchad.github.io/config/walkthrough