r/neovim

▲ 2 r/neovim

Toggle current and last used buffer

I know how to do this in vim, but i want to have a more robust way. Eg if i delete a buffer in vim the "previous" buffer is not deleted, and im back (vim reopens the buffer). Also i would want a denylist (eg. i dont want oil buffers to be "previous"). Ultimately i want a single keycombo to jump between the current and last used buffer.

Any plugins that handle this?

reddit.com
u/UnmaintainedDonkey — 2 hours ago
▲ 0 r/neovim

Zsh alias LSP problem

Hello everybody!

I have tried for like 1-2 hours and I do not know the reason, so I come here to you guys who are more experienced than me.

I have an alias in my `.zshrc` file to have instant access to the file from whatever I am. Like:

`alias config='nvim ~/.dotfiles/.zshrc'`

The problem is that my bashls is not activated using the alias, but if I `cd` to the directory first and then open the file, it works as expected. Why is that?

I suspect it is because of the `pwd`, but I am not really sure.

Anyone who can come with a solution?

Thanks!

reddit.com
u/NorskJesus — 14 hours ago
▲ 26 r/neovim

Avoiding the mouse?

How do you deal with the need to use the mouse when frequently switching to other applications like MS Teams, Azure DevOps, and others? Is the only solution really to keep moving your hand back and forth between the mouse and keyboard? thanks

reddit.com
u/hegardian — 1 day ago
▲ 8 r/neovim

If you use a plugin pack (Snacks, Mini, etc.), how many plugins do you use from it?

Personally i started with one plugin from mini and recently installed more as i found them to be quite good and i don’t need separate plugins i had installed.

View Poll

reddit.com
u/TheTwelveYearOld — 1 day ago
🔥 Hot ▲ 591 r/neovim

Tip: any single-byte character works as a pattern delimiter, not only /

u/pawelgrzybek — 2 days ago
🔥 Hot ▲ 181 r/neovim

New option: scrolloffpad

Some Vim and Neovim users over the years have wanted to be able to keep their cursor centered at the top and bottom of the buffer. :h 'scrolloff' explicitly did not allow for that. I recently had a PR accepted in Vim that was then pulled into Neovim that implemented cursor centering at EOB. To experiment with it, see :h 'scrolloffpad' in nightly. You can only try this in nightly right now. Hopefully, for users that like this feature, we no longer need plugins or autocommands. Please try it out :)

See the full issue for more information.

u/roku_remote — 1 day ago
▲ 11 r/neovim

Ty LSP and UV workspaces

Ty does not find the right virtual environment, when working with uv workspaces. It seems like it sets the root at the first pyproject.toml it finds and does not go further up to find the workspace root.

I have "unresolved imports" all over.

Does any one have experience with a config that enables ty to recognize the workspace?

I use nvim-lspconfig btw and auto enable ty with mason-lspconfig.

reddit.com
u/aala7 — 23 hours ago
▲ 12 r/neovim

Obsidian-like markdown spacing on headers/lists using autocmds

I use Obsidian for note-taking, but I also use Neovim for a lot of markdown files. My issue's been that I don't like how the markdown files (from Obsidian) look when I open them in Neovim, they're too cluttered and just a huge wall of solid text, and my bulleted lists are too flush against the left.

Simple post, but I love these two autocmds for adding header space and list left-side-padding using virtual text. It makes the Neovim markdown experience feel a lot more like how it looks from the Obsidian editor, with some overall space between sections, without having to change how I use Obsidian. I've still gotta play around, but sign_text could be used to set the '-' symbol for bulleted lists, I wonder if that's probably how some markdown plugins do it. I don't think there's a way to change row height for more/less spacing in a cell.

Images show before and after obsidian markdown file comparison, from within Neovim.

local ns_id = vim.api.nvim_create_namespace("vh_markdown_headers")
local function check_markdown_line_extmark(bufnum, linenum, linestr)
    if linestr:match("^#") then
        vim.api.nvim_buf_set_extmark(bufnum, ns_id, linenum, 0, {
            virt_lines = { {} },
            virt_lines_above = true,
        })

    elseif linestr:match("^- ") or linestr:match("^[ ]*- ") then
        vim.api.nvim_buf_set_extmark(bufnum, ns_id, linenum, 0, {
            virt_text = { {"  ", ""} },
            virt_text_pos = "inline",
            -- sign_text = "a"
        })
    end
