mirror of
https://github.com/tjdevries/advent-of-nvim.git
synced 2025-12-10 11:21:15 +00:00
start adding init.lua for people
This commit is contained in:
17
03 - Lua Crash Course/init.lua
Normal file
17
03 - Lua Crash Course/init.lua
Normal 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,
|
||||
})
|
||||
Reference in New Issue
Block a user