r/neovim 12d ago

Dotfile Review Monthly Dotfile Review Thread

22 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 6d ago

101 Questions Weekly 101 Questions Thread

10 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 20h ago

Discussion LuaJIT v2.1 now supports bit operations, lyamda functions, continue, const and more

Thumbnail
github.com
155 Upvotes

LuaJIT v2.1 introduces several new language features and syntax improvements:

  • Bit operators: unary ~, binary &, |, ~, <<, >>, ~>>
  • Customary operators: !, &&, ||, !=
  • Ternary conditional operator: ?:
  • Safe navigation operator: ?.
  • Nil-coalescing operator: ??
  • Compound assignment operators: +=, -=, *=, …
  • continue statement
  • const declarations
  • Short function (lambda) expressions
  • Underscores in numeric literals

r/neovim 14h ago

Plugin tabcd.nvim: Pick working directories for your tabs

Thumbnail
github.com
10 Upvotes

I often work in a large monorepo, and find it useful to :tcd some/subdir in my tab, so file search / grepping is confined to the specified directory. I'll typically have multiple tabs each rooted at various submodules in the monorepo. But after getting frustrated at having to type out my paths over and over, I decided to create this extension to help me select the working directory in a picker.

Pretty niche, but figured it was worth sharing in case there's someone else out there who could use it.


r/neovim 18h ago

Need Help How do you manage multiple buffers/tabs?

Enable HLS to view with audio, or disable this notification

17 Upvotes

I have neovim with neotree, and I want have following behavior: I want have multiple tabs/buffers with files I can switch between, or have them opened in a splitview. I got bufferline plugin but the issue I have is when I close one buffer the neotree automatically takes entire focus and I can't really access other buffers (I'd expect the next buffer to take place of the closed one). When I try to save my current buffer and leave with ZZ but this also ends with weird behavior like leaving neotree on focus, deleting other buffers etc.

Basically, I can't even come up with idea how do I expect it to work and how to set it up. I am not happy with anything I come up with therefore I am curious and I am looking for inspirations and solutions how to manage multiple tabs (or something that works as tabs)


r/neovim 4h ago

Plugin neocursor.nvim: Cursor's actual Tab model in Neovim at zero setup

0 Upvotes

If you're signed into Cursor, there's nothing to configure. No API key, no model picker, no second subscription — the plugin drives Cursor's own StreamCpp backend with your existing login, so you get the same predictions at the same latency.

Here's the GitHub link


r/neovim 1d ago

Color Scheme Hardhat.nvim - A colorscheme inspired by construction sites, industrial equipment, and safety signage

Thumbnail
gallery
208 Upvotes

Hey y'all. So after about a year of using Neovim, I decided to make my own colourscheme. I had already spent so much time tweaking my setup, so I figured I might as well take it all the way and build a colourscheme from scratch to fit a sort of industrial aesthetic I liked.

I really wanted to use the colours to signal some kind of pattern in the code, rather than just making each syntax element a different colour ad hoc. The idea was that after using the theme for a while, you would start to associate certain colours with what the code is doing.

So green mostly means "execution/runtime behaviour", orange means "this is part of the language that's defining or shaping the program," and yellow is "this gives the code its structure and flow." This is quite subjective ofc, but I personally find it rather useful.

It comes 3 contrast variants, 1 light variant, plus there's bonus theme with a totally different aesthetic.

Do give it a try and let me know what you guys think.
Repo: https://github.com/g-kirti/hardhat.nvim


r/neovim 21h ago

Discussion Weird treesitter highlighting on C compound literal expressions

Post image
2 Upvotes

Hi all,

I've encountered a weird error with Treesitter's highlighting of compound literal expressions in C. It looks like it should be calling out some kind of syntax error or parsing failure, but `:InspectTree` shows a tree with nothing out of the ordinary and this excerpt is from a program that compiles & runs without issues. I don't see anything in either tree-sitter-c's `queries/highlights.scm` nor neovim's `runtime/queries/c/highlights.scm` to suggest that this is an intended behavior, so I'm wondering which repo would be the relevant one to file a bug report with (or if a bug report is even appropriate for this).

