Closed desilinguist closed 1 year ago
Never mind. It works.
Happy to hear it worked! :) If you have a snippet you think would be useful for others. Feel free to open a PR to add it to the README.
hey! does the icon work though? I use a jetbrains nerd font and it doesn't seem to render the icon. Is it possible to change the icon through config?
@skolj, I see I didn't expose any configuration for this but could easily be done. Is that something you would like contribute with :)
Sure, I'd be happy to help! However, it looks like I can use the default icon
component option and customize it. But the hardcoded icon and highlight from the swenv component are still there.
This line in my config
gives me this result.
Do you need help with any changes?
Maybe the lualine plugin should be restructured, I honestly wasn't fully sure how it should look like so I put the icon directly in the string returned from update_status
:
https://github.com/AckslD/swenv.nvim/blob/adaa088121d2716611cad814ecc8f0cf73d0cc57/lua/lualine/components/swenv.lua#L19
Maybe only the venv name should be returned and icons etc go into self.options
in init
? Any thoughts on this?
yeah, that'd be nice I guess. I could move the hardcoded icon to default icon
option. Also, do we really need a default highlight?
Sounds good @skolj, yeah maybe default highlight is not needed indeed and the user can set that instead
Thanks both to the work on the icon stuff. Can one of you help me the last bit? I prefer no icon. Here is my sections
part from the lualine
config:
sections = {
lualine_a = {'mode'},
lualine_b = {'branch', 'diff', 'swenv', icon=''},
lualine_c = {'filename'},
lualine_x = {'filetype'},
lualine_y = {'searchcount'},
lualine_z = {'progress'}
},
But that does not work.
@DanielAndreasen wrap swenv
component in braces, i.e., lualine_b = {'branch', 'diff', { 'swenv', icon='' } },
Perfect - thanks for the reply. Works like a charm
Sorry, I am new to neovim so it's not obvious to me how to use the lualine component provided by this plugin? It'd be great if this was in the documentation too.