summaryrefslogtreecommitdiff
path: root/pkgs/custom-neovim/config/lua/utilities.lua
diff options
context:
space:
mode:
authortriethyl <triethylammonium@pm.me>2025-07-13 14:51:46 -0400
committertriethyl <triethylammonium@pm.me>2025-07-13 14:51:46 -0400
commitfa2d77c6627e8715025dfba2c4814d2d24d0f6f7 (patch)
tree2bfc175eca036bee498a168534a65ce0910040f2 /pkgs/custom-neovim/config/lua/utilities.lua
parentdacca9aa76fc197c318305627a6dbf05f384519c (diff)
parent9a06380449c98e374d2db1f9a477614d82f9ff91 (diff)
Merge branch 'pkgs/custom-neovim'
Diffstat (limited to 'pkgs/custom-neovim/config/lua/utilities.lua')
-rw-r--r--pkgs/custom-neovim/config/lua/utilities.lua25
1 files changed, 25 insertions, 0 deletions
diff --git a/pkgs/custom-neovim/config/lua/utilities.lua b/pkgs/custom-neovim/config/lua/utilities.lua
new file mode 100644
index 0000000..3de4a54
--- /dev/null
+++ b/pkgs/custom-neovim/config/lua/utilities.lua
@@ -0,0 +1,25 @@
+utils = {}
+
+utils.mapkey = function(mode, key, desc, action)
+ vim.keymap.set(mode, key, action, {noremap = true, silent = true, desc = desc})
+end
+
+utils.generate_theme_from_lualine = function()
+ local auto_theme = require("lualine.themes.auto")
+ return {
+ modes = {
+ normal = auto_theme.normal.a.bg,
+ insert = auto_theme.insert.a.bg,
+ visual = auto_theme.visual.a.bg,
+ replace = auto_theme.replace.a.bg,
+ command = auto_theme.command.a.bg,
+ inactive = auto_theme.inactive.a.bg,
+ },
+ text = {
+ dark = auto_theme.normal.a.fg,
+ light = auto_theme.normal.c.fg,
+ },
+ background = auto_theme.normal.c.bg,
+ }
+end
+