-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathinit.lua
38 lines (31 loc) · 994 Bytes
/
init.lua
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
--[[ init.lua ]]
-- LEADER
-- These keybindings need to be defined before the first /
-- is called; otherwise, it will default to "\"
vim.g.mapleader = ","
vim.g.localleader = "\\"
-- IMPORTS
require('vars') -- Variables
require('opts') -- Options
require('keys') -- Keymaps
require('plug') -- Plugins
-- PLUGINS
local function open_nvim_tree(data)
-- buffer is a real file on the disk
local real_file = vim.fn.filereadable(data.file) == 1
-- buffer is a [No Name]
local no_name = data.file == "" and vim.bo[data.buf].buftype == ""
if not real_file and not no_name then
return
end
-- open the tree, find the file but don't focus it
require("nvim-tree.api").tree.toggle({ focus = false, find_file = true, })
end
require('nvim-tree').setup{}
vim.api.nvim_create_autocmd({ "VimEnter" }, { callback = open_nvim_tree })
require('lualine').setup {
options = {
theme = 'dracula-nvim'
}
}
require('nvim-autopairs').setup{}