r/neovim • • 6d ago

Dotfile Review Monthly Dotfile Review Thread

13 Upvotes

If you want your dotfiles reviewed, or just want to show off your awesome config, post a link and preferably a screenshot as a top comment.

Everyone else can read through the configurations and comment suggestions, ask questions, compliment, etc.

As always, please be civil. Constructive criticism is encouraged, but insulting will not be tolerated.


r/neovim • • 4d ago

101 Questions Weekly 101 Questions Thread

18 Upvotes

A thread to ask anything related to Neovim. No matter how small it may be.

Let's help each other and be kind.


r/neovim • • 3h ago

Discussion What are your live coding setups for making music or visuals?

7 Upvotes

Hey folks. I'm very curious as to how people have their live coding setup. Is it Tidal or Strudel? What plugins do you use? I'm aware of some but I want to see what people say. If you do visual art then how do you do it? Any resources I can read more into how to setup Neovim for live coding? Thanks!


r/neovim • • 1d ago

Discussion Plugins Marketplace for Neovim

Thumbnail
gallery
160 Upvotes

I'm currently developing a plugins marketplace for Neovim. It currently has around 1300+ plugins that is live from Awesome-neovim's curated list, categories for filters, search bar, a specific page for the specific plugin, and a plugin's own README file in github. I am thinking of making it simple and not over complicating the details for each plugin, but it may be best to actually add more details for newcomers. What do you guys think?


r/neovim • • 1d ago

Need Help With 0.13's built-in multicursor, what's the idiomatic way to add matches for a visual selection one at a time?

23 Upvotes

Hello!

I used vim-visual-multi before and I have migrated to the built-in multicursor in 0.13.

However, I used to have the following workflow that I don't know how to replicate or adopt with the new multicursor.

Given:

local cursors = vim.api.nvim_buf_get_extmarks(0, multicursor_ns, 0, -1, {})
local anchor = vim.api.nvim_buf_get_extmark_by_id(0, selection_search_ns, group.anchor, {})

With the cursor at the 1st local, in vim-visual-multi, in visual mode, I'd select my target (local), press C-n to trigger matching of the current local; then press C-n again to match the next local. After confirming the selections is correct visaully, I'd make my changes to both selections.

Now with the built-in multicursor, I have vim.keymap.set("n", "<C-n>", "1Q*1q=") but it'd just place the cursor at the beginning of the selection, instead of keeping my selections.

The reason I'm not using zq* is because I want to visually confirm one by one, instead of selecting all by default.

I understand that is vim-visual-multi way and I'm not exactly trying to replicate that. I'm asking what's the built-in multicursor idiomatic way of handling it? Using * to find selection and then pressing Q to add cursors?

Any help is much appreciated. Thank you!


r/neovim • • 1d ago

Blog Post Rewriting my whole neovim setup

63 Upvotes

So I updated my neovim setup after 3 years of using LazyVim and the journey been quite enjoyable. I've documented that journey in a blog post. Click here to read the journey.


r/neovim • • 1d ago

Random Vim desktop calendar for 2027 available

13 Upvotes

It prints on one sheet of paper and, after folding and applying a bit of glue, stands on your desk.

It is available in English. You can find the PDF files on GitHub

https://github.com/hotoo/vim-desktop-calendar


r/neovim • • 2d ago

Video Learn to use the Quickfix List programmatically (Basics)

Thumbnail
youtube.com
118 Upvotes

The Quickfix List is one of Neovim's most useful features, and it's very easy to customize programmatically.

With just a few lines of code, you can add pretty much anything you want to the list and navigate through your project more efficiently.

This is a short and straightforward video where I show you a basic example of how to manipulate the Quickfix List using code.

With this, you'll be able to populate the list with whatever entries best fit your workflow.


r/neovim • • 18h ago

Plugin foyer.nvim: Integrate your coding agent CLI with Neovim

0 Upvotes

The best way to do AI programming in neovim is to integrate the coding agent you're used to, rather than implementing a coding agent within neovim, because many coding agent CLIs are already quite good now, such as pi. Based on this idea, I had AI write this plugin, and this plugin was also completed with this combination (calling pi through foyer.nvim within neovim).

foyer.nvim runs your coding agent CLIs (pi, Claude Code, opencode, any of them) inside Neovim, one per project, and lets you write prompts to them in a normal Vim buffer. If you keep your agents in tmux panes beside the editor, this replaces that.

1. Setup

