-- Autocmds are automatically loaded on the VeryLazy event -- Default autocmds that are always set: https://github.com/LazyVim/LazyVim/blob/main/lua/lazyvim/config/autocmds.lua -- Add any additional autocmds here -- -- Set the keybind to choose the timer duration vim.api.nvim_set_keymap("n", "T", "lua choose_timer()", { noremap = true, silent = true }) -- TODO APP MAPPINGS vim.api.nvim_create_autocmd("BufReadPost", { pattern = "/tmp/task_edit.txt", callback = function() if vim.fn.line("$") == 1 and vim.fn.getline(1) == "" then vim.cmd("startinsert") end end, }) vim.api.nvim_create_autocmd("FileType", { pattern = "*", callback = function() if vim.fn.expand("%") == "/tmp/task_edit.txt" then vim.api.nvim_buf_set_keymap(0, "n", "", ":wq", { noremap = true, silent = true }) vim.api.nvim_buf_set_keymap(0, "i", "", ":wq", { noremap = true, silent = true }) end end, }) -- END TODO APP MAPPINGS -- -- vim.api.nvim_create_autocmd("User", { -- pattern = "BlinkCmpMenuOpen", -- callback = function() -- vim.b.copilot_suggestion_hidden = false -- end, -- })