From c1e372e2cd4723f6259aff413e063d5b4995ecc5 Mon Sep 17 00:00:00 2001 From: zbirenbaum Date: Sat, 19 Feb 2022 21:21:55 -0500 Subject: [PATCH] fix autocmd breaking term plugins --- lua/core/autocmds.lua | 5 ++++- lua/core/default_config.lua | 1 + 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/lua/core/autocmds.lua b/lua/core/autocmds.lua index ab20601..362f0d3 100644 --- a/lua/core/autocmds.lua +++ b/lua/core/autocmds.lua @@ -1,3 +1,4 @@ +local settings=require("core.utils").load_config().options.nvChad -- uncomment this if you want to open nvim with a dir -- vim.cmd [[ autocmd BufEnter * if &buftype != "terminal" | lcd %:p:h | endif ]] @@ -6,7 +7,9 @@ -- vim.cmd[[ au InsertLeave * set relativenumber ]] -- Don't show any numbers inside terminals -vim.cmd [[ au TermOpen term://* setlocal nonumber norelativenumber | setfiletype terminal ]] +if not settings.terminal_numbers then + vim.cmd [[ au TermOpen term://* setlocal nonumber norelativenumber | setfiletype terminal ]] +end -- Don't show status line on certain windows vim.cmd [[ autocmd BufEnter,BufRead,BufWinEnter,FileType,WinEnter * lua require("core.utils").hide_statusline() ]] diff --git a/lua/core/default_config.lua b/lua/core/default_config.lua index 2901cfa..876b93b 100644 --- a/lua/core/default_config.lua +++ b/lua/core/default_config.lua @@ -34,6 +34,7 @@ M.options = { copy_del = true, -- copy deleted text ( dd key ), visual and normal mode insert_nav = true, -- navigation in insertmode window_nav = true, + terminal_numbers = false, -- updater update_url = "https://github.com/NvChad/NvChad",