Skip to content

Commit

Permalink
Merge branch 'master' into revert-js
Browse files Browse the repository at this point in the history
  • Loading branch information
alex-courtis authored Jan 29, 2024
2 parents e69de7b + 7fd8d7f commit 992e18a
Show file tree
Hide file tree
Showing 6 changed files with 129 additions and 11 deletions.
28 changes: 28 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: Release

on:
push:
tags:
- 'v*'

workflow_dispatch:

jobs:
luarocks-upload:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: LuaRocks Upload
uses: nvim-neorocks/luarocks-tag-release@v5
env:
LUAROCKS_API_KEY: ${{ secrets.LUAROCKS_API_KEY }}
with:
summary: Nerd Font icons for neovim
detailed_description: |
Coloured Nerd Font file icons for neovim.
Dark and light background variants.
https://www.nerdfonts.com/
license: MIT
labels: neovim
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
repos:
- repo: https://github.com/johnnymorganz/stylua
rev: v0.19.1
rev: v0.20.0
hooks:
- id: stylua-github
fail_fast: true
Expand Down
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,8 @@ or with [packer.nvim](https://github.com/wbthomason/packer.nvim)
use 'nvim-tree/nvim-web-devicons'
```

[![LuaRocks](https://img.shields.io/luarocks/v/nvim-tree/nvim-web-devicons?logo=lua&color=purple)](https://luarocks.org/modules/nvim-tree/nvim-web-devicons)

## Usage

### Variants
Expand Down
20 changes: 12 additions & 8 deletions lua/nvim-web-devicons.lua
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,13 @@ local M = {}
-- When adding new icons, remember to add an entry to the `filetypes` table, if applicable.
local icons, icons_by_filename, icons_by_file_extension, icons_by_operating_system

local default_icon = {
icon = "",
color = "#6d8086",
cterm_color = "66",
name = "Default",
}

function M.get_icons()
return icons
end
Expand All @@ -28,6 +35,7 @@ local function refresh_icons()
icons_by_operating_system = theme.icons_by_operating_system
icons = vim.tbl_extend("keep", {}, icons_by_filename, icons_by_file_extension, icons_by_operating_system)
icons = vim.tbl_extend("force", icons, global_opts.override)
icons[1] = default_icon
end

-- Map of filetypes -> icon names
Expand Down Expand Up @@ -58,6 +66,7 @@ local filetypes = {
["cson"] = "cson",
["css"] = "css",
["csv"] = "csv",
["cuda"] = "cu",
["d"] = "d",
["dart"] = "dart",
["desktop"] = "desktop",
Expand Down Expand Up @@ -97,6 +106,7 @@ local filetypes = {
["go"] = "go",
["godot"] = "godot",
["graphql"] = "graphql",
["groovy"] = "groovy",
["gql"] = "gql",
["gruntfile"] = "gruntfile",
["gulpfile"] = "gulpfile",
Expand All @@ -107,6 +117,7 @@ local filetypes = {
["html"] = "html",
["ico"] = "ico",
["idlang"] = "pro",
["ino"] = "ino",
["import"] = "import",
["java"] = "java",
["javascript"] = "js",
Expand Down Expand Up @@ -230,13 +241,6 @@ local filetypes = {
["zsh"] = "zsh",
}

local default_icon = {
icon = "",
color = "#6d8086",
cterm_color = "66",
name = "Default",
}

local function get_highlight_name(data)
if not global_opts.color_icons then
data = default_icon
Expand Down Expand Up @@ -352,7 +356,7 @@ function M.setup(opts)
icons_by_file_extension = vim.tbl_extend("force", icons_by_file_extension, user_file_ext_icons)
end

table.insert(icons, default_icon)
icons[1] = default_icon

M.set_up_highlights()

Expand Down
44 changes: 43 additions & 1 deletion lua/nvim-web-devicons/icons-default.lua
Original file line number Diff line number Diff line change
Expand Up @@ -251,6 +251,12 @@ local icons_by_filename = {
cterm_color = "66",
name = "Makefile",
},
["groovy"] = {
icon = "",
color = "#4a687c",
cterm_color = "24",
name = "Groovy",
},
["gruntfile"] = {
icon = "",
color = "#e37933",
Expand Down Expand Up @@ -335,6 +341,24 @@ local icons_by_filename = {
cterm_color = "196",
name = "SvelteConfig",
},
["tailwind.config.js"] = {
icon = "󱏿",
color = "#20c2e3",
cterm_color = "45",
name = "TailwindConfig",
},
["tailwind.config.mjs"] = {
icon = "󱏿",
color = "#20c2e3",
cterm_color = "45",
name = "TailwindConfig",
},
["tailwind.config.ts"] = {
icon = "󱏿",
color = "#20c2e3",
cterm_color = "45",
name = "TailwindConfig",
},
["tsconfig.json"] = {
icon = "",
color = "#519aba",
Expand Down Expand Up @@ -609,7 +633,7 @@ local icons_by_file_extension = {
name = "Css",
},
["csv"] = {
icon = "󰈙",
icon = "",
color = "#89e051",
cterm_color = "113",
name = "Csv",
Expand All @@ -620,6 +644,18 @@ local icons_by_file_extension = {
cterm_color = "74",
name = "Cts",
},
["cu"] = {
icon = "",
color = "#89e051",
cterm_color = "113",
name = "cuda",
},
["cuh"] = {
icon = "",
color = "#a074c4",
cterm_color = "140",
name = "cudah",
},
["cxx"] = {
icon = "",
color = "#519aba",
Expand Down Expand Up @@ -968,6 +1004,12 @@ local icons_by_file_extension = {
cterm_color = "66",
name = "Ini",
},
["ino"] = {
icon = "",
color = "#56b6c2",
cterm_color = "65",
name = "arduino",
},
["java"] = {
icon = "",
color = "#cc3e44",
Expand Down
44 changes: 43 additions & 1 deletion lua/nvim-web-devicons/icons-light.lua
Original file line number Diff line number Diff line change
Expand Up @@ -251,6 +251,12 @@ local icons_by_filename = {
cterm_color = "59",
name = "Makefile",
},
["groovy"] = {
icon = "",
color = "#384e5d",
cterm_color = "239",
name = "Groovy",
},
["gruntfile"] = {
icon = "",
color = "#975122",
Expand Down Expand Up @@ -335,6 +341,24 @@ local icons_by_filename = {
cterm_color = "160",
name = "SvelteConfig",
},
["tailwind.config.js"] = {
icon = "󱏿",
color = "#158197",
cterm_color = "31",
name = "TailwindConfig",
},
["tailwind.config.mjs"] = {
icon = "󱏿",
color = "#158197",
cterm_color = "31",
name = "TailwindConfig",
},
["tailwind.config.ts"] = {
icon = "󱏿",
color = "#158197",
cterm_color = "31",
name = "TailwindConfig",
},
["tsconfig.json"] = {
icon = "",
color = "#36677c",
Expand Down Expand Up @@ -609,7 +633,7 @@ local icons_by_file_extension = {
name = "Css",
},
["csv"] = {
icon = "󰈙",
icon = "",
color = "#447028",
cterm_color = "22",
name = "Csv",
Expand All @@ -620,6 +644,18 @@ local icons_by_file_extension = {
cterm_color = "24",
name = "Cts",
},
["cu"] = {
icon = "",
color = "#447028",
cterm_color = "22",
name = "cuda",
},
["cuh"] = {
icon = "",
color = "#6b4d83",
cterm_color = "96",
name = "cudah",
},
["cxx"] = {
icon = "",
color = "#36677c",
Expand Down Expand Up @@ -968,6 +1004,12 @@ local icons_by_file_extension = {
cterm_color = "59",
name = "Ini",
},
["ino"] = {
icon = "",
color = "#397981",
cterm_color = "30",
name = "arduino",
},
["java"] = {
icon = "",
color = "#992e33",
Expand Down

0 comments on commit 992e18a

Please sign in to comment.