Skip to content

Conversation

@luissimas
Copy link
Contributor

This adds the support for different icons when dealing with files that have multiple extensions (like users.test.js).

The motivation for this is based on this issue from nvim-web-devicons.

Given this sample config file for nvim-web-devicons:

require("nvim-web-devicons").setup {
  override = {
    ["test.js"] = {
      icon = "",
      color = "#cbcb41",
      name = "JsTest"
    },
    ["spec.js"] = {
      icon = "",
      color = "#cbcb41",
      name = "JsSpec"
    },
    ["test.lua"] = {
      icon = "",
      color = "#51a0cf",
      name = "LuaTest"
    },
    ["spec.lua"] = {
      icon = "",
      color = "#51a0cf",
      name = "LuaSpec"
    }
  },
  default = true
}

Original behavior

image

New behavior

image

@kyazdani42
Copy link
Member

this solution looks pretty good to me, i'm gonna test it out later today, and if it works as expected i'll merge it :) thanks

This new pattern suggested by @sindrets is way better in the sense
that it doesn't match dotfiles as if they were extensions.
Copy link
Member

@kyazdani42 kyazdani42 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks like it works fine :) thanks for the contribution !

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

Successfully merging this pull request may close these issues.

3 participants