🪴 my neovim config:)
1
fork

Configure Feed

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

plugins: move jamjar to plugin

robin dfaf22b7 2e25cfd6

+70 -171
+23
config/config/jamjar.lua
··· 1 + local jamjar = require("jamjar") 2 + 3 + vim.keymap.set({ "n", "t" }, "<m-`>", [[<c-\><c-n><Plug>(jamjar-toggle-scratch)]]) 4 + vim.keymap.set( 5 + "n", 6 + "<leader>tg", 7 + jamjar.make("lazygit", { 8 + cmd = "lazygit", 9 + winoptsfn = function() 10 + local height = math.ceil(vim.o.lines * 0.8) 11 + local width = math.ceil(vim.o.columns * 0.8) 12 + return { 13 + relative = "editor", 14 + row = (vim.o.lines - height) / 2, 15 + height = height, 16 + col = (vim.o.columns - width) / 2, 17 + width = width, 18 + style = "minimal", 19 + } 20 + end, 21 + on_open = function(_) end, 22 + }) 23 + )
+5
config/lua/ivy/plugins/init.lua
··· 138 138 }, 139 139 140 140 { 141 + "jamjar.nvim", 142 + event = "UIEnter", 143 + }, 144 + 145 + { 141 146 "cord.nvim", 142 147 name = "cord.nvim", 143 148 lazy = false,
-171
config/plugin/jamjar.lua
··· 1 - if vim.g.loaded_jamjar then 2 - return 3 - end 4 - 5 - vim.g.loaded_jamjar = true 6 - 7 - ---@return vim.api.keyset.win_config 8 - local function get_winopts() 9 - local horiz = vim.opt.fillchars:get().horiz 10 - 11 - local height = math.ceil(vim.o.lines * 0.3) 12 - local offset = vim.o.cmdheight + 1 13 - 14 - return { 15 - relative = "editor", 16 - col = 0, 17 - row = vim.o.lines - height - offset - 1, 18 - height = height, 19 - width = vim.o.columns, 20 - style = "minimal", 21 - border = { horiz, horiz, horiz, "", "", "", "", "" }, 22 - } 23 - end 24 - 25 - ---@class jamjar.Terminal.proto 26 - ---@field cmd? string 27 - ---@field cwd? string 28 - ---@field winoptsfn? fun(): vim.api.keyset.win_config 29 - ---@field on_open? fun(self: jamjar.Terminal) 30 - 31 - ---@class jamjar.Terminal : jamjar.Terminal.proto 32 - ---@field cmd string 33 - ---@field buf integer 34 - ---@field win? integer 35 - local Terminal = {} 36 - Terminal.__index = Terminal 37 - 38 - local function get_defaultopts() 39 - return { 40 - cmd = vim.o.shell, 41 - on_open = function(self) 42 - vim.api.nvim_set_option_value( 43 - "winhighlight", 44 - "Normal:Normal,NormalNC:NormalNC,FloatBorder:WinSeparator", 45 - { win = self.win } 46 - ) 47 - end, 48 - } 49 - end 50 - 51 - ---@param opts? jamjar.Terminal.proto 52 - function Terminal:new(opts) 53 - return setmetatable(vim.tbl_extend("force", get_defaultopts(), opts or {}), self) 54 - end 55 - 56 - function Terminal:init() 57 - self.buf = vim.api.nvim_create_buf(true, true) 58 - vim.api.nvim_set_option_value("buftype", "nofile", { buf = self.buf }) 59 - 60 - vim._with({ buf = self.buf }, function() 61 - vim.fn.jobstart(self.cmd, { 62 - term = true, 63 - cwd = self.cwd, 64 - on_exit = function() 65 - self:delete() 66 - end, 67 - }) 68 - end) 69 - end 70 - 71 - function Terminal:toggle() 72 - if not self.win then 73 - self:open() 74 - return 75 - end 76 - 77 - local wcfg = vim.api.nvim_win_get_config(self.win) 78 - local hidden = wcfg.hide 79 - 80 - if hidden then 81 - self:open() 82 - else 83 - self:close() 84 - end 85 - end 86 - 87 - function Terminal:open() 88 - if not self.win then 89 - if not self.buf then 90 - self:init() 91 - end 92 - self.win = vim.api.nvim_open_win(self.buf, true, self.winoptsfn and self.winoptsfn() or get_winopts()) 93 - vim.api.nvim_set_option_value("signcolumn", "no", { win = self.win }) 94 - vim.api.nvim_set_option_value("foldcolumn", "0", { win = self.win }) 95 - self.on_open(self) 96 - else 97 - vim.api.nvim_win_set_config(self.win, { 98 - hide = false, 99 - }) 100 - vim.api.nvim_set_current_win(self.win) 101 - end 102 - end 103 - 104 - function Terminal:close() 105 - if self.win then 106 - vim.api.nvim_win_set_config(self.win, { 107 - hide = true, 108 - }) 109 - if vim.api.nvim_get_current_win() == self.win then 110 - vim.cmd.wincmd("p") 111 - end 112 - end 113 - end 114 - 115 - function Terminal:quit() 116 - if self.win then 117 - vim.api.nvim_win_close(self.win, true) 118 - self.win = nil 119 - end 120 - end 121 - 122 - function Terminal:delete() 123 - self:quit() 124 - 125 - if self.buf and vim.api.nvim_buf_is_valid(self.buf) then 126 - vim.bo[self.buf].buflisted = false 127 - vim.api.nvim_buf_delete(self.buf, { unload = true }) 128 - self.buf = nil 129 - end 130 - end 131 - 132 - local terminals = {} 133 - 134 - local function makemanaged(name, opts) 135 - return function() 136 - local term = terminals[name] 137 - if not term then 138 - term = Terminal:new(opts) 139 - vim.schedule(function() 140 - terminals[name] = term 141 - end) 142 - 143 - term:init() 144 - end 145 - term:toggle() 146 - end 147 - end 148 - 149 - vim.keymap.set("n", "<Plug>(jamjar-toggle-scratch)", makemanaged("scratch")) 150 - 151 - vim.keymap.set({ "n", "t" }, "<m-`>", [[<c-\><c-n><Plug>(jamjar-toggle-scratch)]]) 152 - vim.keymap.set( 153 - "n", 154 - "<leader>tg", 155 - makemanaged("lazygit", { 156 - cmd = "lazygit", 157 - winoptsfn = function() 158 - local height = math.ceil(vim.o.lines * 0.8) 159 - local width = math.ceil(vim.o.columns * 0.8) 160 - return { 161 - relative = "editor", 162 - row = (vim.o.lines - height) / 2, 163 - height = height, 164 - col = (vim.o.columns - width) / 2, 165 - width = width, 166 - style = "minimal", 167 - } 168 - end, 169 - on_open = function(_) end, 170 - }) 171 - )
+22
pkgs/ivy-plugins/_sources/generated.json
··· 273 273 }, 274 274 "version": "3b53b0eb26972686c5825d7c0e63b3cffd0c4f2b" 275 275 }, 276 + "jamjar-nvim": { 277 + "cargoLocks": null, 278 + "date": "2026-01-09", 279 + "extract": null, 280 + "name": "jamjar-nvim", 281 + "passthru": { 282 + "as": "jamjar" 283 + }, 284 + "pinned": false, 285 + "src": { 286 + "deepClone": false, 287 + "fetchSubmodules": false, 288 + "leaveDotGit": false, 289 + "name": null, 290 + "rev": "2e676f6b7ddf2ab326826f460388cf247a8c8837", 291 + "sha256": "sha256-952vwD5JDtUZPF4pWMGoakVKj4HlE/0DxS92Sa7DgXY=", 292 + "sparseCheckout": [], 293 + "type": "git", 294 + "url": "https://codeberg.org/comfysage/jamjar.nvim" 295 + }, 296 + "version": "2e676f6b7ddf2ab326826f460388cf247a8c8837" 297 + }, 276 298 "keymaps-nvim": { 277 299 "cargoLocks": null, 278 300 "date": "2025-07-31",
+15
pkgs/ivy-plugins/_sources/generated.nix
··· 159 159 as = "fzf"; 160 160 date = "2025-12-15"; 161 161 }; 162 + jamjar-nvim = { 163 + pname = "jamjar-nvim"; 164 + version = "2e676f6b7ddf2ab326826f460388cf247a8c8837"; 165 + src = fetchgit { 166 + url = "https://codeberg.org/comfysage/jamjar.nvim"; 167 + rev = "2e676f6b7ddf2ab326826f460388cf247a8c8837"; 168 + fetchSubmodules = false; 169 + deepClone = false; 170 + leaveDotGit = false; 171 + sparseCheckout = [ ]; 172 + sha256 = "sha256-952vwD5JDtUZPF4pWMGoakVKj4HlE/0DxS92Sa7DgXY="; 173 + }; 174 + as = "jamjar"; 175 + date = "2026-01-09"; 176 + }; 162 177 keymaps-nvim = { 163 178 pname = "keymaps-nvim"; 164 179 version = "f606f66b2aafbd0dbb4328aeab2b89e5dd9d3473";
+5
pkgs/ivy-plugins/nvfetcher.toml
··· 58 58 src.git = "https://github.com/ibhagwan/fzf-lua" 59 59 passthru.as = "fzf" 60 60 61 + [jamjar-nvim] 62 + fetch.git = "https://codeberg.org/comfysage/jamjar.nvim" 63 + src.git = "https://codeberg.org/comfysage/jamjar.nvim" 64 + passthru.as = "jamjar" 65 + 61 66 [keymaps-nvim] 62 67 fetch.github = "comfysage/keymaps.nvim" 63 68 src.git = "https://github.com/comfysage/keymaps.nvim"