2022-02-19 21:21:55 -05:00
|
|
|
local settings=require("core.utils").load_config().options.nvChad
|
2021-08-22 03:49:15 -04:00
|
|
|
-- uncomment this if you want to open nvim with a dir
|
|
|
|
-- vim.cmd [[ autocmd BufEnter * if &buftype != "terminal" | lcd %:p:h | endif ]]
|
|
|
|
|
|
|
|
-- Use relative & absolute line numbers in 'n' & 'i' modes respectively
|
|
|
|
-- vim.cmd[[ au InsertEnter * set norelativenumber ]]
|
|
|
|
-- vim.cmd[[ au InsertLeave * set relativenumber ]]
|
|
|
|
|
|
|
|
-- Don't show any numbers inside terminals
|
2022-02-19 21:21:55 -05:00
|
|
|
if not settings.terminal_numbers then
|
|
|
|
vim.cmd [[ au TermOpen term://* setlocal nonumber norelativenumber | setfiletype terminal ]]
|
|
|
|
end
|
2021-08-22 03:49:15 -04:00
|
|
|
|
|
|
|
-- Don't show status line on certain windows
|
2022-04-08 23:04:35 -04:00
|
|
|
if not require("core.utils").load_config().plugins.options.statusline.hide_disable then
|
|
|
|
vim.cmd [[ autocmd BufEnter,BufRead,BufWinEnter,FileType,WinEnter * lua require("core.utils").hide_statusline() ]]
|
|
|
|
end
|
2021-08-22 03:49:15 -04:00
|
|
|
|
|
|
|
-- Open a file from its last left off position
|
|
|
|
-- vim.cmd [[ au BufReadPost * if expand('%:p') !~# '\m/\.git/' && line("'\"") > 1 && line("'\"") <= line("$") | exe "normal! g'\"" | endif ]]
|
|
|
|
-- File extension specific tabbing
|
|
|
|
-- vim.cmd [[ autocmd Filetype python setlocal expandtab tabstop=4 shiftwidth=4 softtabstop=4 ]]
|