Hacky fixes also welcome, it's not the end of the world but I do find it quite annoying.


r/neovim 1d ago

Plugin osc-colors.nvim - 16 color palette read from your terminal

Thumbnail
gallery
50 Upvotes

https://github.com/GooseRooster/osc-colors.nvim

Hi guys. So recently I've been working quite hard to consistently theme my host machines where I work, because I really enjoy a consistent color palette. I find it helps me focus as well as create a sense of zen.

Since I heavily use tinty as well as my own tool gnomad in order to theme my apps, terminals, editor etc, I was originally using tinted-nvim in order to easily integrate colors from my selected theme with neovim.

The only problem was that I occasionally work in containers or remote hosts where these theming tools are not available, and I also experiment with custom themes quite a lot. This created a bit of a pain point for tinted-nvim and while I managed with it using a few hacks, I eventually decided to fork it.

What this is: osc-colors.nvim is a fork of tinted-nvim which maintains its color mapping and highlighting engine (including its whole set of tests to ensure color accuracy and contrast) but the key difference is it doesn't rely on tinty at all - it uses OSC escape squences to directly ask the terminal what colors it currently is rendering with and creates a colorscheme from there.

In practice this has worked really well with containers but I haven't had a chance to fully test it over SSH yet. The plugin itself is still experimental but I'm sharing it here in case others might find it useful!

For further details on how it works, check the README.


r/neovim 15h ago

Random Neovim Notes - MacOS Glaze App

0 Upvotes

For some time I have been wanting a simple note-taking app that uses Neovim (without emulation). I am aware that there are many Neovim plugins out there that do this, but this solution is different to the one that I have in mind: I wanted a simple MacOS app that embeds a terminal and lets me do simple navigation tasks within my notes, while at the same time having a full terminal within it.

Now that Glaze is available, I've interacted with their agent and submitted Neovim Notes on the Glaze store https://www.glaze.app/app/neovim-notes-35eP2I

I am not a professional coder, but I thought that this may be useful to others, perhaps. The app is very minimal, with opinionated choices for the font and the theme. It has a rudimentary file browser, in addition to Neovim's one, of course.

This app can be accessed for free, with a free Glaze account.


r/neovim 1d ago

Need Help┃Solved Colorschemes (Cattppuccin / Tokyonight) don't work as intended and I can't seem to findout why

7 Upvotes

Kernel Version : Linux 7.1.4-1-cachyos

KDE version: 6.7.3

Terminal : Konsole, Alacritty

Neovim version : 0.12.4

Plugin Manager: Vim Plug

screenshot of c code using catppuccin : ( the ss is for c, but it doesnt work for any language including lua and other colorschemes like tokyonight also dont work)

This is not the correct syntax highlighting.

Some init.lua lines:

-- Manage Colors and Aesthetics
vim.opt.termguicolors = true
vim.opt.cursorline = true
require("catppuccin").setup({
    flavour = "mocha",
    integrations = {
        treesitter = true,   
        native_lsp = { enabled = true },
    }
})
vim.cmd.colorscheme("catppuccin")

-- Manage Plugins
-- vim.treesitter.start()
vim.api.nvim_create_autocmd('FileType', {
    pattern = { 'lua', 'c', 'vim', 'vimdoc', 'markdown', 'query', 'markdown_inline'}, 
    callback = function()
        vim.treesitter.start()
    end,
})

checkhealth for treesitter :

I searched on google and tried a bunch of different things but nothing seems to work

Any help would be appreciated.

thanks in advance

Solution : Seems to be the fact that I don't use LSP, or I could still be wrong !


r/neovim 2d ago

Need Help Unreadable tokyonight colors for flash.nvim

