Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Centerialized icon glyph config #23

Closed
mochaaP opened this issue Sep 24, 2022 · 6 comments
Closed

Centerialized icon glyph config #23

mochaaP opened this issue Sep 24, 2022 · 6 comments

Comments

@mochaaP
Copy link

mochaaP commented Sep 24, 2022

e.g. https://github.com/NvChad/NvChad/blob/74e374ef7be0dac71c8c7d6a16b4cc1b0ebcb2e5/lua/plugins/configs/others.lua#L173-L177

display = {
  working_sym = "",
  error_sym = "",
  done_sym = "",
  removed_sym = "",
  moved_sym = "",
}
local present, icons = pcall(require, "nvchad_ui.icons")

if present then
  -- [ assign icons from ui ]
else
  -- [ fallback icons ]
end

["NvChad/ui"] = {
  override_options = {
    icons = {
      -- ...
    },
  },
}
@siduck
Copy link
Member

siduck commented Sep 24, 2022

hmm will move those soon.

@siduck
Copy link
Member

siduck commented Oct 4, 2022

btw @mochaaP you can override packer config to change its icons

@siduck
Copy link
Member

siduck commented Oct 4, 2022

[" packer name "] = {
  overriden_options = {
  display = {
  working_sym = "",
  error_sym = "",
  done_sym = "",
  removed_sym = "",
  moved_sym = "",
}
}

@siduck
Copy link
Member

siduck commented Nov 26, 2022

and i dont think its better to put all icons in one file, suppose the statusline only needs 4-5 icons and if the icon file is like 500 + LOC which would mean that it has many tables etc and loading it will add a lil overhead unlike loading 4-5 icons directly within the statusline config so closing this.

@siduck siduck closed this as completed Nov 26, 2022
@mochaaP
Copy link
Author

mochaaP commented Nov 26, 2022

This is actually a workaround for kitty not handling some nerd font glyphs because they fall in the RTL character codepoints, so we let users choose their own icon set (in my instance, material design icons). This idea is actually from vim-devicons, but I think there's other approach to do this more elegantly.

@siduck
Copy link
Member

siduck commented Nov 26, 2022

@mochaaP just override those configs , which icon do you want to change? And i thought kitty handles nerdfonts well, even something bare like st does

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants