This repository has no description
0

Configure Feed

Select the types of activity you want to include in your feed.

nvim: change homegrown theme switcher to vim-lumen

+12 -35
+12 -35
tools/nvim.nix
··· 37 37 " need to use lua to expand $HOME 38 38 lua vim.o.undodir = vim.fs.normalize('$HOME/.vim/undodir') 39 39 ''; 40 - extraConfigLua = '' 41 - local function watch_theme_file() 42 - local path = '/var/theme/current_theme' 43 - local uv = vim.loop 44 - 45 - local watcher = uv.new_fs_event() 46 - watcher:start(path, {}, function(err, filename, events) 47 - if err then 48 - print('Error watching file:', err) 49 - return 50 - end 51 - 52 - -- Use Lua's io.open to read the file content 53 - local file = io.open(path, 'r') 54 - if not file then 55 - print('Failed to open file:', path) 56 - return 57 - end 58 - 59 - local content = file:read('*a') -- Read the entire file 60 - file:close() 61 - 62 - content = content:gsub('%s+$', "") 63 - content = content:gsub('"', '\\"') 64 - 65 - -- Execute a Neovim command based on the content 66 - vim.schedule(function() 67 - cmd = 'set background=' .. content 68 - vim.cmd(cmd) 69 - end) 70 - end) 71 - end 72 - watch_theme_file() 73 - 74 - ''; 40 + extraPackages = [ 41 + pkgs.glib # for vim-lumen 42 + ]; 75 43 extraPlugins = [ 76 44 pkgs.vimPlugins.vim-fetch 45 + (pkgs.vimUtils.buildVimPlugin { 46 + name = "vim-lumen"; 47 + src = pkgs.fetchFromGitHub { 48 + owner = "vimpostor"; 49 + repo = "vim-lumen"; 50 + rev = "ac13c32c3e309f6c6a84ff6cad8dbb135e75f0e4"; 51 + hash = "sha256-rsDUDI9lh4CEX1upMBjeyBOm99GAXWGPQ9vSCN8cmFo="; 52 + }; 53 + }) 77 54 ]; 78 55 # not ready yet, we are waiting for none-ls to get updated 79 56 # extraConfigLua = ''