summaryrefslogtreecommitdiff
path: root/.config/nvim/init.lua
blob: ee1370ecd67eb7d54fbbdd77089be6f1408167ad (plain)
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
local home   = vim.env.HOME
local config = home .. '/.config/nvim'
local root   = vim.env.USER == 'root'
local vi     = vim.v.progname == 'vi'

--------------------------------------------------------------------------
-- plugins

local packages = string.gmatch(vim.fn.glob(config .. "/pack/vendor/opt/*"), "[^\n]+")

for package in packages do
    local basename, _ = package:gsub("(.*/)(.*)", "%2")
    if vim.v.vim_did_enter == 1 then
        vim.cmd("packadd "  .. basename)
    else
        vim.cmd("packadd! " .. basename)
    end
end
vim.cmd("packadd termdebug")

--------------------------------------------------------------------------
-- commands

vim.cmd('filetype indent plugin on')
vim.cmd('syntax enable')

--------------------------------------------------------------------------
-- includes

require("settings")
require("theme")
require("function")
require("keybind")
require("lsp")
require("todo")