Some refactoring
This commit is contained in:
parent
f7c5812c9e
commit
c5646fef8e
25
init.lua
25
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,
|
||||
|
Loading…
x
Reference in New Issue
Block a user