-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathinit.lua
More file actions
47 lines (40 loc) · 1.09 KB
/
init.lua
File metadata and controls
47 lines (40 loc) · 1.09 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
vim.g.mapleader = ';'
local tools = require "tools.minimal"
local execute = vim.api.nvim_command;
local cmd = vim.cmd
require "shortcuts.minimal"
if tools.has_packer() then
execute("!git clone https://github.com/wbthomason/packer.nvim " .. tools.packer_path)
-- Evita que falle
os.remove(tools.config_path.."/plugin/packer_compiled.lua")
cmd "packadd packer.nvim"
require "plugins"
-- Esta función sirve únicamente cuándo
-- no está instalan packer ya que se
-- encarga de compilar los plugins y
-- de leer el archivo de configuración
_G.nv_on_complete = function()
cmd [[
augroup NvTemp
autocmd!
augroup END
]]
cmd "PackerCompile"
cmd ("luafile "..tools.config_path.."/init.lua")
end
-- De esta forma se puede saber cuándo packer terminó
-- de instalar
cmd [[
augroup NvTemp
autocmd!
autocmd User PackerComplete lua nv_on_complete()
augroup END
]]
cmd "PackerInstall"
else
require "config.settings"
require "config.appearance"
require "shortcuts.plugins"
require "config.commands"
require "config.autocmds"
end