2021-07-04 11:01:15 -05:00
|
|
|
vim.g.vimdir = os.getenv('XDG_CONFIG_HOME') .. '/nvim'
|
2021-05-31 22:17:04 -05:00
|
|
|
|
|
|
|
-- TODO: learn about the wildmenu `q:`
|
2021-06-13 11:02:27 -05:00
|
|
|
-- TODO: what is `let &fcs = 'eob: '` for?
|
2021-06-01 22:29:17 -05:00
|
|
|
|
2021-06-13 11:02:27 -05:00
|
|
|
require('plugins').setup()
|
|
|
|
require'options'
|
|
|
|
require'keymap'
|
2021-07-04 11:01:15 -05:00
|
|
|
require('fold').setup()
|
|
|
|
-- require('lsp').setup()
|
|
|
|
require('statusline').setup()
|
|
|
|
|
2021-07-06 00:53:57 -05:00
|
|
|
function Dbg(a, d)
|
|
|
|
if d == nil then d = 0 end
|
|
|
|
if type(a) == 'table' then
|
|
|
|
local s = '{\n'
|
|
|
|
local indent = string.rep(' ', d)
|
|
|
|
for k,v in pairs(a) do
|
|
|
|
s = s .. ' ' .. indent .. tostring(k) .. '=' .. Dbg(v, d+1) .. '\n'
|
|
|
|
end
|
|
|
|
return s .. '\n' .. indent .. '}'
|
|
|
|
elseif type(a) == 'string' then
|
|
|
|
return a
|
|
|
|
elseif type(a) == 'number' then
|
|
|
|
return tostring(a)
|
|
|
|
else
|
|
|
|
return 'type:'..type(a)..',tostring:'..tostring(a)
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
2021-07-04 11:01:15 -05:00
|
|
|
local plugin_setups = {
|
|
|
|
telescope = {
|
|
|
|
defaults = {
|
2021-07-06 00:53:57 -05:00
|
|
|
prompt_prefix = "",
|
2021-07-04 11:01:15 -05:00
|
|
|
mappings = {i = {['c-u'] = false, ['c-d'] = false}},
|
|
|
|
generic_sorter = require('telescope.sorters').get_fzy_sorter,
|
|
|
|
file_sorter = require('telescope.sorters').get_fzy_sorter,
|
|
|
|
}
|
|
|
|
},
|
|
|
|
}
|
2021-06-13 11:02:27 -05:00
|
|
|
|
2021-07-04 11:01:15 -05:00
|
|
|
for k,v in pairs(plugin_setups) do
|
|
|
|
if type(v) == 'function' then
|
|
|
|
v(require(k))
|
|
|
|
elseif type(v) == 'table' then
|
|
|
|
require(k).setup(v)
|
|
|
|
elseif type(v) == 'string' then
|
|
|
|
require(k)[v]()
|
|
|
|
elseif v == true then
|
|
|
|
require(k)
|
2021-06-13 11:02:27 -05:00
|
|
|
end
|
|
|
|
end
|