fix(ci): luacats support
This commit is contained in:
parent
747e7b6222
commit
6a8668fab5
6 changed files with 121 additions and 0 deletions
|
|
@ -24,8 +24,11 @@ local function ensure_initialized()
|
|||
initialized = true
|
||||
end
|
||||
|
||||
---@type table<string, integer>
|
||||
M.mapping = require('nonicons.mapping')
|
||||
|
||||
---@param name string Icon name
|
||||
---@return string? glyph
|
||||
function M.get(name)
|
||||
local code = M.mapping[name]
|
||||
if code then
|
||||
|
|
@ -40,6 +43,9 @@ function M.apply()
|
|||
end
|
||||
end
|
||||
|
||||
---@param name string? Filename (e.g. `'init.lua'`)
|
||||
---@param ext string? File extension (e.g. `'lua'`)
|
||||
---@return string? glyph
|
||||
function M.get_icon(name, ext)
|
||||
local key = require('nonicons.resolve').resolve_name(name, ext)
|
||||
if key then
|
||||
|
|
@ -47,6 +53,8 @@ function M.get_icon(name, ext)
|
|||
end
|
||||
end
|
||||
|
||||
---@param ft string Vim filetype
|
||||
---@return string? glyph
|
||||
function M.get_icon_by_filetype(ft)
|
||||
local key = require('nonicons.resolve').resolve_filetype(ft)
|
||||
if key then
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue