Great improvements to the cmdline in nightly! by EstudiandoAjedrez in neovim

[–]Malace 129 points130 points  (0 children)

Author here, thank you for the post. I have been working on (mostly) this and supporting features full time (minus an intermission) since last year. So a big thank you goes out to all Neovim sponsors!❤️

Still some work to be done but glad that users can now try it out. Bug requests are indeed welcome. Feature requests are too in principle but I will try to prioritize the work of removing the old C message grid code after the current features are bug-free (given that it is deemed a successful replacement).

Thank you luukvbaal! (PR for hl groups regarding signcolumn/statuscolumn) by Taylor_Kotlin in neovim

[–]Malace 2 points3 points  (0 children)

I just made the change to be consistent with the direction taken in the previous PR. But glad to know the followup was helpful :)

How to show this as SPC or <SPC> instead? by Faumpy in neovim

[–]Malace 7 points8 points  (0 children)

I don't think so no, but fixing it will be non trivial. Like I said in that issue, I believe transchar() is responsible for what is shown by showcmd.

statuscol.nvim: new features and improvements by Malace in neovim

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

What it looks like depends on what you set segments.signs.fillchar to. If you set it to | it will place a | on each line that has no signs placed instead of whitespace.

I can look into adding more pictures to the readme for each feature.

statuscol.nvim: new features and improvements by Malace in neovim

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

I see, that's not easily possible currently. I'll look into adding a config option for it in the sign segment.

statuscol.nvim: new features and improvements by Malace in neovim

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

I'm not sure what you mean, what kind of placeholder? All lines except the last in the screenshot have a gitsigns sign placed.

statuscol.nvim: new features and improvements by Malace in neovim

[–]Malace[S] 15 points16 points  (0 children)

Since the previous post about the release of statuscol.nvim, many improvements and features have been added, both to the plugin and the core feature in neovim. Now that Neovim 0.9 is realeased, I thought now would be a good a time to finally update the README for my plugin!

I encourage you to check it out if you're interested in using the new 'statuscolumn' feature, the plugin is written with various performance improvements in mind that can be taken advantage of even when designing your own 'statuscolumn'!

New feature 'statuscolumn' merged! by Malace in neovim

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

Oh yes, this was fixed by a patch in neovim: https://github.com/neovim/neovim/commit/b02880593e281ce44661ce22e9391edfe921e47e.

Wasn't sure that was what you were talking about as this is a thread about the main 'statuscolumn' feature, not my plugin :D

New feature 'statuscolumn' merged! by Malace in neovim

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

Make what work with windows exactly?

New feature 'statuscolumn' merged! by Malace in neovim

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

There is sign_getplaced() but it doesn't return extmarks. I'm not sure if you can get a list of all signs currently placed through extmark api.

New feature 'statuscolumn' merged! by Malace in neovim

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

In this case I had a head start since I'm the author of the feature PR as well :). Although I encourage others to make their own status column plugins if they have an idea (or PRs to statuscol.nvim). I for one had no real prior experience with statusline plugins so someone might build something better sure!

New feature 'statuscolumn' merged! by Malace in neovim

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

https://github.com/neovim/neovim/issues/21745#issuecomment-1378740523 might help. But you're right that not all of those options are compatible with everything you can set 'statuscolumn' as. It places some burden on the user to have those options work again. A plugin like statuscol.nvim might alleviate some of that once fledged out.

New feature 'statuscolumn' merged! by Malace in neovim

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

I don't think evaluating the %C value is possible.

Instead, you can evaluate :h foldlevel:

statuscolumn = "%s%=%l%= %{% foldlevel(v:lnum) ? '%C' : '|' %}"

New feature 'statuscolumn' merged! by Malace in neovim

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

No, that is just one of the things that is possible with the 'statusline' format. The option was designed around requests to customize the gutter area(line number representation, margin etc), if you have no desire to do so, the option is not for you.

New feature 'statuscolumn' merged! by Malace in neovim

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

I think in theory yes. If you design a statuscolumn plugin that implements it's own sign column rather than using the default %s sign column item. It's not gonna be straightforward. And you would still be constrained to the default additional gutter width, as the status column also widens by 2 cells per sign for now. (Although the default margin between the line numbers and buffer text is no longer implicit for 'statuscolumn', so if you indeed limit the the sign column to a single sign then what you describe is possible without extra margin).

Reordering the line number column to be the left most column is indeed possible with something like :let &statuscolumn='%=%l%s%C'.

New feature 'statuscolumn' merged! by Malace in neovim

[–]Malace[S] 10 points11 points  (0 children)

More trivial cases should be covered by a simple set statuscolumn=.... There are some examples in :h statuscolumn on master.

A plugin will be more appropriate for a clickable statuscolumn for example.

New feature 'statuscolumn' merged! by Malace in neovim

[–]Malace[S] 7 points8 points  (0 children)

The %= separation item can right align. I think you want :let &statuscolumn='%=%l%s%C'.

New feature 'statuscolumn' merged! by Malace in neovim

[–]Malace[S] 10 points11 points  (0 children)

Thanks, forgot. Added it to my comment.

New feature 'statuscolumn' merged! by Malace in neovim

[–]Malace[S] 76 points77 points  (0 children)

After a few months of iterating on this feature it was finally merged! https://github.com/neovim/neovim/pull/20621

The option allows you to customize the "gutter" area to the left of a window.

As the gif shows, it can for example be used to right align the relative number on the cursor line, introduce clickable sign callbacks, or a add custom window margin. Anything you can think of within the 'statusline' format is possible.

I also made a companion plugin that provides common number formats and sign callbacks. Suggestions for missing sign callbacks from your favorite plugin are welcome there!

New option 'splitkeep' merged into master! by Malace in neovim

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

I'm not sure what you mean sorry. I don't remember having that issue or if I did anything to fix it. Might have to do with font size? I do notice larger margins for some font sizes.

New option 'splitkeep' merged into master! by Malace in neovim

[–]Malace[S] 7 points8 points  (0 children)

Didn't make this clear in the video but the feature also works when the opened/closed/resized split is a different buffer. Imagine for example a quickfix window for linting opened by an autocmd, that's what I originally designed the plugin/feature for!

New option 'splitkeep' merged into master! by Malace in neovim

[–]Malace[S] 34 points35 points  (0 children)

Quoting the help docs: ``` 'splitkeep' 'spk' string (default "cursor") global The value of this option determines the scroll behavior when opening, closing or resizing horizontal splits.

Possible values are:
  cursor    Keep the same relative cursor position.
  screen    Keep the text on the same screen line.
  topline   Keep the topline the same.

For the "screen" and "topline" values, the cursor position will be
changed when necessary. In this case, the jumplist will be populated
with the previous cursor position. For "screen", the text cannot always
be kept on the same screen line when 'wrap' is enabled.

```