mirror of
https://github.com/gabehf/base46.git
synced 2026-03-16 18:55:56 -07:00
avoid using plenary for simple tasks
This commit is contained in:
parent
66e057e65d
commit
33f9385512
1 changed files with 3 additions and 7 deletions
|
|
@ -2,16 +2,12 @@ local merge_tb = require("base46").merge_tb
|
||||||
|
|
||||||
local ui = require("core.utils").load_config().ui
|
local ui = require("core.utils").load_config().ui
|
||||||
local highlights = {}
|
local highlights = {}
|
||||||
local hl_dir = vim.fn.stdpath "data" .. "/site/pack/packer/opt/base46/lua/base46/integrations"
|
|
||||||
|
|
||||||
-- push hl_dir file names to table
|
-- push hl_dir file names to table
|
||||||
local hl_files = require("plenary.scandir").scan_dir(hl_dir, {})
|
local hl_files = vim.fn.stdpath "data" .. "/site/pack/packer/opt/base46/lua/base46/integrations"
|
||||||
|
|
||||||
for _, file in ipairs(hl_files) do
|
for _, file in ipairs(vim.fn.readdir(hl_files)) do
|
||||||
local a = vim.fn.fnamemodify(file, ":t")
|
local integration = require("base46.integrations." .. vim.fn.fnamemodify(file, ":r"))
|
||||||
a = vim.fn.fnamemodify(a, ":r")
|
|
||||||
|
|
||||||
local integration = require("base46.integrations." .. a)
|
|
||||||
highlights = merge_tb(highlights, integration)
|
highlights = merge_tb(highlights, integration)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue