From 168864226d2629279efed9630d0af8cae4c914b2 Mon Sep 17 00:00:00 2001 From: triethyl Date: Wed, 30 Jul 2025 21:36:10 -0400 Subject: neovim: working on custom ui --- pkgs/custom-neovim/config/lua/utilities.lua | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) (limited to 'pkgs/custom-neovim/config/lua/utilities.lua') diff --git a/pkgs/custom-neovim/config/lua/utilities.lua b/pkgs/custom-neovim/config/lua/utilities.lua index 77645ca..d2a26b6 100644 --- a/pkgs/custom-neovim/config/lua/utilities.lua +++ b/pkgs/custom-neovim/config/lua/utilities.lua @@ -32,3 +32,20 @@ Utils.generate_theme_from_highlight_groups = function() background = get_highlight_colors("Normal").bg, } end + +Utils.link_highlight = function(first_highlight, second_highlight) + vim.cmd.highlight {bang = true, "link", first_highlight, second_highlight} +end + +Utils.replaceInTable = function(t, str1, str2) + for key, value in pairs(t) do + if type(value) == "string" then + -- Replace with w in the string + t[key] = value:gsub(str1, str2) + elseif type(value) == "table" then + -- Recursively process nested tables + Utils.replaceInTable(value, str1, str2) + end + end + return t +end -- cgit v1.2.3