This repository has been archived on 2025-10-10. You can view files and clone it. You cannot open issues or pull requests or push a commit.
Files
.nvim/init.lua

34 lines
706 B
Lua
Raw Permalink Normal View History

2024-04-09 11:36:32 -03:00
vim.g.mapleader = " "
vim.g.maplocalleader = " "
2023-10-30 14:45:32 -03:00
2024-04-09 11:36:32 -03:00
require("options")
2024-03-20 15:59:23 -03:00
2024-03-11 22:22:31 -03:00
local lazypath = vim.fn.stdpath("data") .. "/lazy/lazy.nvim"
2023-10-30 14:45:32 -03:00
if not vim.loop.fs_stat(lazypath) then
2024-03-20 15:59:23 -03:00
vim.fn.system({
"git",
"clone",
"--filter=blob:none",
"https://github.com/folke/lazy.nvim.git",
"--branch=stable", -- latest stable release
lazypath,
})
2023-10-30 14:45:32 -03:00
end
2024-03-11 22:22:31 -03:00
2024-04-09 11:36:32 -03:00
vim.opt.rtp:prepend(lazypath)
2023-10-30 14:45:32 -03:00
2024-04-09 11:36:32 -03:00
require("lazy").setup("pluginlist")
2023-10-30 14:45:32 -03:00
-- Custom keybindings
2024-04-09 11:36:32 -03:00
require("keymaps")
2023-10-30 14:45:32 -03:00
-- Highlight on yank
2024-04-09 11:36:32 -03:00
local highlight_group = vim.api.nvim_create_augroup("YankHighlight", { clear = true })
vim.api.nvim_create_autocmd("TextYankPost", {
2023-10-30 14:45:32 -03:00
callback = function()
2024-04-09 11:36:32 -03:00
vim.highlight.on_yank()
2023-10-30 14:45:32 -03:00
end,
group = highlight_group,
2024-04-09 11:36:32 -03:00
pattern = "*",
})