inline a thingy for funsies
This commit is contained in:
@@ -1,12 +1,5 @@
|
|||||||
local map = core.misc.map
|
local map = core.misc.map
|
||||||
|
|
||||||
local permission_hlgroups = {
|
|
||||||
["-"] = "NonText",
|
|
||||||
["r"] = "DiagnosticSignWarn",
|
|
||||||
["w"] = "DiagnosticSignHint",
|
|
||||||
["x"] = "DiagnosticSignOk",
|
|
||||||
}
|
|
||||||
|
|
||||||
return { "stevearc/oil.nvim",
|
return { "stevearc/oil.nvim",
|
||||||
lazy = dep_short.keymap("n", "-"),
|
lazy = dep_short.keymap("n", "-"),
|
||||||
load = function()
|
load = function()
|
||||||
@@ -20,7 +13,12 @@ return { "stevearc/oil.nvim",
|
|||||||
local hls = {}
|
local hls = {}
|
||||||
for i = 1, #permission_str do
|
for i = 1, #permission_str do
|
||||||
local char = permission_str:sub(i, i)
|
local char = permission_str:sub(i, i)
|
||||||
table.insert(hls, { permission_hlgroups[char], i - 1, i })
|
table.insert(hls, { ({
|
||||||
|
["-"] = "NonText",
|
||||||
|
["r"] = "DiagnosticSignWarn",
|
||||||
|
["w"] = "DiagnosticSignHint",
|
||||||
|
["x"] = "DiagnosticSignOk"
|
||||||
|
})[char], i - 1, i })
|
||||||
end
|
end
|
||||||
return hls
|
return hls
|
||||||
end,
|
end,
|
||||||
|
Reference in New Issue
Block a user