2021-12-02 15:12:10 +00:00
|
|
|
if require("init.first_load")() then
|
|
|
|
return
|
2021-02-23 11:27:32 +00:00
|
|
|
end
|
|
|
|
|
2021-11-05 19:58:26 +00:00
|
|
|
-- Allow `require('impatient')` to fail, in case plugins are not yet installed
|
2021-12-02 15:12:10 +00:00
|
|
|
_ = pcall(require, "impatient")
|
2021-11-05 19:58:26 +00:00
|
|
|
|
2021-12-01 12:28:12 +00:00
|
|
|
vim.cmd [[filetype plugin indent on]]
|
2021-03-30 14:17:37 +00:00
|
|
|
|
2021-02-23 11:27:32 +00:00
|
|
|
vim.api.nvim_exec('let $OVIMHOME = $HOME."/.vim"', false)
|
|
|
|
vim.api.nvim_exec('let $VIMHOME = $HOME."/.config/nvim"', false)
|
|
|
|
vim.api.nvim_exec('let $NVIMHOME = $HOME."/.local/share/nvim"', false)
|
|
|
|
vim.api.nvim_exec('let $VIMPLUGINS = expand($VIMHOME."/lua/personal/plugins.lua")', false)
|
|
|
|
|
|
|
|
-- Leader config to <Space>
|
2021-12-02 15:12:10 +00:00
|
|
|
vim.g.mapleader = " "
|
2021-02-23 11:27:32 +00:00
|
|
|
|
|
|
|
-- Globals taken from TJ config
|
|
|
|
-- Helpful for configuration
|
|
|
|
-- Might be removed in future version of NeoVim
|
2021-12-02 15:12:10 +00:00
|
|
|
require("init.globals")
|
2021-02-23 11:27:32 +00:00
|
|
|
|
2021-12-02 15:12:10 +00:00
|
|
|
require("init.plugins")
|
2021-02-23 11:27:32 +00:00
|
|
|
|
2021-12-02 15:12:10 +00:00
|
|
|
require("init.options")
|
2021-02-23 11:27:32 +00:00
|
|
|
|
2021-12-02 15:12:10 +00:00
|
|
|
require("lsp")
|
2021-02-23 11:27:32 +00:00
|
|
|
|
|
|
|
-- Colorscheme
|
2021-12-02 15:12:10 +00:00
|
|
|
vim.cmd("syntax on")
|
|
|
|
require("init.colors")
|
2021-02-23 11:27:32 +00:00
|
|
|
|
2021-12-02 15:12:10 +00:00
|
|
|
vim.api.nvim_set_keymap("n", "Q", "gq", {})
|
|
|
|
vim.api.nvim_set_keymap("i", "<C-U>", "<C-G>u<C-U>", {noremap = true})
|
2021-02-23 11:27:32 +00:00
|
|
|
|
2021-12-02 15:12:10 +00:00
|
|
|
vim.cmd("command! Wq :wq")
|
|
|
|
vim.cmd("command! W :w")
|
2021-02-23 11:27:32 +00:00
|
|
|
|
2021-12-02 15:12:10 +00:00
|
|
|
vim.api.nvim_set_keymap("n", "<Leader>c", ":ccl <bar> lcl<CR>", {noremap = true})
|
2021-02-23 11:27:32 +00:00
|
|
|
|
|
|
|
-- Allow recursive searches
|
2021-12-02 15:12:10 +00:00
|
|
|
vim.cmd("set path+=**")
|
2021-02-23 11:27:32 +00:00
|
|
|
|
|
|
|
-- automatically rebalance windows on vim resize
|
2021-12-02 15:12:10 +00:00
|
|
|
vim.cmd("autocmd VimResized * :wincmd =")
|