dokwork / lualine-ex

Plugin for lualine.nvim with additional components and tools
MIT License
22 stars 1 forks source link

Show formatters and linters instead of `null_ls` #25

Closed tnthi115 closed 9 months ago

tnthi115 commented 9 months ago

Instead of showing null_ls, it would be nice to see which formatters and linters are attached to the buffer like in Lunarvim or Astronvim.

image

vladimir-popov commented 9 months ago

I suppose, it would be better to create a separate component specially for your case. I don't use null_ls, but I'll try to look into it when I will have time

vladimir-popov commented 9 months ago

@tnthi115 according to this issue https://github.com/jose-elias-alvarez/null-ls.nvim/issues/1621 null-ls is not supported. Do you know an actual fork?

vladimir-popov commented 9 months ago

Ok, I've found the answer. The LunarVim already moved to none-ls.nvim: https://github.com/LunarVim/LunarVim/pull/4392.

tnthi115 commented 9 months ago

This snippet is probably helpful: https://gist.github.com/Lamarcke/36e086dd3bb2cebc593d505e2f838e07

vladimir-popov commented 9 months ago

@tnthi115 check please this PR, is it ok for you, or maybe you have any ideas? https://github.com/dokwork/lualine-ex/pull/26

tnthi115 commented 9 months ago

@vladimir-popov Great work, thank you! Have you considered extending the ex.lsp.all list instead of having a separate component and list for null_ls alone?

vladimir-popov commented 9 months ago

@tnthi115 I'm still thinking that separate components are better and more flexible. For instance, I find it preferable to utilize the ex.lsp.all component in the only_icons mode. The specific names of LSP servers are less critical to me. Conversely, when dealing with null-ls, it is reasonable to see the full names of actual sources. So, I personally hide an icon for null-ls in the ex.lsp.all component by setting empty string to it, and it looks like this:

Screenshot 2023-12-27 at 12 51 00

Maybe you have use-case in which separate components are not appropriate to you?

tnthi115 commented 9 months ago

@vladimir-popov I think your example works well. Thank you for your hard work!