From 76905f6f0bf883a0cd536f4158f36e57a78c0e65 Mon Sep 17 00:00:00 2001 From: Rakshit Sinha Date: Mon, 2 Dec 2024 16:47:02 -0800 Subject: [PATCH] Added cmdHeight changes for RecordingEnter/Leave --- init.lua | 21 ++++++++++++++++----- 1 file changed, 16 insertions(+), 5 deletions(-) diff --git a/init.lua b/init.lua index 3100dbfc..0bcc04fa 100644 --- a/init.lua +++ b/init.lua @@ -24,7 +24,7 @@ If you experience any errors while trying to install kickstart, run `:checkhealt --]] -- The file rakshit/core/options.lua will be storing all the options that we want to save n our file -require('rakshit.core') +require("rakshit.core") -- Set to true if you have a Nerd Font installed and selected in the terminal vim.g.have_nerd_font = true @@ -35,15 +35,26 @@ vim.g.have_nerd_font = true -- Highlight when yanking (copying) text -- Try it with `yap` in normal mode -- See `:help vim.highlight.on_yank()` -vim.api.nvim_create_autocmd('TextYankPost', { - desc = 'Highlight when yanking (copying) text', - group = vim.api.nvim_create_augroup('kickstart-highlight-yank', { clear = true }), +vim.api.nvim_create_autocmd("TextYankPost", { + desc = "Highlight when yanking (copying) text", + group = vim.api.nvim_create_augroup("kickstart-highlight-yank", { clear = true }), callback = function() vim.highlight.on_yank() end, }) -require('rakshit.lazy') +vim.api.nvim_create_autocmd("RecordingEnter", { + callback = function() + vim.opt.cmdheight = 1 + end, +}) +vim.api.nvim_create_autocmd("RecordingLeave", { + callback = function() + vim.opt.cmdheight = 0 + end, +}) + +require("rakshit.lazy") -- The line beneath this is called `modeline`. See `:help modeline` -- vim: ts=2 sts=2 sw=2 et