feat: home-manager config files implemented

build not tested
This commit is contained in:
Sangmin Kim 2026-03-04 21:53:28 +09:00 committed by Poby
parent 248170c877
commit 54297f94fd
No known key found for this signature in database
44 changed files with 852 additions and 60 deletions

33
home/nvf/core/autocmds.nix Executable file
View file

@ -0,0 +1,33 @@
{lib, ...}: [
# autocmds
{
enable = true;
event = ["BufReadPost"];
desc = "Return to last cursor position";
group = "LastCursorGroup";
callback = lib.generators.mkLuaInline ''
function()
local mark = vim.api.nvim_buf_get_mark(0, '"')
local line_count = vim.api.nvim_buf_line_count(0)
if mark[1] > 0 and mark[1] <= line_count then
pcall(vim.api.nvim_win_set_cursor, 0, mark)
end
end
'';
}
{
enable = true;
event = ["TextYankPost"];
desc = "Highlight yanks on copy";
group = "HighlightYank";
pattern = ["*"];
callback = lib.generators.mkLuaInline ''
function()
vim.hl.on_yank({
higroup = "IncSearch",
timeout = 250,
})
end
'';
}
]