summaryrefslogtreecommitdiff
path: root/pkgs/old-neovim/config/lua/autocommands.lua
diff options
context:
space:
mode:
authortriethyl <triethylammonium@pm.me>2025-07-13 14:55:40 -0400
committertriethyl <triethylammonium@pm.me>2025-07-13 14:55:40 -0400
commit121a0fc03742e878410d6c3b2548869c584dc232 (patch)
tree3d6206a61e356749f96eac97db122f4b9b8d0b4f /pkgs/old-neovim/config/lua/autocommands.lua
parent501d6994ac36a5824abf4f17f8dd95be034e3df9 (diff)
removed old-neovim
Diffstat (limited to 'pkgs/old-neovim/config/lua/autocommands.lua')
-rw-r--r--pkgs/old-neovim/config/lua/autocommands.lua36
1 files changed, 0 insertions, 36 deletions
diff --git a/pkgs/old-neovim/config/lua/autocommands.lua b/pkgs/old-neovim/config/lua/autocommands.lua
deleted file mode 100644
index 85a58c6..0000000
--- a/pkgs/old-neovim/config/lua/autocommands.lua
+++ /dev/null
@@ -1,36 +0,0 @@
--- Autocommands
-
--- Use relative line number in normal mode and absolute in insert mode
-vim.opt.number = true
-local numbertoggle = vim.api.nvim_create_augroup("numbertoggle", {})
-vim.api.nvim_create_autocmd(
- { "BufEnter", "FocusGained", "InsertLeave", "WinEnter", "CmdlineLeave" },
- {
- group = numbertoggle,
- callback = function()
- if vim.opt.number and vim.api.nvim_get_mode() ~= "i" then
- vim.opt.relativenumber = true
- end
- end,
- }
-)
-
-vim.api.nvim_create_autocmd(
- { "BufLeave", "FocusLost", "InsertEnter", "WinLeave", "CmdlineEnter" },
- {
- group = numbertoggle,
- callback = function()
- if vim.opt.number then
- vim.opt.relativenumber = false
- vim.cmd("redraw")
- end
- end,
- }
-)
-
- -- start terminal in insert mode
-vim.api.nvim_create_autocmd("TermOpen", {
- callback = function()
- vim.cmd "startinsert!"
- end,
-})