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 fn = vim.fn -- to call Vim functions e.g. fn.bufnr()
|
||||||
local g = vim.g -- a table to access global variables
|
local g = vim.g -- a table to access global variables
|
||||||
local opt = vim.opt -- to set options
|
local opt = vim.opt -- to set options
|
||||||
|
local utils = require('utils')
|
||||||
|
|
||||||
|
-------------------- PACKER --------------------------------
|
||||||
-- Auto install packer.nvim if not exists
|
-- Auto install packer.nvim if not exists
|
||||||
local install_path = fn.stdpath('data')..'/site/pack/packer/start/packer.nvim'
|
local install_path = fn.stdpath('data')..'/site/pack/packer/start/packer.nvim'
|
||||||
if fn.empty(fn.glob(install_path)) > 0 then
|
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'
|
vim.cmd 'packadd packer.nvim'
|
||||||
end
|
end
|
||||||
vim.cmd [[packadd packer.nvim]]
|
vim.cmd [[packadd packer.nvim]]
|
||||||
local utils = require('utils')
|
-------------------- EXTERNAL ------------------------------
|
||||||
-- Install plugins
|
require('my_plugins')
|
||||||
require('plugins')
|
require('my_keymappings')
|
||||||
require('keymappings')
|
|
||||||
-------------------- OPTIONS -------------------------------
|
|
||||||
require('my_options')
|
require('my_options')
|
||||||
-------------------- AUTOCOMMANDS --------------------------
|
require("my_autocommands")
|
||||||
require("autocommands")
|
|
||||||
|
-- plugins
|
||||||
|
require('my_telescope')
|
||||||
|
require('my_lspinstall')
|
||||||
|
require('my_cmp')
|
||||||
-------------------- TREE-SITTER ---------------------------
|
-------------------- TREE-SITTER ---------------------------
|
||||||
require('nvim-treesitter.configs').setup({
|
require('nvim-treesitter.configs').setup({
|
||||||
ensure_installed = 'maintained',
|
ensure_installed = 'maintained',
|
||||||
@ -25,15 +29,8 @@ require('nvim-treesitter.configs').setup({
|
|||||||
enable = true
|
enable = true
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
-------------------- TELESCOPE -----------------------------
|
|
||||||
require('my_telescope')
|
|
||||||
-------------------- LSP -----------------------------------
|
|
||||||
require('my_lspinstall')
|
|
||||||
-------------------- GITSIGNS ------------------------------
|
-------------------- GITSIGNS ------------------------------
|
||||||
require('gitsigns').setup()
|
require('gitsigns').setup()
|
||||||
-------------------- CMP -----------------------------------
|
|
||||||
require('cmp_plug')
|
|
||||||
-------------------- NVIM-TREE -----------------------------
|
-------------------- NVIM-TREE -----------------------------
|
||||||
require('nvim-tree').setup({
|
require('nvim-tree').setup({
|
||||||
auto_close = true,
|
auto_close = true,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user