From b4da4901382aebb948ff018d63f7206897287643 Mon Sep 17 00:00:00 2001 From: siduck Date: Fri, 19 Nov 2021 07:44:06 +0530 Subject: [PATCH] gitignore custom dir | add example configs --- .gitignore | 1 + examples/example_chadrc.lua | 13 +++++++++++ examples/example_init.lua | 39 ++++++++++++++++++++++++++++++++ lua/plugins/configs/nvimtree.lua | 1 - 4 files changed, 53 insertions(+), 1 deletion(-) create mode 100644 examples/example_chadrc.lua create mode 100644 examples/example_init.lua diff --git a/.gitignore b/.gitignore index 8cb205e..cfcf4e2 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,2 @@ plugin +custom/ diff --git a/examples/example_chadrc.lua b/examples/example_chadrc.lua new file mode 100644 index 0000000..e810f1c --- /dev/null +++ b/examples/example_chadrc.lua @@ -0,0 +1,13 @@ +-- This is an example chadrc file , its supposed to be placed in /lua/custom dir +-- lua/custom/chadrc.lua + +local M = {} + +-- make sure you maintain the structure of `core/default_config.lua` here, +-- example of changing theme: + +M.ui = { + theme = "gruvchad", +} + +return M diff --git a/examples/example_init.lua b/examples/example_init.lua new file mode 100644 index 0000000..5d08fd5 --- /dev/null +++ b/examples/example_init.lua @@ -0,0 +1,39 @@ +-- This is an example init file , its supposed to be placed in /lua/custom dir +-- lua/custom/init.lua + +-- 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, + +hooks.add("setup_mappings", function(map) + map("n", "cc", ":Telescope ", opt) + map("n", "q", ":q ", 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 + +-- Install plugins +-- To add new plugins, use the "install_plugin" hook, + +-- examples below: + +hooks.add("install_plugins", function(use) + use { + "max397574/better-escape.nvim", + event = "InsertEnter", + } + + use { + "user or orgname/reponame", + --further packer options + } +end) + +-- NOTE: we heavily suggest using Packer's lazy loading (with the 'event' field) +-- see: https://github.com/wbthomason/packer.nvim +-- https://nvchad.github.io/config/walkthrough diff --git a/lua/plugins/configs/nvimtree.lua b/lua/plugins/configs/nvimtree.lua index b4d3d17..22d2f41 100644 --- a/lua/plugins/configs/nvimtree.lua +++ b/lua/plugins/configs/nvimtree.lua @@ -9,7 +9,6 @@ local g = vim.g g.nvim_tree_add_trailing = 0 -- append a trailing slash to folder names g.nvim_tree_git_hl = git_status -g.nvim_tree_gitignore = 0 g.nvim_tree_highlight_opened_files = 0 g.nvim_tree_indent_markers = 1 g.nvim_tree_quit_on_open = 0 -- closes tree when file's opened