From 6f7627d2909b948f7fe65fa3b09eb26622741600 Mon Sep 17 00:00:00 2001 From: ViViDboarder Date: Fri, 10 Nov 2023 14:54:14 -0800 Subject: [PATCH] Move darknotify config to it's own file --- neovim/lua/plugins.lua | 14 +++----------- neovim/lua/plugins/darknotify.lua | 6 ++++++ 2 files changed, 9 insertions(+), 11 deletions(-) create mode 100644 neovim/lua/plugins/darknotify.lua diff --git a/neovim/lua/plugins.lua b/neovim/lua/plugins.lua index e404936..1754435 100644 --- a/neovim/lua/plugins.lua +++ b/neovim/lua/plugins.lua @@ -7,16 +7,6 @@ if vim.fn.empty(vim.fn.glob(install_path)) > 0 then end vim.cmd("packadd packer.nvim") --- Configures dark-notify to use colors from my environment -local function config_dark_notify() - require("dark_notify").run({ - onchange = function(_) - -- Defined in _colors - _G.update_colors() - end, - }) -end - local packer = require("packer") local packer_util = require("packer.util") local use = packer.use @@ -226,7 +216,9 @@ use({ disable = not vim.g.is_mac, -- Download latest release on install run = "curl -s https://api.github.com/repos/cormacrelf/dark-notify/releases/latest | jq '.assets[].browser_download_url' | xargs curl -Ls | tar xz -C ~/.local/bin/", -- luacheck: no max line length - config = config_dark_notify, + config = function() + require("plugins.darknotify") + end, requires = "https://github.com/nvim-lualine/lualine.nvim", }) diff --git a/neovim/lua/plugins/darknotify.lua b/neovim/lua/plugins/darknotify.lua new file mode 100644 index 0000000..6d224c3 --- /dev/null +++ b/neovim/lua/plugins/darknotify.lua @@ -0,0 +1,6 @@ +require("dark_notify").run({ + onchange = function(_) + -- Defined in _colors + _G.update_colors() + end, +})