start adding init.lua for people

This commit is contained in:
TJ DeVries
2024-12-03 03:09:26 -05:00
parent 3d3c6fc3b9
commit cbfbcd96e5
4 changed files with 17 additions and 0 deletions

View File

@@ -0,0 +1,17 @@
-- Day 3
print("advent of neovim")
vim.keymap.set("n", "<space><space>x", "<cmd>source %<CR>")
vim.keymap.set("n", "<space>x", ":.lua<CR>")
vim.keymap.set("v", "<space>x", ":lua<CR>")
-- 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 }),
callback = function()
vim.highlight.on_yank()
end,
})