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

Feature Request: enable an option to exclude predefined icons #102

Closed
cheeze2000 opened this issue Dec 19, 2021 · 2 comments
Closed

Feature Request: enable an option to exclude predefined icons #102

cheeze2000 opened this issue Dec 19, 2021 · 2 comments

Comments

@cheeze2000
Copy link

Is there currently a way to disable the use of the predefined icons? I was thinking maybe it can be an option during the setup.

require('nvim-web-devicons').setup {
  override = {},     -- we define all our icons here
  predefined = false -- use none of the predefined icons
}

The reason for this is so that I can define a universal default icon for every single filetype. Can you suggest a better approach perhaps?

@kyazdani42
Copy link
Member

not sure why you'd want to do this though :)
but it could be done somehow like this:

local icons = require'nvim-web-devicons'.get_icons()
local new_icons = {}
for ft, i in pairs(icons) do
  new_icons[ft] = {
    icon = "X",
    color = "#ffffff",
    cterm_color = 255,
   name = i.name
  }
end
require'nvim-web-devicons'.set_icon(new_icons)

or something like that

@gegoune
Copy link
Collaborator

gegoune commented Feb 14, 2023

Closing, feel free to reopen if provided solution is not adequate.

@gegoune gegoune closed this as completed Feb 14, 2023
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

3 participants