u/Visual_Loquat_8242

▲ 102 r/neovim

select-undo.nvim update: core rewritten, you can now undo any line without losing newer changes

A while back I shared select-undo.nvim, a plugin to undo specific lines instead of the whole-buffer chronological undo. The early version had known bugs (reverting a line could impact its neighbor).

Finally after a year I got some time to make some changes. This update is a full rewrite of the core and it now works somewhat reliably (you guys can be the judge, because I might have tested in some bias scenarios).

What it does: edit line 10, then line 50. Native 'u' forces you to revert line 50 first. With this plugin you select line 10, press gu, and only that change reverts. Line 50 keeps your newer edit.

Mappings (visual mode):

- gu - revert the newest change in the selected lines; press again to step further back

- gU - revert the last change of every selected line in one press

- gC - revert only the selected characters, keeping other edits on the same line

What changed under the hood:

- Old version compared fixed line ranges across undo states, which broke when lines were inserted or deleted. Now it diffs each undo state and reverts only the hunks touching your selection

- A revert never touches lines outside your selection

- Each revert is one regular edit, so native u / Ctrl-r work on it as expected

- No more undo-tree pollution, works with undofile across sessions

- All mappings configurable

Repo: select-undo.nvim

Feedback and issues welcome. If you tried the old version and it bit you, this one is worth another look.

u/Visual_Loquat_8242 — 19 hours ago

Weird Flicker

I dont know if it is just me or something weird going on with everyone.
So the problem here is, there is a weird screen flicker when scrolling youtube.
Initially I thought is it my screen that is doing this. but this doesn't happen with other tabs.

Its very weird . Someone faced this issue or know any solution. Please help!

reddit.com
u/Visual_Loquat_8242 — 1 month ago
▲ 8 r/neovim

So I was using noice.nvim with catppuccin colorscheme and it looked great. but I recently switched to kanagawa coloscheme but the noice pop up looks weird now.

you can see the difference in the images attached.

Any suggestions what could be the issue?

my config for noice.

return {

	"folke/noice.nvim",

	event = "VeryLazy",

	\--opts = {

		\-- add any options here

	\--},

	dependencies = {

		\-- if you lazy-load any plugin below, make sure to add proper \`module="..."\` entries

		"MunifTanjim/nui.nvim",

		\-- OPTIONAL:

		\--   \`nvim-notify\` is only needed, if you want to use the notification view.

		\--   If not available, we use \`mini\` as the fallback

		"rcarriga/nvim-notify",

	},

	opts = {

		lsp = {

			\-- override markdown rendering so that \*\*cmp\*\* and other plugins use \*\*Treesitter\*\*

			override = {

\["vim.lsp.util.convert\_input\_to\_markdown\_lines"\] = true,

\["vim.lsp.util.stylize\_markdown"\] = true,

\["cmp.entry.get\_documentation"\] = true, -- requires hrsh7th/nvim-cmp

			},

		},

		\-- you can enable a preset for easier configuration

		presets = {

			\--bottom\_search = true, -- use a classic bottom cmdline for search

			\--command\_palette = true, -- position the cmdline and popupmenu together

			\--long\_message\_to\_split = true, -- long messages will be sent to a split

			\--inc\_rename = false, -- enables an input dialog for inc-rename.nvim

			lsp\_doc\_border = true, -- add a border to hover docs and signature help

		},

	},

  vim.keymap.set("n", "<leader>nd", "<cmd>NoiceDismiss<CR>", {desc = "Dismiss Noice Message"})

}

Post update

Issue resolved:

PS: you need to do the changes in the kanazawa plugin and not in noice

I had to do couple of tweaks as mentioned in this kanazawa plugin docs, not exactly same but as per my liking. Below is the kanazawa config.

return {
  "rebelot/kanagawa.nvim",
priority = 1000,
config = function()
require("kanagawa").setup({
overrides = function(colors)
local theme = colors.theme
return {
-- Stop the NormalFloat bleed
NormalFloat = { bg = "NONE" },
FloatBorder = { fg = theme.ui.special, bg = "NONE" },
FloatTitle = { fg = theme.ui.special, bg = "NONE" },

-- Command popup ( : )
NoiceCmdlinePopup = { bg = theme.ui.bg_p3 },
NoiceCmdlinePopupBorder = { fg = theme.ui.special, bg = theme.ui.bg_p3 },

-- Search popup ( / and ? ) - give it the same treatment
NoiceCmdlinePopupBorderSearch = { fg = theme.ui.special, bg = theme.ui.bg_p3 },

NoiceCmdlineIcon = { fg = theme.syn.fun },
NoiceCmdlineIconSearch = { fg = theme.syn.fun },
}
end,
})
vim.cmd.colorscheme("kanagawa-dragon")
end,

}
u/Visual_Loquat_8242 — 2 months ago