From 33b35f16c144d8e85b80e4e541d03c83887a0fb5 Mon Sep 17 00:00:00 2001 From: Squibid Date: Thu, 28 Aug 2025 19:14:11 -0400 Subject: [PATCH] inline a thingy for funsies --- lua/conf/plugins/oil.lua | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/lua/conf/plugins/oil.lua b/lua/conf/plugins/oil.lua index f712010..7d90c2f 100644 --- a/lua/conf/plugins/oil.lua +++ b/lua/conf/plugins/oil.lua @@ -1,12 +1,5 @@ local map = core.misc.map -local permission_hlgroups = { - ["-"] = "NonText", - ["r"] = "DiagnosticSignWarn", - ["w"] = "DiagnosticSignHint", - ["x"] = "DiagnosticSignOk", -} - return { "stevearc/oil.nvim", lazy = dep_short.keymap("n", "-"), load = function() @@ -20,7 +13,12 @@ return { "stevearc/oil.nvim", local hls = {} for i = 1, #permission_str do 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 return hls end,