end
autocmd("Filetype", {
    pattern = "markdown",
    callback = function(args)
        vim.api.nvim_buf_clear_namespace(0, ns_id, 0, -1)

        local lines = vim.api.nvim_buf_get_lines(args.buf, 1, -1, false)
        for i, line in ipairs(lines) do
            check_markdown_line_extmark(args.buf, i, line)
        end
    end,
})
autocmd({"TextChanged", "InsertLeave"}, {
    pattern = "*.md",
    callback = function(args)
        local curlinenum = vim.api.nvim_win_get_cursor(0)[1]
        vim.api.nvim_buf_clear_namespace(0, ns_id, curlinenum-1, curlinenum)

        check_markdown_line_extmark(args.buf, curlinenum-1, vim.fn.getline("."))
    end,
})
u/Vova____ — 14 hours ago
▲ 36 r/neovim

​A while back, this sub helped my open-source time tracker hit 500+ installs. Today, I’m releasing the v2.2 UI Overhaul (Bubbletea/Lipgloss, perfect grids, and a native Heatmap).

Hey everyone,

​A few months ago, I launched TakaTime—a cross-platform, open-source coding telemetry engine I built to track my programming habits without relying on paid or cloud-locked services. Thanks to the massive support and feedback from the community, we quickly scaled past 1200+ active installs!

​Today, I’m incredibly excited to share the v2.2 UI Polish Update.

​A lot of you pointed out that the original terminal dashboard would occasionally "break" or wrap weirdly if you resized your terminal window. For this release, I completely rewrote the rendering engine.

What's new in v2.2:

​Flawless Terminal UI: Rebuilt from the ground up using Charm's lipgloss bounding boxes. The layouts, paddings, and vertical separators now mathematically lock into place. You can squish and stretch your terminal, and the grid will remain perfectly aligned.

​Native 365-Day Heatmap: Dropped the old string-based space rendering for a strict, column-by-column chronological grid that maps your exact coding intensity over the last year.

​Way Smarter Tracking: We no longer rely purely on "file saves" to log time. The plugins now track active keystrokes with smart overlap deduplication on the Golang backend, giving a vastly more accurate picture of your actual time in the editor.

​Jupyter Notebooks & Antigravity: Added native tracking support for Jupyter Notebooks in VS Code, and yes, even the antigravity editor.

​GitHub README Integration: The backend can now auto-generate a sleek, formatted Markdown/PNG report to pin directly to your GitHub profile.

The Stack:

​Backend & CLI: Golang (using MongoDB for local/remote self-hosting)

​Dashboard: Bubble Tea & Lipgloss

​Plugins: Lua (Neovim) and JS (VS Code)

​I built this primarily to have a fast, keyboard-driven workflow that stays entirely out of the way while I code. If you want to own your own data and have a beautiful terminal dashboard to look at your weekly stats, I’d love for you to try it out.

​Links:

**​GitHub Repo**: https://github.com/Rtarun3606k/TakaTime

​VS Code Marketplace: https://marketplace.visualstudio.com/items?itemName=Rtarun3606k.takatime

Lua :

```

return {

"Rtarun3606k/TakaTime",

lazy = false,

config = function()

-- Optional: Enable debug mode if you run into issues

require("taka-time").setup({

debug = false

})

end,

}

```

​Massive shoutout to the contributors who have jumped in to help with PRs recently. Let me know what you think of the new UI, and I’m happy to answer any questions about the Bubbletea implementation or the Go backend!

u/tarunnayakaR — 19 hours ago
▲ 1 r/neovim

Project specific .nvim.lua file via exrc is not being sourced

Hello!

I want to use project specific .nvim.lua files, so I set vim.o.exrc = true and vim.o.secure = true in my Neovim configuration. Then I open neovim from the project, and execute :trust, and restart neovim. The issue is that the file is not being sourced automatically at startup. Am I doing something wrong?

EDIT:

