feat: initial nonicons.nvim rewrite
Problem: the original ya2s/nvim-nonicons fork diverged enough that maintaining it as a fork was pointless. The set_icon() approach broke with modern nvim-web-devicons, and the extensions directory coupled integrations that belong in user config. Solution: from-scratch rewrite with function wrapping + table mutation override engine, vim.g.nonicons config pattern, vendored mapping with integer codepoints, health check, vimdoc with recipes, and no built-in plugin integrations.
This commit is contained in:
commit
04791cd41a
15 changed files with 1491 additions and 0 deletions
29
lua/nonicons/health.lua
Normal file
29
lua/nonicons/health.lua
Normal file
|
|
@ -0,0 +1,29 @@
|
|||
local M = {}
|
||||
|
||||
function M.check()
|
||||
vim.health.start('nonicons.nvim')
|
||||
|
||||
local ok, devicons = pcall(require, 'nvim-web-devicons')
|
||||
if ok and devicons then
|
||||
vim.health.ok('nvim-web-devicons available')
|
||||
else
|
||||
vim.health.error('nvim-web-devicons not found')
|
||||
end
|
||||
|
||||
local result = vim.fn.system({ 'fc-list', ':family=nonicons' })
|
||||
if result ~= '' then
|
||||
vim.health.ok('nonicons font installed')
|
||||
else
|
||||
vim.health.warn('nonicons font not detected (fc-list :family=nonicons returned empty)')
|
||||
end
|
||||
|
||||
local mapping = require('nonicons.mapping')
|
||||
local count = vim.tbl_count(mapping)
|
||||
if count > 0 then
|
||||
vim.health.ok('mapping loaded (' .. count .. ' icons)')
|
||||
else
|
||||
vim.health.error('mapping table is empty')
|
||||
end
|
||||
end
|
||||
|
||||
return M
|
||||
Loading…
Add table
Add a link
Reference in a new issue