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

Feat: Default filetype icon #1337

Open
sanjapm opened this issue Nov 26, 2024 · 6 comments
Open

Feat: Default filetype icon #1337

sanjapm opened this issue Nov 26, 2024 · 6 comments
Labels
new feature New feature or feature request

Comments

@sanjapm
Copy link

sanjapm commented Nov 26, 2024

Requested feature

Option to set default filetype icon which is displayed if the opened file has no filetype icon

Motivation

Ensures consistency, all files get icons.

@sanjapm sanjapm added the new feature New feature or feature request label Nov 26, 2024
@florianAriasu
Copy link

florianAriasu commented Nov 26, 2024

Hi! Assuming you use this plugin: nvim-web-devicons so to handle file icons, you will need to add a default icon configuration setup, for instance:

require('nvim-web-devicons').setup({
  override = {},
  default = true,  -- Enable default icon fallback
  default_icon = {
    icon = "📄",  -- Replace with any icon you like
    color = "#6d8086",  -- Icon color (optional)
    cterm_color = "65",  -- Terminal color code (optional)
    name = "Default"
  }
})

@sanjapm
Copy link
Author

sanjapm commented Nov 26, 2024

I'm using Lazyvim, which uses mini.icons to handle file icons. I tried using the below configuration, but it did not work.

return {
  "echasnovski/mini.icons",
  opts = {
    default = { file = { glyph = "" } },
  },
}

@florianAriasu
Copy link

florianAriasu commented Nov 26, 2024

Try this:

return {
  "echasnovski/mini.icons",
  opts = function(_, opts)
    opts.default = {
      file = { glyph = " " },
    }
  end,
}

lmk if it worked!

@sanjapm
Copy link
Author

sanjapm commented Nov 26, 2024

It did not work unfortunately :(. Do you think I should open an issue in the mini.icons or LazyVim repo instead?

@florianAriasu
Copy link

Yes, you could try this as well!

@sanjapm
Copy link
Author

sanjapm commented Nov 26, 2024

Thanks for your help Ariasu! I'll keep this issue open until I get a fix.

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

No branches or pull requests

2 participants