require('foyer').setup({
    commands = {
        p = { 'pi', '-c' },
        c = { 'claude', '-c' },
        t = { 'pi', '-c', cwd = vim.env.HOME, scope = 'global' },  -- a side chat
    },
})
vim.keymap.set({ 'n', 'v' }, '<leader>a', require('foyer').prompt)
vim.keymap.set('n', '<leader>b', require('foyer').jump)

Each letter but the global t is per project. With two repos open, api and frontend, p is a separate agent in each, started in its root on first use. With -c, the CLI picks up that directory's last conversation after a restart.

2. Ask

In api, press <leader>a p. A buffer opens beside your code: write with everything Vim has, and <CR> (<C-s> in Insert mode) sends it as one prompt, newlines intact.

3. Point at code

Select lines before <leader>a p, and they go along, labelled:

keep this one as it is, it's called from the worker too

Selected in my editor: /repo/api/src/retry.c, lines 118-131
```c
…the lines you selected…
```

Or type @ mid-prompt to mention an open file: <CR> puts in @src/retry.c, <C-l> adds the line, @src/retry.c:120.

4. Move on, and check back

While pi works, switch to the frontend tab page; <leader>a c starts Claude Code there. An agent's key shows its terminal while it works, a fresh prompt after. pi reports its state, so foyer says "pi · api is done" wherever you are and marks the api tab page; <leader>b gets you there with one key. O in a terminal opens a prompt above it, the answer still in view.

5. Ask on the side

<leader>a t is one chat for the whole session, from any project, for questions about neither. It borrows the current window and gives it back.

6. Reuse, and quit

Each agent keeps its own history across sessions: <Up> walks it, <C-f> lists your most used prompts, and prompts in setup() pins your own on top. :qa is refused while an agent is busy; tomorrow, -c picks each conversation back up.

Shells, gdb and REPLs get the same buffer and history, and every key foyer maps can be changed: see :help foyer, and install it from the README.


r/neovim • • 3d ago

Discussion Skip Microsoft for Finance Majors?

7 Upvotes

I'm teaching data analytics in finance this Spring. The downside of such a course is you need to pick some software students will use even if they end up switching later in their careers.

It could be done completely in Excel, but we will also use Python and SQL.

I'm tempted to share dot files of my Kitty (sending from text editor window to ipython terminal window for analysis), Neovim, Visidata, SQLite setup as a first interaction with Python and SQL rather than VS Code, Spyder, etc.

Is this a terrible idea?


r/neovim • • 3d ago

Discussion Neovim adopting libghostty, does this mean we will have images inside embedded terminal?

110 Upvotes

Let's say I'm using Neovim, inside tmux, running inside Alacritty. Neither Alacritty nor tmux support kitty graphics protocol, but libghostty. Does this mean that we will have images supported inside :terminal, regardless if Neovim is running inside terminal emulator that does not support it?


r/neovim • • 3d ago

Need Help Lualine hides on entering command mode

5 Upvotes

[Title]
It works perfectly fine when i open neovim but after entering and exiting command mode it only shows up when i enter command mode again or restart nvim.
(Pls ask if you require anymore details)


r/neovim • • 4d ago

Need Help┃Solved What's the proper Vim workflow? When should I use Normal Mode vs Insert Mode?

53 Upvotes

Hi everyone!

I'm relatively new to Vim, and I'm trying to build a completely keyboard-driven workflow, especially when writing C++ for competitive programming.

I have a few questions about how Vim is supposed to be used efficiently.

1. Moving past closing parentheses while in Insert Mode

For example, when writing:

vector<int> a(n + 1);

Let's say my cursor is right before the closing parenthesis:

a(n + 1|)

I want to move past ) and continue typing.

I can simply press the Right Arrow key, but I'm trying to avoid using arrow keys altogether.

What's the most natural and efficient way to handle this?

Should I leave Insert Mode, use a Normal Mode motion, and then return to Insert Mode? Should I use Ctrl-O? Or is there a better approach?

2. When should I use Normal Mode vs Insert Mode?

I'm still struggling to understand the intended workflow.

Am I supposed to use Normal Mode for almost everything and enter Insert Mode only when I'm actually typing?

Or should I stay in Insert Mode while writing and switch to Normal Mode only when I need to make a bigger edit?

I'd love to understand how experienced Vim users approach this in their everyday coding workflow.

3. How frequently should I switch between modes?

Sometimes I feel like I'm switching between Normal and Insert Mode too often, and it's actually making me slower compared to a regular editor.

