feat: initial release
CI / lint (push) Canceled after 0s
CI / test (push) Canceled after 0s

This commit is contained in:
swaits committed 2026-04-09 17:30:24 -06:00
commit 0b9ead7857
17 files changed
+251

No files matched your search

+23
View File
@@ -0,0 +1,23 @@
local M = {}
function M.setup(opts)
opts = opts or {}
local exclude = opts.exclude or { "gitcommit" }
vim.api.nvim_create_autocmd("BufReadPost", {
group = vim.api.nvim_create_augroup("tiny-lastplace", { clear = true }),
callback = function(event)
local buf = event.buf
if vim.tbl_contains(exclude, vim.bo[buf].filetype) or vim.b[buf].tiny_lastplace then
return
end
vim.b[buf].tiny_lastplace = true
local mark = vim.api.nvim_buf_get_mark(buf, '"')
local lcount = vim.api.nvim_buf_line_count(buf)
if mark[1] > 0 and mark[1] <= lcount then
pcall(vim.api.nvim_win_set_cursor, 0, mark)
end
end,
})
end
return M