It might be my config, because if I run neovim with NVIM_APPNAME from a config that literally only has the exrc options on, and I trust the project .nvim.lua, then it works. Anyone have a clue what it might be?

This is my Neovim config: https://github.com/diego-velez/nvim

SOLVED:

I was using the MiniMax way of structuring my config, and I had my options file in the plugin/ directory. Setting vim.o.exrc = true and vim.o.secure = true inside my init.lua directly fixed the problem.

u/DVT01 — 17 hours ago
▲ 1 r/neovim

How can I get the number of installed plugins in vim.pack?

Hello! I'm migrating from Lazy to vim.pack these days, and everything works really well for me except one thing: how can I get the number of installed plugins, or even better, loaded plugins? I usually display the number in my alpha dashboard, and with Lazy I could get it as simply as:

local stats = require("lazy").stats()
local total_plugins = stats.count

How can I achieve the same with vim.pack?

reddit.com
u/Striking_Theme_2535 — 22 hours ago
▲ 3 r/neovim

No highlights in .cpp file

I installed the newest neovim on my rocky 8 virtual machine and started with some plain init.lua configuration.

I added treesitter but I see no highlights at all in my text.

I have the following plugin setting

{

"nvim-treesitter/nvim-treesitter",

build = ":TSUpdate",

lazy = false,

config = function()

require("nvim-treesitter.config").setup({

ensure_installed = { "cpp", "c" },

highlight = { enable = true },

})

end,

}

I executed TSInstall cpp which worked. But TSModuleInfo is not recognized as a command.

reddit.com
u/terhajlito — 22 hours ago
▲ 7 r/neovim

I built a Neovim plugin that schedules your colorscheme like it’s a mission-critical system

intro comic

Started this back in 2024, and yesterday I finally gave it a proper TUI because apparently I have no sense of proportion.

👉 https://github.com/luxus/colorful-times-nvim

Colorful Times lets you:

  • switch colorschemes based on system mode (light/dark)
  • define time-based schedules (morning, evening, whatever your sleep cycle pretends to be)
  • set fallbacks if nothing matches
  • preview everything in a built-in TUI

The completely unnecessary part:

  • it has a full terminal UI with sections, filters, previews, editing… all for picking themes

The responsible part:

  • zero startup impact (async, no blocking)
  • no external dependencies

So yes, your editor can now follow a circadian rhythm like a well-adjusted organism.

Mine still doesn’t, but at least Neovim looks consistent while I’m making bad decisions at 03:00.

tui

reddit.com
u/ohailuxus — 19 hours ago
🔥 Hot ▲ 96 r/neovim

A humble but sincere appreciation post for Neovim

u/disperso — 2 days ago
▲ 15 r/neovim

visible_only mode — review only the diffs you care about | code-preview.nvim

When an AI agent refactors your codebase, it touches a lot of files. With visible_only mode, code-preview.nvim only opens a diff for files you already have open in Neovim — so you stay focused without context switching to files you don't care about.

Works with Claude Code and OpenCode today. Copilot CLI support coming soon.

Shoutout to kam-hak for contributing this feature!

Enable it with one command:

:CodePreviewToggleVisibleOnly

Or set it permanently in your config:

require("code-preview").setup({
  diff = { visible_only = true }
})

GitHub: https://github.com/Cannon07/code-preview.nvim

u/Cannon72001 — 1 day ago
▲ 46 r/neovim

Wayfinder.nvim guided code exploration from the current symbol

Been working on a Neovim plugin called Wayfinder and it finally got to the point where I’m actually enjoying it in my own workflow.

The idea is pretty simple:

Start on the symbol under your cursor, then open a centered picker that shows the most relevant nearby things, like:

  • definitions
  • callers
  • references
  • likely tests
  • recent commits

It’s not trying to replace Telescope or grep. For me it feels more like a faster, more guided way to move through code when I already know what I’m on and want to explore around it.

One of the things I wanted most was being able to keep a trail while exploring, instead of doing the usual jump / back / grep / jump / forget where I was loop.

Repo: https://github.com/error311/wayfinder.nvim

Appreciate any feedback or questions.

u/error311 — 2 days ago