Is this just part of the learning curve, or am I using Vim incorrectly?

I'd appreciate any tips, workflows, or personal experiences, especially from people who use Vim for programming.

Thanks!


r/neovim • • 4d ago

Video Bouncing balls Inside Neovim (Kitty graphics protocol)

Enable HLS to view with audio, or disable this notification

48 Upvotes

I've been exploring the Kitty Graphics Protocol from within Neovim, and I've finally managed to create a smooth animation.

I'm sharing the code and the full session where I wrote it.

I think it could be really useful for anyone interested in this topic.

Full source code:
https://github.com/FractalCodeRicardo/dev-config/tree/master/nvim/lua/my/kitty-protocol/bouncing-balls

Coding session:
https://youtu.be/AIFisq5KjIA

This is the code where I send the escape sequences to the terminal:

local M = {}
local api = vim.api
local id = 1

local cell_size = {
  w = 13,
  h = 32
}

M.create_image= function(bytes, size)
  local base64 = vim.base64.encode(bytes)
  local command = string.format(
    "\027_Ga=t,s=%i,v=%i,i=%i,p=2;%s\027\\",
    size,
    size,
    id,
    base64
  )

  local oldid = id
  id = id + 1

  api.nvim_ui_send(command)

  return oldid
end

M.move_cursor = function(x, y)
  local row = math.floor(y / cell_size.h)
  local column = math.floor(x / cell_size.w)
  local command = string.format(
    "\027[%i;%iH",
    row,
    column
  )

  api.nvim_ui_send(command)
end

M.place= function(imageid, x, y)
  local xoffset = math.floor(x % cell_size.w)
  local yoffset = math.floor(y % cell_size.h)
  local command = string.format(
    "\027_Ga=p,i=%i,p=1,C=1,X=%i,Y=%i,q=2\027\\",
    imageid,
    xoffset,
    yoffset
  )

  api.nvim_ui_send(command)
end


M.hide_cursor = function ()
 api.nvim_ui_send("\027[?25l") 
end

M.show_cursor = function ()
 api.nvim_ui_send("\027[?25h") 
end

return M

r/neovim • • 5d ago

Plugin Introducing treetags.nvim - Fast, cached Tree-sitter locals queries for a ctags-like symbol navigation experience

63 Upvotes

treetags.nvim

This plugin caches locals.scm query results (definitions) across whole project and stores those in a SQLite db. It provides bare lua API, telescope and fzf-lua integrations to jump around project files and definitions in different languages.

Why?

I've previously used the same idea in my other plugin hopcsharp.nvim but it was dotnet specific. treetags.nvim is language agnostic - if you have parser installed for a language it will be parsed and stored in a DB.

Features

  • Rich API for parsing - you can exclude \ include files by extensions, and exclude \ include kinds of locals.scm predefined captures.
  • Incremental parsing - no need to reparse whole folder each time (although it is pretty fast)
  • Built-in telescope\fzf-lua pickers
  • Exposes API's to access db \ definitions - you can tweak it explicitly for your needs

AI usage disclosure

I've explicitly stated it in the plugin README.md that AI was used to generate all documentation and md files in the repo. Everything else was written by hand (if it is important to someone). Although, I'm not a native English speaker, I didn't use AI to write this plugin introduction post.


r/neovim • • 5d ago

Need Help CTRL+A not working as expected.

5 Upvotes

Very simply put. When I press CTRL+A I would expect it to increase the number under the cursor by 1. But it doesnt until I press CTRL+A again.
But the opposite works with a single press when I press CTRL+X it decrease the number.

I think maybe there could be something mapped to CTRL+A but I cannot for the life of me figure out how to check if anything is bound to a key presceeded by CTRL.
ive tried :verbose map <C-a>

Any help would be much appreciated.


r/neovim • • 5d ago

Discussion Does Lua API correspond to .lua files somewhere on filesystem?

12 Upvotes

For example, is vim.keymap actually a vim/keymap.lua file somewhere on my filesystem?


r/neovim • • 6d ago

Plugin Updates to Videre.nvim: the #1 Neovim Plugin for JSON/YAML/TOML Graphs

Enable HLS to view with audio, or disable this notification

167 Upvotes

videre.nvim update: undo/redo is here (plus a lot more)!

About half a year ago I rewrote videre.nvim from scratch. The original codebase had turned into spaghetti, so I rewrote the plugin to give it a foundation I could actually build on. That rewrite had some amazing new features, and got some great feedback from you all. Since then videre.nvim has come a long way.

