diff --git a/init.lua b/init.lua index 09313572..b6efa710 100644 --- a/init.lua +++ b/init.lua @@ -157,6 +157,11 @@ vim.opt.inccommand = 'split' -- Show which line your cursor is on vim.opt.cursorline = true +-- set default tab stop and shiftwitdth so we dont' get 8 space tabs +vim.opt.tabstop = 4 +vim.opt.shiftwidth = 4 +vim.opt.softtabstop = 4 + -- Minimal number of screen lines to keep above and below the cursor. vim.opt.scrolloff = 10 @@ -218,6 +223,24 @@ vim.api.nvim_create_autocmd('TextYankPost', { end, }) +vim.api.nvim_create_autocmd('TermOpen', { + group = vim.api.nvim_create_augroup('custom-term-open', { clear = true }), + callback = function() + vim.opt.number = false + vim.opt.relativenumber = false + end, +}) + +local job_id = 0 + +vim.keymap.set('n', 'st', function() + vim.cmd.vnew() + vim.cmd.term() + vim.cmd.wincmd 'J' + vim.api.nvim_win_set_height(0, 15) + job_id = vim.bo.channel +end, { desc = 'Opens [S]mall [T]erminal' }) + -- [[ Install `lazy.nvim` plugin manager ]] -- See `:help lazy.nvim.txt` or https://github.com/folke/lazy.nvim for more info local lazypath = vim.fn.stdpath 'data' .. '/lazy/lazy.nvim'