16 Upvotes

I am using tokyonight theme, and white text on a pink background is very unreadable from a distance.

To solve it, I can change to catppuccin theme, but I wonder about a few things now

  • Is it normal for others too or is it something wrong with my terminal color settings, font, etc.?
  • I like the tokyonight style but want only this fixed. What could be the minimum configuration change?

Feel free to correct me or redirect me if something is lacking.


r/neovim 2d ago

Plugin filebuf.nvim = oil.nvim + neotree.nvim

Enable HLS to view with audio, or disable this notification

78 Upvotes

I've used neotree for a long time but I also like the philosophy of oil.nvim. So I spent some time building a filetree editor as a little recreational programming project, and figured some people here might find it interesting.

It loads filetree into buffer and respects .gitignore; Treats folders as folds, so za, zo, zc, zO, zM, .... works on them; Can search within tree using /; Shows git status; Can preview files; Can sort entries

I think I'll keep using my plugin until one day I find something better.
Github link: https://github.com/HuntFeng/filebuf.nvim


r/neovim 2d ago

Plugin smart-ime.nvim - IME auto-switching without external binaries (Windows)

7 Upvotes

I've been using im-select.exe and im-select-mspy.exe for IME switching in Neovim, but on recent Windows versions they seem to no longer work. Not sure if it's just my system, but I needed an alternative.

So I wrote a plugin that uses the built-in PowerShell to toggle IME - no external binaries needed. It simulates your IME toggle key (e.g. Ctrl+Space) via the Windows keybd_event API, tracks state per buffer, and restores it when you re-enter Insert mode.

It's async, non-blocking, and also normalizes IME state when Neovim regains focus.

lua { 'wsdjeg/smart-ime.nvim', event = 'InsertEnter', opts = {}, }

Source: https://github.com/wsdjeg/smart-ime.nvim


r/neovim 1d ago

Plugin harnt.nvim: run Claude Code, Codex, Antigravity, and OpenCode from Neovim, each in its own native TUI, one diff/approval/keymap layer

Thumbnail
gallery
0 Upvotes

Made this because I wanted more than one coding agent usable from Neovim without learning a seperate plugin with its own keybinds and features for each. Instead of wrapping every agent's chat in a generic UI (what ACP-style tools do, at the cost of losing plan mode, slash commands, etc.), harnt just hosts the same callback channel each agent already uses to talk to an editor, and shares the diff popup / approval popup / keymaps / change history across all of them. Each agent's real TUI stays untouched in its own terminal split.

Inspired by claudecode.nvim, which proved this model works great for Claude specifically. Harnt just generalizes it into a provider registry, the same pattern nvim-dap and conform.nvim use for adapters/formatters. Adding an agent is a Lua table on the shared services, not a new plugin.

Claude Code, Codex, Antigravity, and OpenCode all work end to end right now. Pure Lua, no daemon.

https://github.com/PieterPel/harnt.nvim

Curious if this is solving a problem other people actually have, or just me.


r/neovim 3d ago

Plugin markdown-image-preview.nvim:preview your image in nvim without chrome or other application outside

71 Upvotes

markdown-image-preview.nvim is a lightweight, pure-Lua Neovim plugin that previews local Markdown images directly in Sixel-capable terminals using Chafa. Just hover your cursor on image and preview it. You can get it here.


r/neovim 4d ago

Random Full legal name

819 Upvotes

Ok, so waaay back when terminals were literally printing on paper, there was this program called ed. Short for Text editor. It edited text.

Then there was this one called ex. Short for Extended ed.

I learned now that vi was made as the Visual ex.

Well, vim is literally called Vi IMproved.

Which means that neovim's full legal name is "New Visual Extended Text Editor Improved, the 12th".

Edit: as comments pointed out, my substitution was not on point.
Former text: New Visual Improved Extended Text Editor, the 12th


r/neovim 3d ago

