diff --git a/init.lua b/init.lua index 6f88f84..7ad4f77 100644 --- a/init.lua +++ b/init.lua @@ -2,7 +2,9 @@ local cmd = vim.cmd -- to execute Vim commands e.g. cmd('pwd') local fn = vim.fn -- to call Vim functions e.g. fn.bufnr() local g = vim.g -- a table to access global variables local opt = vim.opt -- to set options +local utils = require('utils') +-------------------- PACKER -------------------------------- -- Auto install packer.nvim if not exists local install_path = fn.stdpath('data')..'/site/pack/packer/start/packer.nvim' if fn.empty(fn.glob(install_path)) > 0 then @@ -10,14 +12,16 @@ if fn.empty(fn.glob(install_path)) > 0 then vim.cmd 'packadd packer.nvim' end vim.cmd [[packadd packer.nvim]] -local utils = require('utils') --- Install plugins -require('plugins') -require('keymappings') --------------------- OPTIONS ------------------------------- +-------------------- EXTERNAL ------------------------------ +require('my_plugins') +require('my_keymappings') require('my_options') --------------------- AUTOCOMMANDS -------------------------- -require("autocommands") +require("my_autocommands") + +-- plugins +require('my_telescope') +require('my_lspinstall') +require('my_cmp') -------------------- TREE-SITTER --------------------------- require('nvim-treesitter.configs').setup({ ensure_installed = 'maintained', @@ -25,15 +29,8 @@ require('nvim-treesitter.configs').setup({ enable = true } }) - --------------------- TELESCOPE ----------------------------- -require('my_telescope') --------------------- LSP ----------------------------------- -require('my_lspinstall') -------------------- GITSIGNS ------------------------------ require('gitsigns').setup() --------------------- CMP ----------------------------------- -require('cmp_plug') -------------------- NVIM-TREE ----------------------------- require('nvim-tree').setup({ auto_close = true, diff --git a/lua/autocommands.lua b/lua/my_autocommands.lua similarity index 100% rename from lua/autocommands.lua rename to lua/my_autocommands.lua diff --git a/lua/cmp_plug.lua b/lua/my_cmp.lua similarity index 100% rename from lua/cmp_plug.lua rename to lua/my_cmp.lua diff --git a/lua/keymappings.lua b/lua/my_keymappings.lua similarity index 100% rename from lua/keymappings.lua rename to lua/my_keymappings.lua diff --git a/lua/plugins.lua b/lua/my_plugins.lua similarity index 100% rename from lua/plugins.lua rename to lua/my_plugins.lua