From 27bdad73f556e309ef7426d8c2f875088b9772a9 Mon Sep 17 00:00:00 2001 From: amelia squires Date: Mon, 2 Dec 2024 15:00:06 -0600 Subject: lots of stuff + work on settings ui --- fnl/opt.fnl | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) (limited to 'fnl/opt.fnl') diff --git a/fnl/opt.fnl b/fnl/opt.fnl index 17e4e0d..663fdee 100644 --- a/fnl/opt.fnl +++ b/fnl/opt.fnl @@ -11,13 +11,17 @@ (tset vim.opt :termguicolors true) ;--vim.opt.fillchars = { eob = ""} +(local color_change (fn [] + (vim.api.nvim_set_hl 0 :Normal {:bg :none}) + (vim.api.nvim_set_hl 0 :EndOfBuffer {:bg :none}) + (vim.api.nvim_set_hl 0 :NormalFloat {:bg :none}) + (vim.api.nvim_set_hl 0 :FloatBorder {:bg :none}))) + (when (= _G.settings.trans "enable") (vim.api.nvim_create_autocmd "Colorscheme" { :pattern :* - :callback (fn [] - (vim.api.nvim_set_hl 0 :Normal {:bg :none}) - (vim.api.nvim_set_hl 0 :NormalFloat {:bg :none}) - (vim.api.nvim_set_hl 0 :FloatBorder {:bg :none}))})) + :callback color_change}) + (color_change)) (vim.cmd (.. "colorscheme " _G.settings.colorscheme)) @@ -27,3 +31,6 @@ (vim.fn.mkdir target_path :p 0777)) (tset vim.o :undodir target_path) (tset vim.o :undofile true)) + +(when (not= _G.settings.layout "") + ((require (.. :layouts. _G.settings.layout)))) -- cgit v1.2.3