r/neovim • • 17d ago

Dotfile Review Monthly Dotfile Review Thread

16 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 • • 1d ago

101 Questions Weekly 101 Questions Thread

6 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 • • 18m ago

Plugin Updates to leblocks/toggle.nvim

Post image
5 Upvotes

It's been 9 months since I posted about my toggling plugin: Yet another toggle plugin leblocks/toggle.nvim : r/neovim

leblocks/toggle.nvim

I've added couple of new features since then:

  • Option to preserve cursor position after toggle
  • Toggling in visual selected text
  • End of word toggling
  • Mappings by filetype - different toggles based on a current file filetype

I hope that with the help of community we can build very good and rich default mappings that will cover most of toggling use cases. I myself more of a dotnet, and a powershell developer and tried to bring some defaults that seemed logical to me, but with help of the community that can be done muuuuch better.


r/neovim • • 1d ago

Random Neovim 0.12.7 released

Thumbnail
github.com
206 Upvotes

r/neovim • • 1d ago

Tips and Tricks Minimal mark picker

Post image
39 Upvotes

I'm using this tiny marks config (just 14 lines). What do you think? Is it better to just use the picker from Telescope/Fzf, or should we go with the barebones approach (:marks and m + LETTER)?

Anyway, I'm surprised by how easy it is to build a mark picker using the Neovim API!

-- set mark mLETTER
-- show marks sm

local function show_marks()
  local marks = vim.fn.getmarklist()
  local list = vim.tbl_map(function(m)
    return m.mark .. " -> " .. m.file
  end, marks)
  vim.ui.select(list, { prompt = "Marks" }, function(item, index)
    if index == nil then return end
    vim.cmd("normal! " .. marks[index].mark)
  end)
end

vim.keymap.set("n", "sm", show_marks)

r/neovim • • 1d ago

Plugin scaled_markdown.nvim

Thumbnail gallery
28 Upvotes

r/neovim • • 1d ago

Meme Monthly meme thread

4 Upvotes

Monthly meme thread


r/neovim • • 2d ago

Color Scheme Stencil: yet another Alabaster with ANSI colors

Thumbnail
gallery
26 Upvotes

Here is another theme inspired by Tonsky's Alabaster: Stencil. The main idea is to make color actually work by highlighting only what's important:

  • Green: type declarations
  • Red: function and method declarations
  • Blue: variable, field, and property declarations
  • Purple: constants
  • Cyan: strings
  • Yellow: comments

I run Neovim in Ghostty using native window splits, and keeping terminal and Neovim colorschemes in sync is annoying. Since this palette only needs a handful of colors anyway, I hooked the theme directly to the terminal's ANSI colors.

I don't use many plugins, so some highlight groups might be missing. Markdown is also intentionally unhighlighted since it's designed to be readable as plain text.

I've been using it for a week and I'm quite satisfied with it so far. The screenshots show it running with Ghostty's built-in Moonfly and Alabaster themes.

Contributions are welcome, or feel free to fork it and adjust it to your own taste.


r/neovim • • 3d ago

Need Help How do you navigate files in nvim?

87 Upvotes

I find it tedious to repeatedly press leader+ff to fuzzy find the file I'm looking for. I was wondering if there is any "nvim way" to do this better.


r/neovim • • 3d ago

Need Help Helix multicursor bindings for nvim 0.13

11 Upvotes

Have anyone managed to replicate the helix binds with s to add multicursors within selection?


r/neovim • • 4d ago

Plugin imselect.nvim – Your input method follows what you edit, not just your Vim mode

90 Upvotes

Hey r/neovim!

I'd like to share a plugin I've been working on: imselect.nvim.

As a Chinese speaker who also writes a lot of LaTeX, I often find myself switching between Chinese and ASCII several times without ever leaving Insert mode. Automatically switching to ASCII on Escape helps, but it only solves part of the problem.

So I built a plugin that takes both Vim modes and Tree-sitter syntax into account when switching input methods.

What it does:

  • Switches between ASCII and your input method as you move between code, comments, strings, and prose, even within Insert mode.
  • Handles LaTeX math environments, including text inside \text{...} and snippet field jumps.
  • Restores your input method for / and ? searches while keeping : commands in ASCII.
  • Supports Linux, macOS, Windows, WSL, Neovide, and even remote Neovim sessions over SSH through Kitty.

There's also a small design detail that I'm particularly happy with.

The plugin doesn't continuously enforce an input method state. Instead, it switches when the editing context changes or when necessary at mode boundaries. This was originally a performance optimization to avoid unnecessary IME queries, but it had a nice side effect: you can manually switch your input method without the plugin fighting you.

