206
r/neovim Powered by https://github.com/Massolari/reddit_to_telegram
How to actually learn vim motions (at least for me)
https://ch0.dev/posts/how-to-actually-learn-vim-motions-at-least-for-me/
(Blog Post)
Note:
\- This post is directed to complete beginners trying to learn neovim, i dont think i have the experience yet to be able to write for people anywhere higher than that
\- This post defines "vim motions" as an umbrella term for all keybinds used in neovim, and yes i know that its technically just the ones that you use to navigate, but in my general experience, most people do use vim motions as an umbrella term for all keybinds nowadays
Please enjoy (or not, ig)
https://redd.it/1xovtf2
@r_neovim
mason-scout plugin to auto open a suggestion when missing packages.
https://redd.it/1xnqtxe
@r_neovim
[NvChad] How do you manage tabs and subtabs?
(Need Help)
Hello, I'm new to nvim, using NvChad. Ive managed to learn a few things but still having hard time figuring out what's going on. I know that we can create newtab with :tabnew and navigate with {n}gt. There are also sub tabs which I'm having hard time figuring out. Using :enew makes an empty sub tab but sometimes it just doesn't work at all, can someone tell me what's the difference between all these tab commands.
Heres what I want to do
\- have a tab for all my terminals running long processes
\- have a tab for text files only with sub tabs for different files which I can navigate
\- navigate easily within these tabs
\- sometimes all my tabs disappear and then I have to terminate the processes for my running servers because I can't access them anymore
Also, sometimes when I create a tabnew it copies the previous tabs and adds an empty sub tab.
https://redd.it/1xnj5hn
@r_neovim
Rendering mermaid code blocks inside markdown files?
(Need Help)
I'm using markview to render my markdown files. Was wondering is there some way to render code blocks that contain mermaid diagrams?
https://redd.it/1xmq41q
@r_neovim
[PLUGIN] mktip/bsh.nvim: A Buffer Shell for Neovim
(Plugin)
(NOTE: AI Written, but have been working on it on and off for 5 months)
Hey everyone!
Just a new (old) twist on how to work with the terminal in Neovim. The idea is for my terminal to be truly one with my buffer, editable, re-runnable, collapsible if needed. I find it to be more relaxing in general, yes it lacks some things (auto completion) but for daily repetitive commands, it has become my goto mode of terminal usage, especially when working with multiple remote machines.
For those who are interested, let me know how it fares!
mktip/bsh.nvim
https://redd.it/1xm0gv3
@r_neovim
Neovim WebAssembly: building, running and debugging it
https://youtu.be/7C6_5oNj7GU
(Video)
Neovim has an experimental development that allows it to run inside a web browser using WebAssembly.
In this video, I explore this feature by building Neovim with zig, setting up the demo project included in the repository, and debugging how everything works.
Here's what we'll cover:
1. Build Neovim's WebAssembly files using Zig and Emscripten.
2. Set up and run the browser-based demo.
3. Understand how the frontend communicates with Neovim through the RPC protocol.
4. Debug the JavaScript RPC client and see how requests and responses are handled
https://redd.it/1xmb8zt
@r_neovim
Border or background change for autocomplete popup
https://redd.it/1xlo9l8
@r_neovim
What do you do about template filetype?
(Need Help)
I've got a bunch of handlebars templates in a codegen tool and I can't figure out how best to get syntax highlighting to recognise the target language and the template tags. I did something custom with treesitter to highlight sql strings inside Java and Typescript but I don't know if that's even achievable here. What I really want is files named '\*.ts.hbs' to have highlighting for handlebars with embedded typescript.
How do you approach this?
https://redd.it/1xk6nn4
@r_neovim
Monthly meme thread
(Meme)
Monthly meme thread
https://redd.it/1xkqa4g
@r_neovim
Another banger for 0.13: conceal-aware wrap
(Discussion)
Hey vimmers,
The neovim team keeps delivering awesome features! The latest of which is the conceal-aware wrap. If you work heavily with markdown, you may have noticed that when concealing URLs, line wraps get all weird:
Cursor on the line, not concealed
Cursor outside the line, concealed but wrapped in a weird way
In the latest commit (master), the text is displayed as one would expect:
The conceal-aware wrap
If you're not writing markdown yourself, you may have noticed the weird wrapping when looking at LSP docs / hover, which are also fixed now.
Special thanks to Freddie Haddad for driving the initial implementation and to the GOAT, u/justinmk, for pushing it to the finish line.
https://redd.it/1xka43c
@r_neovim
I got this feeling…
(Discussion)
Ever since vibe coding becomes the new norm, this place has gotten quiet…
https://redd.it/1xk52mq
@r_neovim
I've been using Neovim for 2 years and still forget most keybindings. How did you actually learn it?
(Need Help)
I've been using Neovim (specifically LazyVim) on and off for about two years now. I've gone through the tutorials that come with LazyVim, but whenever I actually try to use it, I still find myself forgetting a lot of the keybindings.
To be fair, I haven't been using it very consistently, which is probably a big part of the problem.
Recently, I've been trying to get back into Neovim and actually make it part of my daily workflow.
My current approach is basically learning as I go. Whenever I want to do something but don't know the keybinding, I Google it, figure it out, and then try to use it.
I feel like this helps things stick better than just memorizing a bunch of shortcuts, but constantly stopping to look things up can be pretty frustrating and interrupts my workflow.
So I'm wondering, is there a better or more efficient way to learn Neovim?
How did you guys get comfortable with all the keybindings? Did you just learn naturally through daily use, or did you follow some kind of structured practice routine?
I'd really appreciate any tips, resources, or personal experiences!
BTW, I'm using Arch Linux with i3wm, if that matters.
https://redd.it/1xjhkqb
@r_neovim
Should I create my colourscheme in Vimscript or Lua?
(Need Help)
Hey everyone. Essentially I'm done with most of my colourscheme and I'm almost ready to share it. I've already written everything in Vimscript and I know it's not a problem but I don't use Vim. The only benefit I could think for using Vimscript is that a Vim user might use it but what are the odds of that happening. Is there any benefit to using Lua for creating my colourscheme?
Also I wanted to try and have an autocmd that tints red the colours in the light version. Would that be in that autoloads directory? Or am I creating a plugin basically now and I should keep that separate?
https://redd.it/1xj2nj5
@r_neovim
How to integrate obsidian.nvim with blink.cmp?
(Need Help┃Solved)
I want to get suggestions from blink.cmp when I type [[ in my obsidian.nvim vault.
Edit ...
The solution is to configure minimum number of typed characters in order for obsidian-ls to give suggestions through blink.cmp. Class obsidian.config.CompletionOpts, field min_chars. https://github.com/obsidian-nvim/obsidian.nvim/blob/main/lua/obsidian/config/default.lua
https://redd.it/1xhmy1z
@r_neovim
Best way to see a list of all valid file type names?
(Need Help┃Solved)
I know I can do :set filetype=<CTRL-D>, but the list of all valid names is huge and this view is not useful for inspection, so I'm trying to find some other approach.
https://redd.it/1xh4wxv
@r_neovim
Dark Souls Terminal / NVIM
https://redd.it/1xocr4v
@r_neovim
SQL setup
(Need Help)
Sooo i am dropping my ORM (cuz f ORMs) and writing sql queries and migrations by hand.
What are your guys recommended sql setup for neovim?
I am looking at the postgres language server and maybe sqruff. Would i need both? Any other lsps, formatters, linters you guys recommend?
https://redd.it/1xnmohp
@r_neovim
dotnet-tree.nvim: a .NET solution explorer as a neo-tree source
https://redd.it/1xmt5qk
@r_neovim
diffbandit.nvim v0.3.0: side-by-side diffs that don't pad your files, now with bezier connectors in Ghostty/Kitty
(Plugin)
diffbandit.nvim is a diff and merge viewer for Neovim. It works more like IntelliJ's diff view than :diffthis. Both files keep their own shape and line numbers, with no filler lines or stretched rows. A narrow gutter between them draws how hunks connect. Each pane scrolls on its own, and the connectors follow whatever is on screen.
AI disclosure: much of the code was written with Claude Code, grok build, or codex under my direction and review.
What it does:
- File, buffer, Git worktree and branch/commit diffs. The right side is a normal editable buffer, so LSP, completion and :w work as usual.
- Hunk stage, unstage and discard, plus a commit panel with a live diff preview.
- A 3-way merge resolver (local/result/remote) with >>/<</gb accepts, gA to apply every non-conflicting change, and resolve-on-write staging.
- Folder diffs, overview gutters, and a hex view for binary files.
New in v0.3.0
- Bezier ribbon connectors in Ghostty, Kitty, Rex, and anything else built on libghostty. They use Kitty graphics with Unicode placeholders, so scrolling never rewrites buffer text. The renderer is picked automatically on Neovim 0.12+. tmux and other terminals keep the Unicode cell renderer.
- Standalone launcher. diffbandit (or git diffbandit) opens every changed file in the repo, lazygit-style, and takes the same arguments as git diff.
- Merge fixes. gA used to place changes at the wrong rows after a partial resolution, which could overwrite lines. It's fixed, as is tracking of conflict regions after partial accepts.
Repo: https://github.com/CoreyKaylor/diffbandit.nvim
Release notes: https://github.com/CoreyKaylor/diffbandit.nvim/releases/tag/v0.3.0
Feedback welcome, especially from people on Kitty or Rex, since I've mostly tested in Ghostty.
https://redd.it/1xmqyxs
@r_neovim
Weekly 101 Questions Thread
(101 Questions)
A thread to ask anything related to Neovim. No matter how small it may be.
Let's help each other and be kind.
https://redd.it/1xml5wt
@r_neovim
Orgmode LSP - Language server for Orgmode
/r/orgmode/comments/1xltea0/orgmode_lsp_language_server_for_orgmode/
(Plugin)
https://redd.it/1xlu1zw
@r_neovim
What's everyone using as API testing tools now?
(Discussion)
What's everyone using as their preferred way of talking to / testing APIs currently?
I heard good things about httpYac and Hurl. Never used httpYac, but dabbled around with Hurl a few years ago and I really liked it, but I never checked how well it integrates into Neovim (only used it via CLI).
What's your current day to day driver for this? Do you work on a team and how well does this work when working on a team where not everyone is used to the CLI or Neovim?
https://redd.it/1xkkfh7
@r_neovim
nanos.nvim colorscheme
(Color Scheme)
Hey guys, this is my Neovim colorscheme with dark and light modes. Uses native, treesitter, and LSP highlight groups. Main inspirations are these four colours #ffc777, #fca7ea, #4fd633, #65bcff, and folke/tokyonight.nvim.
nanos.nvim
I also provide some special highlight groups to emphasize these words/phrases TODO, INFO, FIX, BUG, and NOTE. Checkout the README for what to add in your config to use these highlight groups. This was inspired by folke/todo-comments.nvim but done through highlight groups and not an actual plugin.
https://redd.it/1xkfzoy
@r_neovim
comment-divider.nvim
https://redd.it/1xk54pk
@r_neovim
What extensions to use in nvim for a obsidian like feel for notes
(Discussion)
I have used zettlr and ghostwriter and even joplin but they just don't feel right for me and I don't like the outliner structure in logseq what are the best extensions to use I have used nvim for markdown but it becomes annoying for me with the code auto complete in normal markdown
https://redd.it/1xji0xc
@r_neovim
Animated progress indicator with Neovim's experimental UI2
https://www.youtube.com/watch?v=axGJlRHnBPc
(Video)
In my previous video, I optimized my Neovim LSP configuration, and some of you suggested adding a progress indicator. So, in this video, I'm building one from scratch using Neovim's experimental UI2, without relying on external plugins.
I'll explore the UI2 API, experiment with progress messages, and connect everything to real LSP progress events.
Topics covered:
* Enabling the new experimental Neovim UI
* Using vim.api.nvim_echo() to display progress messages
* Understanding progress parameters
* Simulating progress with the new async API
* Listening to LSP progress events
* Handling running and successful states
* Using message IDs to avoid duplicate messages
* Adding custom animations
Thanks to everyone who left suggestions in the previous video!
Source code:
https://github.com/FractalCodeRicardo/dev-config/blob/master/nvim/lua/my/lsp-progress.lua
local ui = require("vim._core.ui2")
local api = vim.api
local async = vim.async
ui.enable({
enable = true,
msg = {
targets = {
progress = "msg"
}
}
})
local frames = { '⠋', '⠙', '⠹', '⠸', '⠼','⠴', '⠦', '⠧', '⠇', '⠏' }
local frame = 0
local i_frame = 0
local message_id = nil
local function progress(percent, title, is_running)
local status = "success"
if is_running then
status = "running"
end
if i_frame == #frames then
i_frame = 0
end
i_frame = i_frame + 1
message_id = api.nvim_echo({ { title } }, false, {
id = message_id,
percent = percent,
source = "lsp-progress",
status = status,
title = frames[i_frame] .. " LSP",
kind = "progress"
})
end
api.nvim_create_autocmd("LspProgress", {
callback = function(args)
local value = args.data.params.value
if value == nil then return end
local title = value.title
local percent = value.percentage or 0
local is_running = true
if percent > 95 and percent <= 100 then
is_running = false
end
if percent > 0 then
progress(percent, title, is_running)
end
end
})
Inspect / debug / optimize your LSP config using vim.log (Neovim 0.13)
https://youtu.be/nwkg8OQYvCg
(Video)
My Lua LSP was taking too long to provide diagnostics, so I used the new logging API in Neovim 0.13 to investigate the problem and optimize my configuration.
In this video, I'll show you how I used vim.log to track LSP initialization, inspect progress events, measure workspace loading time, and find unnecessary files being loaded by the language server.
What you'll learn:
- Use :checkhealth and :log to inspect LSP behavior.
- Create a custom logger with the new vim.log API.
- Measure LSP attachment time using vim.uv.
- Inspect LspProgress events to identify slow workspace loading.
- Examine LSP client settings and workspace contents.
- Optimize Lua LSP configuration to avoid loading unnecessary plugin files.
The result? My workspace loading time went from 15 seconds to just 3 seconds, while keeping the Neovim API autocompletion I wanted.
If you have a better way to debug or optimize your LSP configuration, share it in the comments!
https://redd.it/1xi0kzm
@r_neovim
About highlighting macros (for color scheme authors)
(Color Scheme)
When working on my color scheme (Neogotham), I recently figured out that LSP has only one highlight group for macros - @lsp.type.macro while Treesitter has two - @function.macro and @constant.macro.
By default neovim falls back to @constant.macro for the LSP one (as you can see here), which basically aligns with C style idea where macros are often used for constants. But that also makes it impossible to differentiate macros using Treesitter when LSP is active, since LSP groups have a higher priority.
Modern languages more commonly use macros for functions, not constants (for example Rust), so I figured it's better to link @lsp.type.macro to @function.macro by default, and then for C and C++ to drop their specialized LSP level groups (i.e. @lsp.type.macro.c and @lsp.type.macro.cpp) to allow Treesitter to provide nice differentiation for function and constant macros in case of C and C++.
It's kind of an obscure detail, but I wonder how color theme authors usually approach it. How do you handle the above?
https://redd.it/1xh5wg1
@r_neovim
jujutsu.nvim - trigger CI, view CI logs, external pickers and conflict resolve UI
(Plugin)
The latest release of jujutsu.nvim (A Magit-style Jujutsu (jj) interface for Neovim) has support for external pickers now.
It also comes with git forges support (Bitbucket, GitHub, Gitlab, Codeberg) for:
\- Create PRs
\- Review PRs (including inlay code comments)
\- Trigger CI
\- View CI Status
\- View CI Logs
jujutsu.nvim also has a pretty nifty conflict resolve UI included now, which can resolve file conflicts bookmark/rev drift (divergent and/or conflicting).
https://github.com/dont-be-evil-company/jujutsu.nvim
https://redd.it/1xh5m7d
@r_neovim