From f6af3b0902d58eb148b3a3fdbbd006ce4aa81083 Mon Sep 17 00:00:00 2001 From: Fazil Altinel Date: Mon, 20 Dec 2021 12:51:04 +0000 Subject: [PATCH] Add init.lua --- NvChad/init.lua | 55 +++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 55 insertions(+) create mode 100644 NvChad/init.lua diff --git a/NvChad/init.lua b/NvChad/init.lua new file mode 100644 index 0000000..bf3cced --- /dev/null +++ b/NvChad/init.lua @@ -0,0 +1,55 @@ +-- 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 { + "williamboman/nvim-lsp-installer", + config = function() + local lsp_installer = require "nvim-lsp-installer" + + lsp_installer.on_server_ready(function(server) + local opts = {} + + server:setup(opts) + vim.cmd [[ do User LspAttachBuffers ]] + end) + end, + } + use + { + "TimUntersberger/neogit", + requires = 'nvim-lua/plenary.nvim', + } +end) + +local neogit = require('neogit') +neogit.setup {} + +-- 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 \ No newline at end of file