mirror of
https://github.com/pratiktri/dotfiles.git
synced 2026-02-05 00:41:44 +05:30
plugins completely - Removed: dotnet with all related configs & plugins - Removed: `vim-highlightedyank` replaced with autocommand - Moved: `indent-blankline` from `code-generic` -> `ui` - Moved: All javascript plugins to `code-lsp`: WIP - Moved: `vim-easymotion` from `code-navigation` -> `navigation` - Renamed: `code-completion` -> `completion` - Renamed: `code-formatting` -> `formatting` - Renamed: `code-git` -> `git` - Renamed: `code-lint` -> `lint` - Renamed: `navigate-files` -> `navigation`
28 lines
936 B
Lua
28 lines
936 B
Lua
-- Auto reload existing session
|
|
if not vim.g.vscode then
|
|
vim.api.nvim_create_autocmd("VimEnter", {
|
|
group = vim.api.nvim_create_augroup("restore_session", { clear = true }),
|
|
callback = function()
|
|
-- If nvim started with arguments, do NOT restore
|
|
if vim.fn.argc() ~= 0 then
|
|
return
|
|
end
|
|
require("persistence").load()
|
|
end,
|
|
nested = true,
|
|
})
|
|
end
|
|
|
|
vim.api.nvim_create_autocmd("TextYankPost", {
|
|
desc = "Highlight when yanking text",
|
|
group = vim.api.nvim_create_augroup("highlight-yank", { clear = true }),
|
|
callback = function()
|
|
vim.highlight.on_yank({
|
|
higroup = "Visual", -- Highlight group to use
|
|
timeout = 400, -- Duration in milliseconds
|
|
on_visual = true, -- Highlight visual selections
|
|
on_macro = false, -- Don't highlight during macro playback
|
|
})
|
|
end,
|
|
})
|