diff options
| author | Tom Li Dobnik <tomlidobnik1@gmail.com> | 2026-03-03 18:46:16 +0100 |
|---|---|---|
| committer | Tom Li Dobnik <tomlidobnik1@gmail.com> | 2026-03-03 18:46:16 +0100 |
| commit | f7bbc5e6740f6199d7ed0fe704daaa7efd98c093 (patch) | |
| tree | d6cd8984dbf2a8a909f16dde865a19a343c31d48 /.config/nvim-old/lua/autocmds.lua | |
| parent | 1f156148fadab8468a46e598296b18b54f7860ce (diff) | |
nvim update
Diffstat (limited to '.config/nvim-old/lua/autocmds.lua')
| -rw-r--r-- | .config/nvim-old/lua/autocmds.lua | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/.config/nvim-old/lua/autocmds.lua b/.config/nvim-old/lua/autocmds.lua new file mode 100644 index 0000000..13f235c --- /dev/null +++ b/.config/nvim-old/lua/autocmds.lua @@ -0,0 +1,28 @@ +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, +}) + +vim.api.nvim_create_autocmd("FileType", { + pattern = { "gitcommit", "markdown" }, + callback = function(event) + vim.keymap.set("i", "`", "`", { buffer = event.buf }) + end, +}) + +vim.api.nvim_create_autocmd("InsertEnter", { + pattern = "*.md", + callback = function() + vim.opt.conceallevel = 0 + end, +}) + +vim.api.nvim_create_autocmd("InsertLeave", { + pattern = "*.md", + callback = function() + vim.opt.conceallevel = 3 + end, +}) |
