chore: update lazy-lock and disable cursor restore autocmd

This commit is contained in:
sankalp committed 2025-11-10 22:53:44 +05:45
1 parent 41d21efd1e
commit bdb6cdb3ee
3 files changed
+66 -66

No files matched your search

+4 -4
View File
@@ -15,9 +15,9 @@
"lazygit.nvim": { "branch": "main", "commit": "2305deed25bc61b866d5d39189e9105a45cf1cfb" },
"lspsaga.nvim": { "branch": "main", "commit": "8efe00d6aed9db6449969f889170f1a7e43101a1" },
"markdown-preview.nvim": { "branch": "master", "commit": "a923f5fc5ba36a3b17e289dc35dc17f66d0548ee" },
"markview.nvim": { "branch": "main", "commit": "d72e1bd8634f7abad68a77ad3c6f97342c09ae0a" },
"markview.nvim": { "branch": "main", "commit": "31f9a2611e0f373d19281c129b9a40272c124d26" },
"mason-conform.nvim": { "branch": "main", "commit": "48da2ebd5efbaf8a99566eadc3ece82d523f03c5" },
"mason-lspconfig.nvim": { "branch": "main", "commit": "d6274160025ceac91ee46db7db664d5c699a214d" },
"mason-lspconfig.nvim": { "branch": "main", "commit": "b1d9a914b02ba5660f1e272a03314b31d4576fe2" },
"mason-nvim-lint": { "branch": "main", "commit": "767b8ccdddaa977bec8987fd7507b9865a279235" },
"mason.nvim": { "branch": "main", "commit": "ad7146aa61dcaeb54fa900144d768f040090bff0" },
"mdx.nvim": { "branch": "main", "commit": "464a74be368dce212cff02f6305845dc7f209ab3" },
@@ -33,10 +33,10 @@
"nvim-ts-context-commentstring": { "branch": "main", "commit": "1b212c2eee76d787bbea6aa5e92a2b534e7b4f8f" },
"nvim-ufo": { "branch": "main", "commit": "72d54c31079d38d8dfc5456131b1d0fb5c0264b0" },
"promise-async": { "branch": "main", "commit": "119e8961014c9bfaf1487bf3c2a393d254f337e2" },
"snacks.nvim": { "branch": "main", "commit": "c558857d0794b08e88b8f7db98e0bf198a2e9a6d" },
"snacks.nvim": { "branch": "main", "commit": "dec29f55666f8f4545835636077a86b150faf630" },
"tiny-code-action.nvim": { "branch": "main", "commit": "7aaa18eea993cc5796c6128702eaedc05e55f6e8" },
"tiny-inline-diagnostic.nvim": { "branch": "main", "commit": "08e65d82d48416ab140b3dea26eea4fb9739bc47" },
"todo-comments.nvim": { "branch": "main", "commit": "411503d3bedeff88484de572f2509c248e499b38" },
"todo-comments.nvim": { "branch": "main", "commit": "31e3c38ce9b29781e4422fc0322eb0a21f4e8668" },
"toggleterm.nvim": { "branch": "main", "commit": "50ea089fc548917cc3cc16b46a8211833b9e3c7c" },
"undotree": { "branch": "master", "commit": "0f1c9816975b5d7f87d5003a19c53c6fd2ff6f7f" },
"uv.nvim": { "branch": "main", "commit": "be4a7d47a976249282bb2f71fc773ac2f5325973" },
+13 -13
View File
@@ -46,19 +46,19 @@ vim.api.nvim_create_autocmd({ 'VimResized' }, {
-- })
-- restore cursor to file position in previous editing session
vim.api.nvim_create_autocmd('BufReadPost', {
callback = function(args)
local mark = vim.api.nvim_buf_get_mark(args.buf, '"')
local line_count = vim.api.nvim_buf_line_count(args.buf)
if mark[1] > 0 and mark[1] <= line_count then
vim.api.nvim_win_set_cursor(0, mark)
-- defer centering slightly so it's applied after render
vim.schedule(function()
vim.cmd('normal! zz')
end)
end
end,
})
-- vim.api.nvim_create_autocmd('BufReadPost', {
-- callback = function(args)
-- local mark = vim.api.nvim_buf_get_mark(args.buf, '"')
-- local line_count = vim.api.nvim_buf_line_count(args.buf)
-- if mark[1] > 0 and mark[1] <= line_count then
-- vim.api.nvim_win_set_cursor(0, mark)
-- -- defer centering slightly so it's applied after render
-- vim.schedule(function()
-- vim.cmd('normal! zz')
-- end)
-- end
-- end,
-- })
-- open help in vertical split
vim.api.nvim_create_autocmd('FileType', {
+49 -49
View File
@@ -1,64 +1,64 @@
local options = {
ai = true,
clipboard = "unnamedplus", -- use system clipboard
number = true,
relativenumber = true,
undofile = true, -- save state of file on write
undodir = vim.fn.stdpath("cache") .. "/undo",
undolevels = 10000,
autoread = true, -- autoread changes from other sources
signcolumn = "yes",
cursorline = true,
cursorlineopt = "number",
wrap = false,
scrolloff = 3,
ruler = false, -- removes cursor position from lastline
pumheight = 10, -- size of completion window
showmode = false, -- do not show mode under statusline
swapfile = false, -- creates a swapfile
backup = false, -- creates a backup file
writebackup = false, -- do not edit backups
winminwidth = 5, -- Minimum window width
termguicolors = true, -- set term gui colors (most terminals support this)
showtabline = 0, -- always show tabs
showcmd = false,
mouse = "a", -- allow the mouse to be used in neovim
confirm = true, -- Confirm to save changes before exiting modified buffer
ai = true,
clipboard = 'unnamedplus', -- use system clipboard
number = true,
relativenumber = true,
undofile = true, -- save state of file on write
undodir = vim.fn.stdpath('cache') .. '/undo',
undolevels = 10000,
autoread = true, -- autoread changes from other sources
signcolumn = 'yes',
cursorline = true,
cursorlineopt = 'number',
wrap = false,
scrolloff = 3,
ruler = false, -- removes cursor position from lastline
pumheight = 10, -- size of completion window
showmode = false, -- do not show mode under statusline
swapfile = false, -- creates a swapfile
backup = false, -- creates a backup file
writebackup = false, -- do not edit backups
winminwidth = 5, -- Minimum window width
termguicolors = true, -- set term gui colors (most terminals support this)
showtabline = 0, -- always show tabs
showcmd = false,
mouse = 'a', -- allow the mouse to be used in neovim
confirm = true, -- Confirm to save changes before exiting modified buffer
-- tabs
smarttab = true,
tabstop = 4, -- 1 tab represented as 4 spaces
expandtab = true, -- <tab> key will create " " instead of "\t"
shiftwidth = 4, -- indent change after backspace and >> <<
softtabstop = 4, -- number of spaces instead of tab
autoindent = true, -- auto indent
smartindent = true, -- make indenting smarter again
list = true,
-- listchars = { trail = "", tab = "", nbsp = "_", extends = ">", precedes = "<" }, -- highlight
showbreak = string.rep(" ", 3),
-- tabs
smarttab = true,
tabstop = 4, -- 1 tab represented as 4 spaces
expandtab = true, -- <tab> key will create " " instead of "\t"
shiftwidth = 4, -- indent change after backspace and >> <<
softtabstop = 4, -- number of spaces instead of tab
autoindent = true, -- auto indent
smartindent = true, -- make indenting smarter again
list = true,
-- listchars = { trail = "", tab = "", nbsp = "_", extends = ">", precedes = "<" }, -- highlight
showbreak = string.rep(' ', 3),
-- Search
ignorecase = true,
smartcase = true,
hlsearch = true,
wildmenu = true,
wildmode = "longest:full,full",
wildoptions = "pum",
-- Search
ignorecase = true,
smartcase = true,
hlsearch = true,
wildmenu = true,
wildmode = 'longest:full,full',
wildoptions = 'pum',
-- Window
splitright = true,
splitbelow = true,
title = true,
-- Window
splitright = true,
splitbelow = true,
title = true,
}
for k, v in pairs(options) do
vim.opt[k] = v
vim.opt[k] = v
end
vim.g.loaded_netrw = 1
vim.g.loaded_netrwPlugin = 1
vim.opt.path:append({ "**" })
vim.opt.path:append({ '**' })
vim.opt.shortmess:append({ W = true, I = true, c = true }) -- disable greeting
-- Fix markdown indentation settings