inline a thingy for funsies
This commit is contained in:
parent
a7ac4e76ea
commit
33b35f16c1
1 changed files with 6 additions and 8 deletions
|
|
@ -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,
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue