Telegram Web Link
What do you use for documentation of programming language?
(Discussion)

I saw that Primeagen used quick documentation (in buffer) for programming language in one of his videos, what does he use if anyone knows?

Also what do you recommed me to use?

Thanks for help...

https://redd.it/1ogk1tw

@r_neovim
Do you still use Vim as an editor, or do you relay entirely on Neovim?
(Discussion)

When do you choose to use vim vs neovim?

https://redd.it/1ogq623

@r_neovim
zsh tree sitter grammar
(Plugin)

Zsh scripts often don't highlight well if you use the bash grammar.

This is a zsh specific grammar which aims to parse zsh-specific syntax better.
Feedback welcome, I'd love to ensure this parses zsh scripts well

https://github.com/georgeharker/tree-sitter-zsh

https://redd.it/1ogt0mi

@r_neovim
Neovim taught me trial and error and made me build a workflow that suits me
(Random)

I tried multiple text editors and IDE's for coding in my lifetime. Most of them came "working out of the box". My turning point was when I started using Linux. That pushed me to become more and more familiar with terminal and its tools.

I was hearing about Vim from time to time, but I've never thought I'd use it until I learned about Vim motions. I tried them and I really like them. They're efficient, fast, encourage a keyboard centered workflow... So I wanted to incorporate them in my text editor/IDE.

I first tried it in VSCode and ... It was slow. Inline diagnostics had a long delay, vim motions weren't native. Jetbrains IDE's are complete, but let's be honest, I wasn't using 90% of their features. Yes they had Vim Motions, but it wasn't suiting for the workflow I was looking for. Plus, they tend to be pretty resource heavy.

The closest native and fast experience was with Zed, it had nice features like "task spawning", integrated vim mode with additional motions, but the ecosystem wasn't as big as VSCode's or Neovim's.

I was looking for a workflow that is "all-in-one". Something that could have a good terminal, smooth navigation, a big ecosystem, keyboard centered, FOSS, switching between multiple instances etc.... and the only solution seemed Neovim and Tmux.

I've tried Neovim before, but I didn't stick to it. It seemed intimidating with all the files, plugins, keymaps, LSP's, etc... But now I've decided to put my head in it and learn.

At first, it was tough, I didn't know where to start. So little by little, I tried to imitate some configs, try to understand them and put my special touch. Slowly things started to make sense, I started to debug issues better, read documentation better, implement my own settings, I understood LSP's, linters, formatters... I still have a lot to learn, but for the moment, learning it is a enjoyment.

Another good surprise was Tmux. It's fascinating how it integrates so well with Neovim. I can now have multiple terminal sessions, split them in one window, navigate between them effortlessly.

I can confidently say that I've found my perfect workflow.

https://redd.it/1ogs8qb

@r_neovim
comment-tasks.nvim v2.0
(Plugin)

Manage your code-related TODOs / FIXMEs and the bugs / tasks related to them directly from neovim.


Supports multiple languages and these task management platforms:

* ClickUp
* GitHub issues
* GitLab
* Todoist
Asana\
Trello\
Notion\
Monday.com\

Open to adding more.

\* These providers are new and I'd welcome input from folks who use those platforms / trackers/

https://github.com/georgeharker/comment-tasks.nvim

https://redd.it/1oh2uxl

@r_neovim
Flash.nvim as native navigation booster
(Tips and Tricks)

For the longest time, I frowned about using plugins like Flash (or Leap, Hop, mini.jump2d) because all of them introduced, in my mind, an extra step of choosing what tool to use to jump. Before jumping somewhere, I needed to think "is the target in the current viewport" then use flash, "if not in the viewport" use the native vim search.

But, it doesn't need to be like that. Flash has a search mode that enhances the native //? feature by adding labels to all possible targets. Because the native / will search anywhere on the buffer even outside the viewport, there's no decision to be made - always use the native search and the flash labels with the shortcuts will appear. And it works across any open windows.

There's also char mode that enhances the native f/F line jumping. For this one, it can be made to replicate mini.jump by adding multi-line range support and be able to use the same key to jump to the next results.

I now use flash without any custom keymappings. I don't know if everyone else who uses flash, uses it like this already, but I was so amazed with the efficiency of this usage, it's like the coin finally dropped for me on this one. It really feels like native++. I had to share it. :)

Here's my flash config.

https://redd.it/1ohko02

@r_neovim
Can diff mode be improved (is it worth filing a feature request?)
(Discussion)

neovim's diff mode is using DiffText group for highlighting a line that's partially changed (not just added or removed fully). It uses a particular logic:

See in :help diff

> DiffText
> Changed text inside a Changed line. Vim
> finds the first character that is different,
> and the last character that is different
> (searching from the end of the line). The
> text in between is highlighted. This means
> that parts in the middle that are still the
> same are highlighted anyway.

This works, but it's somewhat primitive. I.e. this detail parts in the middle that are still the same are highlighted anyway could really be handled better.

Some other diff tools detect parts in the middle that didn't change. They also can detect parts which were removed in the line and highlight it within that changed line (as removed color). Can some more advanced algorithm for this be used with neovim too?



https://redd.it/1ohkkut

@r_neovim
I want to insert lines above/below my cursor but without moving my cursor or changing mode.
(Need Help)

I'm in normal mode and want to insert a blank line above/below the one I'm currently on, whithout moving my cursor and staying in normal mode.