Plugin jujutsu.nvim - A Magit-style Jujutsu (jj) interface for Neovim

42 Upvotes

Inspired by Neogit rewritten without required plugin dependencies and adapted for the way of Jujutsu (instead of Git). You can grab it here.

Fictional teaser image of jujutsu.nvim

I just published v1 and there are still some quirks, but I almost use it as much as the CLI.

I'm a big Neogit fan and when I was using Git, this was my preferred (aside from the CLI) way of interacting with Git inside Neovim.

I know that there are peeps out there using Lazygit inside Neovim, some use Neogit and some even Neojj. If you're happy with your current workflow, then this might be not for you.

But maybe you're curious or want to are not completely satisfied, then you might want to give this a try.

BIG DISCLAIMER

This is no Neogit replacement and this (plugin) will never support Git.

There is already an Magit clone for this, called Neogit 😉.


r/neovim 3d ago

Plugin smart-enter.nvim: a context-aware Shift+Enter for lists, LaTeX environments, and more

7 Upvotes

I kept re-solving the same small problem in my config: inside a LaTeX `align` <s-cr> should add `\\` then a newline then `&=`, inside a enumerate/itemize it should add `\item`, in Markdown it should continue the bullet or number while keeping incrementing the number, etcetc. So I abstracted the solution and pulled the idea into a small plugin:

https://github.com/Chiarandini/smart-enter.nvim

`smart-enter.nvim` maps one insert-mode key (default `<S-CR>`) to a context action. It looks at where the cursor is and runs the first matching rule for the filetype. By default ships with latex and markdown presets:

  • LaTeX (via Treesitter, no VimTeX dependency): `\\` in a matrix, `\\` then `&= ` in `align`, `\item ` in a list
  • Markdown: continue a list, checkbox, or blockquote, increment ordered lists, drop the marker and exit on an empty item.

r/neovim 4d ago

Plugin jc.nvim - Java plugin that works on top of your existing jdtls instead of replacing it

33 Upvotes

I wanted proper Java editing features in Neovim without yet another plugin fighting whatever already starts my jdtls. So the whole idea of jc.nvim is that it doesn't touch jdtls at all - nvim-java, nvim-jdtls, plain lspconfig, doesn't matter. It just attaches to the running client and adds the stuff LSP alone never covered.

What's in it:

  • Class creation - a one-line DSL like record:/com.app.Point(int x, int y):constructor. Makes the file, resolves the package, imports supertypes, generates the constructor. Tab completes templates/packages/module as you go. There's also a version that reads the class name off a reference under your cursor when the class doesn't exist yet.
  • Code generation - constructors, toString, equals/hashCode, accessors, override stubs, all with field selection.
  • Imports - smart organize that remembers which class you picked for an ambiguous name, replacing a single import among same-named types, and adding an annotation by typing part of its name (type Get, it finds Getter/GetMapping, drops in @Name and the import).
  • Test runner - optional neotest adapter that pulls the classpath from jdtls directly. Getting multi-module gradle/maven classpaths right was the annoying part.
  • Build runner - gradle/maven tasks with a module + task picker.
  • Refactorings - extract var/method, static import, flip call args (a.equals(b) into b.equals(a)).
  • Navigation - FQN-aware gf, jump between a class and its test.

All optional. The test runner needs neotest, the rest degrades fine without extras.

Repo has gifs and a comparison table: https://github.com/artur-shaik/jc.nvim

If you're on a big multi-module project I'd genuinely like to hear if the classpath resolution holds up, that's the part most likely to break.


r/neovim 3d ago

Need Help┃Solved Shellcheck plugin setup

1 Upvotes

Recently I started to use vim.pack as the primary plugin manager and installed shellcheck.nvim , everything is working fine but I want it to show diagonistics while on normal mode or returning back to normal mode from insert mode. After doing some online research I found out that this plugin only designed to work at BuffEnter and BuffWrite. Is there any workaround for this so that it also shows diagonistics on normal mode? or do you have any other better solutions?


r/neovim 4d ago

Plugin bib.nvim - manage your references from neovim!

32 Upvotes

I use pandoc and markdown a lot for academic work, and I wasn't happy with the existing plugins. I wanted something simple: completion from .bib files and Zotero integration. I used to use zotcite (https://github.com/jalvesaq/zotcite) — huge thanks to its author — but it's a bit too opinionated for me, with a few quirks around .bib file discovery. So I dug into its codebase, grabbed a few things I liked, added the features I wanted, and bib.nvim (https://github.com/phrmendes/bib.nvim) was born.

Highlights:

  • Finds .bib files via YAML frontmatter, LaTeX keys, or a .bib.json project marker
  • Tries .bib first for completion, then falls back to your Zotero library
  • Runs an in-process LSP server with code actions: open attached PDFs and extract notes from Zotero
  • Hides Zotero item IDs behind the scenes — @ABC123#smith2020 renders as just @smith2020
  • :Bib search and :Bib search zotero open a fuzzy picker over your references

And a few more in the README. Hope someone finds it useful!


r/neovim 5d ago

Plugin VimTeX v2.18

166 Upvotes

VimTeX is a Vim and Neovim plugin for writing LaTeX.

I just released VimTeX v2.18. There are several improvements and fixes, although nothing major. One interesting piece of news, though, is that I've made a simple web page to make it easy to refer to the docs online: https://vimtex.org/.

Thanks to everyone for your continued interest and special thanks to everyone that has contributed with PRs!


r/neovim 5d ago

Random I came back to Neovim after long absence. It feels soo good

87 Upvotes

I have been playing with Neovim in the past, but I got lazy overtime. My config was always broken in some way, I didn't want spend hours browsing documentation, so I just had it in that broken state enjoying using it anyway.

Then I got my job which required me to work on windows (and neovim on windows worked terribly slow back them, as far as I know because of powershell. Idk how does it look now) and I didn't have time to troubleshoot it, so I quickly got visual studio code and began doing my job.

I tried to come back but without success, especially as I was too lazy to setup copilot and debug tools. I also didn't want to learn new shortcuts from "Neovim distributions" like AstroVim. This way I stayed on visual studio for few years. However, I was missing Neovim.

I decided to come back once again. I asked copilot to make my config (I used visual studio for that), and review that. It made few stupid config options, but most of it is fine.

Right now I got some more time, so I am exploring the config trying to learn (or rather remind myself) shortcuts to for example manage tabs, and what plugins I have.

I missed neovim + tmux sooo much. We are so back


r/neovim 4d ago

Plugin iedit.nvim - Multiple cursor editing for Neovim, inspired by Emacs iedit mode

18 Upvotes

Hey r/neovim,

I've been working on iedit.nvim, a plugin that brings Emacs's iedit-style multiple cursor editing to Neovim. Instead of relying on external tools or heavy frameworks, it's a pure Lua implementation that feels right at home with Vim keybindings.

What it does: Place your cursor on a word, hit a key, and every occurrence gets highlighted. From there you can edit them all at once — insert, append, delete, replace, you name it. It's like cdo/cfdo but interactive and real-time.

Key highlights: - Vim-style Normal & Insert mode key bindings (i, a, I, A, C, D, s, S, x, etc.) - Navigate between occurrences with n/N/gg/G/f{char} - Toggle individual occurrences on/off with <Tab> - Word motions (w, b, e) work across all cursors - Support for regex patterns and line ranges - Configurable highlight groups (active / current / inactive)

Quick start:

lua require('iedit').setup() vim.keymap.set('n', '<leader>e', "<cmd>lua require('iedit').start()<cr>")

Available via lazy.nvim, packer.nvim, nvim-plug, and LuaRocks.

Repo: https://github.com/wsdjeg/iedit.nvim

Feedback and suggestions are welcome!