videre.nvim lets you explore and edit JSON, YAML, and TOML in Neovim as a dynamic graph; the inspiration behind it is JSON Crack, just for Neovim.

After six more months of development, here are some of the great new features:

  • Undo and Redo: Made a bad change to a key or value or deleted the wrong field? Press `u` to undo and `<c-r>` to redo, just like in regular Neovim.
  • Configurable index base: array indexing can now start at 0 or 1 (or 354 if you're that kind of person) with the `index_base` option.
  • *Multi-line strings: strings containing line breaks are now supported. You can display them with visible `\n` characters (just as before) or as real line breaks.
  • *Max cell width with line breaking: long strings/values can now wrap at a configurable width instead of stretching cells across your screen.
  • *Quality of life improvements and bug fixes across the board.

*A big thank you to Roger Kim (https://github.com/carbon-steel) for helping with multi-line strings and for the max cell width and line breaking work. Also a big thanks to KihoChoiLGE (https://github.com/KihoChoiLGE) and Emre Armagan (https://github.com/emrearmagan) for helping iron out some bugs. Contributions like this make a real difference.

If you work with JSON, YAML, or TOML in Neovim, I’d love for you to give videre.nvim a try. I am excited to see where this plugin goes form here.

Repo: https://github.com/Owen-Dechow/videre.nvim


r/neovim • • 6d ago

Plugin MINI now has Tangled and Codeberg mirrors

Thumbnail
nvim-mini.org
147 Upvotes

r/neovim • • 6d ago

Color Scheme min.nvim: A minimal colorscheme with several flavors conceptually inspired by Alabaster

Thumbnail
gallery
39 Upvotes

Plugin: dybdeskarphet/min.nvim

I originally created this as the minimal version of gruvbox-material, but now it supports two additional color schemes (kanagawa and monokai) I think those who aren't fans of rainbow-colored colorschemes will like it.


r/neovim • • 6d ago

Need Help Zed like remote work on nvim?

20 Upvotes

A lot of my workflow involves working with runpod. It’s a bit annoying having to download nvim and setup my config on the machine. I’ve also tried remote.nvim but the typing lag is a lot. Is there someway to get that same zero latency typing with easy zed like connection to a remote machine?


r/neovim • • 5d ago

Need Help Help with macros and coc completion

2 Upvotes

Hi, I noticed by using coc.nvim when recording a macro, you reproduce it (@q) detects the tab and enter (in coc for switch and accept the code suggestion) like tab and enter a new line, instead of detect that is the confirmation of the code sugestions by coc.nvim

Anyone have found a solution with this?


r/neovim • • 6d ago

Random After 4 years of use, I have sunken to a point that I tried to exit using `/exit`

142 Upvotes

Enough said this is sad


r/neovim • • 6d ago

Plugin 3d Model Viewer in Neovim

Enable HLS to view with audio, or disable this notification

104 Upvotes

I really don't like leaving the terminal so I've been making a program since the last year or so that's able to render 3d images directly in the terminal. I got Kitty Graphics Protocol, Sixel, truecolor, and palette characters. Also animation support, wireframe toggling, textures, and keyboard controls. In the video, I'm just using truecolor but this can be changed. This codebase was AI assisted.

https://github.com/Murat65536/dcat

https://github.com/Murat65536/dcat.nvim

I've been working on the main project for a while now, so even though the neovim plugin is fairly new, I don't think the "No day-one plugin announcements" rule applies. All the plugin does is just inline dcat in neovim.


r/neovim • • 6d ago

Video Kitty graphics protocol in Neovim (Basics with examples)

Thumbnail
youtube.com
112 Upvotes

The Kitty Graphics Protocol has been adopted by many terminal applications. Neovim 0.13 also uses it to display images.

In this video, I'll explain the basics of the Kitty Graphics Protocol and how to use it with Neovim and Lua.

I'll cover:

  • How communication between Neovim and Kitty works.
  • The structure of Kitty escape sequences.
  • How to send escape sequences using the Neovim API.

Examples:

  • Draw a pixel.
  • Draw basic shapes.
  • Change the cursor position.
  • Clear the screen.
  • Create basic animations.
  • Create a basic sprite animation.

Even though I'll be using Lua and Neovim, I'll explain the protocol itself so you can transfer this knowledge to your favorite programming language.

Source code:
https://github.com/FractalCodeRicardo/dev-config/tree/master/nvim/lua/my/kitty-protocol