Pressing "O" or “o” puts me in insert mode and moves my cursor. This not what I want.

If you have a dotfile or gist so I could refer to a remap that would be great.

https://redd.it/1oh9stk

@r_neovim
Weird behaviour and don't know what to Google - Normal mode cursor goes past end of line
(Need Help)

Sometimes my Neovim does this and I don't know what setting or keybind is making it happen, or how to turn it off.

By default the cursor is "locked" to the end of a line, it won't go beyond the last character. If I have:
a really really long line and
a short line


with my cursor on the "d" of "and", when I hit j my cursor ends up on the "e" of "line" - the last character in that line.

When the odd behaviour starts, my cursor ends up here:
a really really long line and
a short line _
^ cursor


$ will take it back the the "e" character where I'd expect.

Restarting Neovim will deactivate this behaviour and go back to the default I'd expect. I have sessions, so I don't lose my place, but it's still a distraction.

I don't know what key I'm mistakenly pressing or what setting is causing this, but I would like for it not to happen.

Any ideas?

https://redd.it/1ohan22

@r_neovim
Sleeping on the g command
(Discussion)

I am sure this comes up now and again, but I couldn't contain my surprise. I have known about the :g command for a while, just never really saw a use for it. This was until I saw it being used with :norm. For the unenlightened, combining :g and :norm lets you effectively run arbitrary vim motions on all lines matching a regex. I truly have been using this pattern so often to save with refactoring names and structures. It's search and replace on crack!

Really interested now if there are some other cool uses of :g that I have been missing out on.

https://redd.it/1ohumn8

@r_neovim
Help me understand the Neovim way
(Discussion)

Hello everyone. This is 10% rant and 90% me asking for suggestions and guidance.

Due to declining quality of the big name IDEs (Visual Studio and JetBrains Rider) I've been recently trying to set up the Neovim to replace them. As you can tell I am a C# developer, so I grew up using Visual Studio and it set the baseline of many of my expectations: from theming, through keyboard shortcuts, snippets, to the behaviour of the editor itself. Even after switching to Rider I carried many of my habits and configured the IDE "the VS way", not "the Rider way". But, as someone who likes to experiment and fiddle with the configs I think it's not an issue. I can remap all the keys to what I want.

It turned out to be really hard. I am not blaming the Neovim: I assume I am not doing things the way they should be done. I would like to understand the way you guys operate here. Also, I've been using vim motions for years now, so I have no trouble editing in Neovim, it's just the configuration of the tool itself.

Disclaimer: I am not saying these things in a mocking/sarcastic way, these are real, honest, neutral questions.

Judging by the last few days playing with the configs (I went from LazyVim, to Kickstart, to config from scratch) it seems that the (base) Neovim is more like a Notepad, not like Visual Studio. Is this the goal of this project? Of course the whole plugin ecosystem makes it a Notepad on steroids, but still - it is expected to start with nothing and build your way up? I recently watched one of Teej's videos when he mentioned that we should be "sharpening our axes" when it comes to tools, and I agree. However, using Neovim felt more like "you need to mine your own iron first, then mold it into an alloy to create an axe" rather than "sharpening the axe". Again, I'm not mocking, just giving the perspective that I have.

Over time I modified my end goal from "replacing Rider" to just "have syntax coloring and code completion" and it is still outside of my reach. These things are working fine when I use kickstart.nvim (it's literally out of the box experience), but I want to understand how to set it up myself. Reading the config does not help, because it seems like e.g. "code completion" is not just one plugin, it's a set of carefully configured plugins that work together (treesitter, lsp, mason, blink? I'm not even sure). I started stripping kickstart.nvim from the stuff around and arrive at LSP only stage, but there is still so much magic happening in this config.

I expected to arrive to an empty Neovim, add a plugin manager (ideally have the plugin manager already built-in), install a language plugin and go. You can call it "the VS Code experience". What I had was: install the LSP, it does nothing by itself, I had to install a separate plugin with the popup menu only, then connect them both, still don't work, copy paste some spells from kickstart, it works, but why? What are these "LspAttach" commands, augroups, capabilities, servers, etc. Neovim feels like the assembler, where Rider feels like... C# (yeah).

Maybe I'm doing something wrong or maybe it is really that much harder? It's not a bad thing by itself, it's just much more grinding than I anticipated. If your first thought it "well it's the way we do stuff here and it's the proper way" then it's also fine. I am not hating, just asking and seeking opinions and suggestions. Please comment. Thank you!

https://redd.it/1ohmsvg

@r_neovim
A great lowtech way to solve merge conflicts
(Tips and Tricks)

1. git rebase -i origin/main \- Do a rebase and get a conflict
2. git jump merge\* \- Open Neovim with conflict places loaded into quickfix list
3. Solve the first using https://github.com/inkarkat/vim-ConflictMotions
4. :cnext (mapped with nnoremap <a-j> <cmd>cnext<cr>) to go the next conflict, repeat from 3 until done.

.gitconfig:
core.editor = nvim
[merge]
ff=false
conflictStyle=diff3 # <-- imo makes it much easier to understand the conflict.


Hope this can help someone :)

\* git-jump is part of git distribution, look inside the CONTRIB dir of git.

I tried merge.tool=nvimdiff a little bit, but it's annoying that it goes to every changed place, not just the unresolved conflicts.

https://redd.it/1oi696o

@r_neovim
2025/10/28 14:00:31
Back to Top
HTML Embed Code: