Skip to content

Commit ea528c2

Browse files
committed
misc changes
1 parent a269e21 commit ea528c2

File tree

2 files changed

+18
-0
lines changed

2 files changed

+18
-0
lines changed

init.lua

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1045,5 +1045,20 @@ require('lazy').setup({
10451045
},
10461046
})
10471047

1048+
local lastplace = vim.api.nvim_create_augroup('LastPlace', {})
1049+
vim.api.nvim_clear_autocmds { group = lastplace }
1050+
vim.api.nvim_create_autocmd('BufReadPost', {
1051+
group = lastplace,
1052+
pattern = { '*' },
1053+
desc = 'remember last cursor place',
1054+
callback = function()
1055+
local mark = vim.api.nvim_buf_get_mark(0, '"')
1056+
local lcount = vim.api.nvim_buf_line_count(0)
1057+
if mark[1] > 0 and mark[1] <= lcount then
1058+
pcall(vim.api.nvim_win_set_cursor, 0, mark)
1059+
end
1060+
end,
1061+
})
1062+
10481063
-- The line beneath this is called `modeline`. See `:help modeline`
10491064
-- vim: ts=2 sts=2 sw=2 et

lua/custom/plugins/init.lua

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -246,4 +246,7 @@ return {
246246
---@type render.md.UserConfig
247247
opts = {},
248248
},
249+
250+
-- catppuccin if i want
251+
{ 'catppuccin/nvim', name = 'catppuccin', priority = 1000 },
249252
}

0 commit comments

Comments
 (0)