diff options
author | Justine Smithies <justine@smithies.me.uk> | 2025-02-05 18:41:48 +0000 |
---|---|---|
committer | Justine Smithies <justine@smithies.me.uk> | 2025-02-05 18:41:48 +0000 |
commit | 164933efe04e7f8ec78292f49067aee3777ed94b (patch) | |
tree | 6fc078384b292ea6a201a6700c1320be27056f91 | |
parent | f92494ff0d614cef57e22e0b476fb834e6d1b71d (diff) |
Updated so when entering a terminal from neovim, line numbers and the sign column are off.
-rw-r--r-- | .config/nvim/lua/config/autocmd.lua | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/.config/nvim/lua/config/autocmd.lua b/.config/nvim/lua/config/autocmd.lua index f0d84b5..ad7493f 100644 --- a/.config/nvim/lua/config/autocmd.lua +++ b/.config/nvim/lua/config/autocmd.lua @@ -6,10 +6,15 @@ autocmd('BufEnter', { command = "let &fcs='eob: '" }) --- Turn off line numbers on entering terminal -autocmd('TermOpen', { - pattern = '*', - command = 'setlocal nonumber norelativenumber' +-- Turn off line numbers and signcolumn on entering terminal +vim.api.nvim_create_autocmd("TermOpen", { + callback = function() + vim.opt_local.number = false + vim.opt_local.relativenumber = false + vim.opt_local.signcolumn = 'no' + end, + desc = "Disable line numbers and signcolumnn in terminal", + group = augroup, }) -- Insert mode on entering terminal |