Open mehalter opened 1 year ago
I am working on it :)
and yes, that is how config will be passed to heirline.
Beautiful! Thank you so much for all your hard work!
Works great! One thing I am wondering, I noticed when I get the arguments from the callback for on_click
, I'm not getting the mods
variable. Is this something that needs to be added or maybe I'm just being silly.
Also if you are interested, this is the statuscolumn that I'm currently using: https://code.mehalter.com/AstroNvim_user/~files/v3/plugins/heirline.lua
ah I found it @rebelot , I'll open a PR
@mehalter stunning work!
I just noticed that this issue is still open! I think this is more than resolved and I've been using the statuscolumn
support for a while now and have had absolutely no issues. Thanks again @rebelot for your help here getting this added! Heirline continues to be the best :D
I was waiting to close this until I added some snippets in the cookbook.. but I didn't have much time to tinker with it seriously.. I wanted to implement some sort of buf/win cache to store arbitrary data. Also I was trying to customize the sign/fold columns but I gave up as it feels buggy enough to not be worth it
Ah sorry about that @rebelot ! I can take some time in the coming days/week to make a PR with some snippets. I have gotten fold indicators working quite nicely by exposing some C based fold APIs with Lua ffi
Working on my Heirline statuscol right now (that's why I wanted to add #165), I'd be happy to contribute some snippets as well :)
Also @mehalter, mind linking that fold FFI code if you still have it?
@willothy Sure! Sorry I haven't had time to get around to this yet. Life has been super busy 😅 Here is the code I've been using for a while, it is part of a pretty large API for building lines/bars in Heirline where functions return pieces of Heirline components, so it looks a bit different than if you just wanted to implement these components directly. But it can definitely be used as a reference:
Lua FFI code for fold API: https://github.com/AstroNvim/AstroNvim/blob/main/lua/astronvim/utils/ffi.lua
Links to the usage of this to build a foldcolumn component:
@willothy Sure! Sorry I haven't had time to get around to this yet. Life has been super busy 😅 Here is the code I've been using for a while, it is part of a pretty large API for building lines/bars in Heirline where functions return pieces of Heirline components, so it looks a bit different than if you just wanted to implement these components directly. But it can definitely be used as a reference:
Thanks! Appreciate the links. I'll open up a PR with some docs once I've got my statuscol polished.
Can anyone post some screenshots of how their statuscolumn looks like? Looking for inspiration / ideas 👀
@richin13 here is the statuscolumn
we use over in AstroNvim that is all Heirline based with click actions for folds/diagnostics/gitsigns/DAP, full support for vim option control like vim.opt.signcolumn
/vim.opt.number
/etc., as well as lazy loading and catching for peak refresh performance
The code is definitely a bit complicated and uses a fully custom Lua API we have for building Heirline components. But we use it to create our custom statusline, statuscolumn, winbar, and tabline
With heirline being able to be used for tabline, winbar, and statusline. Would we be able to use it for the new
statuscolumn
option that's coming in Neovim v0.9? Heirline's API would make it very easy to make a good looking status column with clickable actionsAlso as these similar options are added the number of parameters in the
.setup({...})
table are growing a lot. Would it make sense to move to a single table parameter where the first key is the option you are setting? like instead ofit could look like this:
then it's easy to add and remove new options that heirline can set