For example, you can manually switch to Chinese inside a code region, continue typing and using completion, and the plugin will leave your choice alone until the context changes. Press Escape, and you're back in ASCII.

The demo shows a continuous LaTeX editing session with zero manual input method switches. It's recorded using a real Fcitx5/Rime input method, not simulated text input.

GitHub: https://github.com/dirichy/imselect.nvim

I'd love to hear how other multilingual Neovim users handle input method switching, especially those using Japanese, Korean, or input methods I haven't had a chance to test.

Feedback, bug reports, and suggestions are very welcome!


r/neovim • • 4d ago

Discussion How does neovim handle keymap callbacks and commands?

19 Upvotes

Hello everyone. I have a couple of questions around what neovim does regarding the RHS arguments for keymaps.

Say I have a keymap set in a Lua ftplugin file, with an anonymous callback function defined as bellow:

vim.keymap.set({'n', 'v'}, '<leader>x', function() print("Hello There!") end, { buf = 0 })

As this is defined in a ftplugin file, a buffer local keymap to the anonymous callback should be created every time a Lua buffer is opened.

What I'm wondering is, is neovim or Lua smart enough to recognise that the callback is the same for every Lua buffer, and share the function between all of them? Or is neovim going to create a separate function for each buffer?

In a similar vein, if I have a keymap like vim.keymap.set({'n', 'v'},'j', 'gj'), will neovim parse the rhs string every time the keymap is triggered? Or does it store a function or something after the first parse?


r/neovim • • 4d ago

Need Help repeating keymaps when resizing buffers

7 Upvotes

So Neovim has built-in keymaps for resizing buffers: CTRL_W +, CTRL_W -, CTRl_W < and CTRL_W >. But when resizing a buffer I often need to use the same keymap multiple times because I didn't get the desired size from the first try.

Is there a way to remap these built-in keymaps so that if I press CTRL_W and then repeatedly press +, -. < or > it will repeatedly resize the buffer?


r/neovim • • 5d ago

Plugin dbout.nvim – A database client for Neovim and query with JSON results

35 Upvotes

Hey everyone!

I'd like to share a Neovim plugin I've been working on.

dbout.nvim is a Neovim plugin that helps you connect to databases, execute SQL queries, and display the results in JSON format.

Key Features

  • JSON Result Display: View query results in a structured JSON format for easy reading and native highlighting.
  • No More Connection Strings In Your Neovim Config: All your database connections are securely saved locally on your machine.
  • Buffer-Isolated Connections: Every database query buffer maintains its own isolated connection state.
  • SQL Autocompletion Support: Provide completion sources for completion plugins, enabling automatic suggestions for database tables and columns while writing queries.

Supported Databases

  • SQLite
  • PostgreSQL
  • MySQL
  • MSSQL
  • MongoDB

Why I Built This

I know there are already quite a few database client plugins for Neovim, so you might wonder why I decided to build another one.

The main reason comes from my own experience.

Most existing database clients display query results in traditional text tables. I personally find it frustrating when dealing with tables that have many columns. Having to scroll horizontally back and forth just to inspect the results makes the whole experience quite uncomfortable.

Instead of rendering query results as text tables, dbout.nvim displays all query results in JSON format.

I find JSON much easier to navigate and inspect, especially when working with wide tables.

It's a design choice based on my own workflow, and hopefully some of you will find it useful too.

and here is my repo: https://github.com/zongben/dbout.nvim


r/neovim • • 5d ago

Need Help Lazy configuration setup

11 Upvotes

Hi, coming from VSCode, I wanted to give Neovim a try as IDE for my work machine (Kubuntu). For the most part I am managing fine following this tutorial for the setup: https://www.youtube.com/watch?v=zHTeCSVAFNY&list=PLsz00TDipIffreIaUNk64KxTIkQaGguqn and changing/adapting configs that have changed in the meantime by google-ing my way through everything.
However there is one major thing I am unsure of:

Lazy suggests a structured setup, where every plugin is in a separate file. So my config structure looks like this atm:

└─$ tree
.
├── init.lua
├── lazy-lock.json
└── lua
   ├── config
   │   └── lazy.lua
   └── plugins
       ├── colorscheme.lua
       ├── telescope.lua
       └── treesitter.lua

4 directories, 6 files

The question is: Where to put plugin-configs? for example for telescope...is it best practice to put them into lazy.lua:

vim.keymap.set('n', '<C-p>', builtin.find_files, {})
vim.keymap.set('n', '<leader>fg', builtin.live_grep, {})

