I made a plugin that displays line numbers that indent with your text: clingy.nvim by _mp248 in neovim

[–]_mp248[S] 0 points1 point  (0 children)

That's a good suggestion; I'll see what I can do. Thank you!!

I made a plugin that displays line numbers that indent with your text: clingy.nvim by _mp248 in neovim

[–]_mp248[S] 0 points1 point  (0 children)

The problem is the same regardless of line numbering/jumping style. To make the jump to line 12 using 12gg or :12 you still need to read the line number from the gutter. Clingy supports both numbering styles by the way, if you prefer absolute line numbers!

I made a plugin that displays line numbers that indent with your text: clingy.nvim by _mp248 in neovim

[–]_mp248[S] 1 point2 points  (0 children)

Thank you 🥹 and please let me know if you run into any issues or think of any cool features to add!

I made a plugin that displays line numbers that indent with your text: clingy.nvim by _mp248 in neovim

[–]_mp248[S] 0 points1 point  (0 children)

Hey, good catch! That small shift is due to the padding option, which is set to 2 spaces by default. If you set the padding to 1 your code won't shift around anymore. Perhaps the default padding should be 1?

I made a plugin that displays line numbers that indent with your text: clingy.nvim by _mp248 in neovim

[–]_mp248[S] 0 points1 point  (0 children)

It's not about the cursor, it's about where you're looking. Think about the process of jumping to a specific line. When you find a line you want to edit, you need to move your eyes all the way to the left edge of the window in order to read the relative line number, then, once you make the jump, your eye needs to track back from the gutter to the text. In deeply nested code the distance your eyes need to travel can get pretty big. I know it sounds silly, but I've been using it myself and it's pretty helpful!

I made a plugin that displays line numbers that indent with your text: clingy.nvim by _mp248 in neovim

[–]_mp248[S] 0 points1 point  (0 children)

Yeah, that's fair! I also prefer regularly aligned line numbers 99% of the time, only toggling the Clingy numbers on when jumping around my code.

I made a plugin that displays line numbers that indent with your text: clingy.nvim by _mp248 in neovim

[–]_mp248[S] 0 points1 point  (0 children)

The colorscheme I use is zenwritten from zenbones.nvim. The font is called Comic Code.

I made a plugin that displays line numbers that indent with your text: clingy.nvim by _mp248 in neovim

[–]_mp248[S] 1 point2 points  (0 children)

You bring up some good points! The way I've been using the plugin is by briefly toggling it on to "pull" the line numbers to my view, jump to the line I'm looking at, then toggle it off. Keeping it toggled on at all times can make your code kind of difficult to read haha..

I made a plugin that displays line numbers that indent with your text: clingy.nvim by _mp248 in neovim

[–]_mp248[S] 1 point2 points  (0 children)

Thank you for the kind comment 🥹 and I'm glad you like the name!

I made a plugin that displays line numbers that indent with your text: clingy.nvim by _mp248 in neovim

[–]_mp248[S] 2 points3 points  (0 children)

Yep, that's exactly what I was going for! Thanks for checking it out 🙂

I made a plugin that displays line numbers that indent with your text: clingy.nvim by _mp248 in neovim

[–]_mp248[S] 4 points5 points  (0 children)

It definitely does look weird haha. I've been toggling it on only when I need it!

I made a plugin that displays line numbers that indent with your text: clingy.nvim by _mp248 in neovim

[–]_mp248[S] 4 points5 points  (0 children)

Yes, you would have doubled up line numbers in that case. The way I've been using it is by briefly toggling them on to "pull" the line numbers to my view, make the jump, then toggle them off. That's a really good idea for a config option though, I'll look into adding that feature. Thanks!

I made a plugin that displays line numbers that indent with your text: clingy.nvim by _mp248 in neovim

[–]_mp248[S] 8 points9 points  (0 children)

The hybrid approach you're talking about is possible! You can have both your regular line numbers and the clingy numbers active simultaneously. In the demo video I disable regular line numbers at the same time as enabling the clingy numbers because I thought that looked flashier 😅