r/neovim • • 14d 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 • • 5d ago

101 Questions Weekly 101 Questions Thread

15 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 • • 17h ago

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

46 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 • • 1d 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 • • 22h 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 • • 1d ago

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

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

Need Help Lazy configuration setup

10 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 • • 2d ago

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

326 Upvotes

r/neovim • • 2d 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
84 Upvotes

r/neovim • • 2d ago

Need Help HELP: Just to be sure about modelines

4 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 • • 3d ago

Video Some thoughts after using Neovim for a few years

Thumbnail
youtube.com
84 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 • • 2d 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 • • 4d 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 • • 4d ago

Need Help Live preview of a Markdown file

25 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 • • 4d 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?

12 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 • • 5d ago

Need Help Vertical split and cursor in coc.nvim

4 Upvotes

Hello I recently noticed that when you made:

Vertical split

Put the cursor in the last line ($)

The cursor appears words before but actually is in the last character of the line

After use x to remove chars:

You can see that the text actually remove is the ";" at the end of the line

If I remove the virtual text does not appear this bug

Any one with the same bug?


r/neovim • • 4d ago

Discussion What plugins are you using for AI integration?

0 Upvotes

By current setup is very basic, AI in the separate tmux pane/window, since I want to use AI as an assistant, where I type the code. But, I'm curious how are people integrating AIs into Neovim, what plugin stack are you using?


r/neovim • • 4d ago

Plugin Floating-Claude.nvim using and showing Claude Events

0 Upvotes

Hello guys,

I have been working on the plugin floating-claude.nvim as I wanted something more integrated to my coding workflow than the coder/claudecode.nvim. It's only a terminal provider for the claudecode.nvim, but it has a minimized mode and an intent of better user experience with a floating Claude window.

The latest change I applied was about listening to Claude events, instead of parsing the terminal buffer, so I can show you the latest events and messages that claude sends through the events. These events are a bit different to the ones you can see on terminal, so I find them quite interesting to check, as you can also do through a command FloatingClaudeEvents, and the result are as you can see:

This information can be useful for other people that wants to build some tools over these Claude events, like a hardware semaphore for the Agents state (busy/available).

Claude Events

Anyway, if someone wants to use it, feedback or suggestions are welcome.

ps.: As you can see, I use Claude to vibecode plugin, as I'm not an expert on Lua. I'm designing and reviewing the code based on my user experience.


r/neovim • • 6d ago

Plugin Coc extensions for Java, Spring, Maven, SonarQube

18 Upvotes

I've used coc.nvim for Java work for a while, and for a few things I wanted a more expressive/working java eco system. So I ported some core VS Code extensions to coc, and kept them maintained for a while now. Six of them are ports, the last one (coc-htmlview) is new. They're all on GitHub and npm, in case they're useful to anyone else on coc.


coc-sonarlint

Port of SonarSource/sonarlint-vscode.

SonarQube for IDE (formerly SonarLint): runs Sonar's language server and reports quality and security issues as you type.

  • Languages: C, C++, Java, Go, JavaScript, TypeScript, Python, PHP, HTML, CSS, CloudFormation/Kubernetes/ARM YAML and JSON, and secrets in any file
  • Connected Mode: uses the rule sets and project settings of a SonarQube Server or SonarQube Cloud project
  • Rule descriptions, hotspot details and connection details open in a split or float, styled like a browser page, with tabs you switch with <CR>
  • A findings tree for the workspace, quick fixes as code actions
  • Language server and analyzers ship with the extension, you only need a Java 17+ runtime

coc-springboot

Port of vscode-spring-boot from spring-projects/sts4.

Spring Boot support: runs the Spring Boot language server of the Spring Tools project.

  • Spring-aware completion, hover and validation in Java files, application.properties, application.yml and *.factories
  • Symbol search for request mappings and beans
  • Live data from running Spring Boot apps: hovers over Spring annotations show data from the running app
  • Language server bundled, needs coc-java and Java 21+

coc-maven

Port of microsoft/vscode-maven.

Maven support: a project explorer, goal runner and pom.xml editing features.

  • Project explorer: modules, dependencies, plugins and their goals, profiles
  • Run goals, lifecycle phases and saved favorite command lines in a terminal, with a history per pom
  • pom.xml completion (including group/artifact/version from Maven Central and your local repository), hover, go-to-definition, code actions and dependency conflict diagnostics
  • Effective pom and dependency tree in read-only buffers
  • Create projects and modules from archetypes, and find the artifact behind an unresolved Java type

coc-java-explorer

Port of microsoft/vscode-java-dependency.

Java project explorer: a tree of the Java projects in the workspace.

  • Source roots, packages, classes, the JRE, Maven/Gradle dependencies and referenced libraries
  • Create classes and packages, rename and delete from the tree
  • Add or remove referenced libraries, create projects, export jars

coc-spring-dashboard

Port of microsoft/vscode-spring-boot-dashboard.

Spring Boot dashboard: run the apps of the workspace and look into them while they run.

  • Tree views of the Spring Boot apps in the workspace: start, stop and debug them
  • Live beans, endpoint mappings, properties and memory of running apps
  • Signs on bean definitions and request mappings in the code
  • Attach to apps running elsewhere

coc-spring-initializr

Port of microsoft/vscode-spring-initializr.

Spring Initializr: create new Spring Boot projects and add starters to existing ones.

  • Generate a Maven, Gradle or Gradle Kotlin DSL project from start.spring.io: Boot version, language, coordinates, packaging, Java version, dependencies
  • Search dependencies, reuse the ones from the last project
  • Add starters to the pom.xml of an existing project

coc-htmlview

Not a port, written for these extensions.

HTML viewer: renders HTML and CSS into a Neovim buffer, so other coc extensions can show formatted docs (coc-sonarlint uses it for rule descriptions).

  • A real CSS cascade, with specificity and !important
  • Tables, lists, borders, flex rows and inline blocks on a character grid
  • Code blocks highlighted with treesitter, colors follow your colorscheme

Install: :CocInstall coc-<ext>. The Java and Spring ones expect coc-java for the Java language server. Each extension has a :help page that covers commands and settings. They're written and tested on Neovim mostly.

Bug reports and issues are welcome on GitHub.


r/neovim • • 7d ago

Video Retro Terminals with Neovim + Kitty

Thumbnail
youtube.com
61 Upvotes

Some of you asked me about the retro terminal effects I used in my previous videos.

In this video, I'll show you:

- The tool I use to add mechanical keyboard sounds.
- The fonts I use.
- How to use the CRT shader.
- How to use the TFT shader.
- Color schemes for Kitty and Neovim.

Hope you like it!


r/neovim • • 7d ago

Discussion Finally dropped DBeaver by splitting my SQL workflow between vim-dadbod and sqlit

13 Upvotes

I kept bouncing off trying to replace DBeaver with a single terminal tool. vim-dadbod is great when I'm writing multi-query .sql files, switching connections per buffer, and wrapping updates in explicit BEGIN/ROLLBACK blocks, but browsing wide tables, checking JSONB columns, or editing a single cell in a .dbout buffer always felt clunky.

What finally made me uninstall DBeaver was splitting the job in two instead of forcing one tool to do everything.

For actual query work I stay in Neovim with vim-dadbod + vim-dadbod-ui. I mapped <leader>dr to run the buffer or visual selection, <leader>dl for the current line, and <leader>do to jump straight to the .dbout split. Keeping separate check.sql and mutate.sql buffers and swapping the target DB with :DBUIFindBuffer is way faster than juggling DBeaver script tabs, and explicit transactions beat remembering whether Manual Commit mode is toggled on.

For quick data inspection, jumping through foreign keys, inspecting JSON fields, or editing one row inline without writing an UPDATE statement, I just pop open sqlit in a terminal split. It covers the 20% of GUI habits that dadbod wasn't built for, without eating 1.5 GB of RAM on Java startup.

Curious if anyone else splits their DB workflow like this, or if you've moved completely to one of the newer TUI/Neovim SQL clients?


r/neovim • • 7d ago

Discussion escape alternatives

20 Upvotes

I'm sure this has probably been done to death, but I'm just wondering everyone's thoughts on escape alternatives for exiting insert mode - particularly caps and ctrl+[

I'm currently using caps locks as escape and from a writing perspective it is incredible and so fast, but I have had problems with getting this set up when moving to different systems.

I'm doing a cs degree and eventually would love to do this full time, and definitely don't want to be stumped if I get a computer with vim but can't use it because caps isn't mapped to esc. I recently found out that ctrl + [, ctrl + c and alt + J all exit insert mode by default, and want to know if anyone uses these with success, and how they can compare to capslock.

Thanks in advance


r/neovim • • 7d ago

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

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

Discussion Plugins Marketplace for Neovim

Thumbnail
gallery
290 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?