or into telescop.lua:

    keys = {
      { "<leader>ff", "<cmd>Telescope find_files<cr>", desc = "Find files" },
      { "<leader>fg", "<cmd>Telescope live_grep<cr>", desc = "Live grep" },
      { "<leader>fb", "<cmd>Telescope buffers<cr>", desc = "Find buffers" },
      { "<leader>fh", "<cmd>Telescope help_tags<cr>", desc = "Help tags" },
    },  

For me it would be generally feel cleaner to have settings for each plugin with it's separate file, but I am unsure.


r/neovim • • 6d ago

Plugin Automatically re-order members of struct in C to minimize waste

424 Upvotes

r/neovim • • 6d ago

Blog Post I tried writing neovim config by using example lua instead of LazyVim. This is a small blog post about how I did it!

Thumbnail
chish.dev
98 Upvotes

r/neovim • • 6d ago

Need Help HELP: Just to be sure about modelines

5 Upvotes

Hey everyone,
Does we agree that modelines are specific vim rules/options set inside a file ?
But how does compiler doesn't trigger error on a c file with modelines ?
I'm new to neovim, I want to understand what modelines does.


r/neovim • • 6d ago

Video Some thoughts after using Neovim for a few years

Thumbnail
youtube.com
94 Upvotes

A personal look at learning Neovim, from opening it for the “hacker vibes” to making it my main editor.

I talk about the hard parts, who Neovim is really for, the things worth trying, and the path I’d take if I started over. I’m no expert and I’m still learning, but if you’re curious about Neovim or already use it, there might be something useful here.


r/neovim • • 5d ago

Discussion Thoughts on using a vibe coded configuration?

0 Upvotes

Been using neovim for about 6 months now. I started off with LazyVim and tweaked it to my needs, then vibe coded a very barebones configuration from the ground up which I have been using for 4-5 months. So the new configuration is basically LazyVim with everything I didn't need stripped out. When I work, I usually have a codex terminal open and if I notice anything I don't like about my configuration, I just say the word and codex will fix it.

Recently, however, I've felt that my configuration feels incredibly unpolished, even though I'm very comfortable doing my day to day work in it. I was trying to emulate the feel of default vi, but the amount of features I use and random stuff I needed to add (for example, auto pairing for /* */ comments in c++)

Where would you recommend I go from here? Codex is certainly better at writing lua than I'll ever be, and much faster too. So any tweaks I make to a config will still be written by AI, probably. I was wondering, should I go back to LazyVim and configure it from there, or continue with my ground-up configuration? Thanks!


r/neovim • • 7d ago

Plugin Nana-Panels!

Post image
9 Upvotes

A small plugin with a few helpful features.

  • Browser: w3m, lynx or elinks in a panel. gx sends a URL to your real browser.
  • Terminal: a shell in a panel.
  • TODO: a small task list, saved between sessions.
  • Adaptive layout: side by side on a wide screen, a tabbed float on narrow one.
  • Hide, not kill: <leader>p hides the panels. Your shell and page keep running.
  • Uses your theme: colors come from your colorscheme, blackout mode included.
  • Custom panels: add your own with register_panel()

This has been a project I've worked on the last year or two. Decided to share it here. Just remove it if you hate it.

If interested, grab it here!

https://github.com/m4c4r0n1n/nana-panels.nvim


r/neovim • • 8d ago

Need Help Live preview of a Markdown file

28 Upvotes

Hello guys, I am new to neovim and I am looking for a plugin/a way to display a live preview of a Markdown document that I am editing in a split window.

Thanks in advance 🙏


r/neovim • • 8d ago

Need Help Plugin for managing SSH/VM connections from Neovim: list with live state (attached / idle / dropped), reattach, open terminals and edit remote files?

13 Upvotes

I'm looking for a way to manage remote connections (SSH hosts and local VMs) from inside Neovim. I want a panel or picker in Neovim that:

  • lists my hosts, from ~/.ssh/config and from ones I've used before
  • shows each connection's live state: open right now, idle but still attachable, dropped (network died) as opposed to cleanly exited, or just saved/recent
  • opens a terminal to a host with one key, and reattaches to the same shell later, even after I close the terminal buffer or restart Neovim
  • lets me browse and edit files on that host from the same list
  • can reconnect a dropped session, ideally in place

If there is none, I'll start building one and I'd appreciate guidance.


r/neovim • • 8d ago

101 Questions Weekly 101 Questions Thread

16 Upvotes

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

Let's help each other and be kind.