From 41e36c4807a702d583152d028ea9a01b239d519e Mon Sep 17 00:00:00 2001 From: Zoe Roux Date: Mon, 6 Apr 2026 11:10:54 +0200 Subject: [PATCH] Add split options for jj pickers --- modules/cli/nix/impermanence.nix | 3 +++ modules/gui/kitty.nix | 4 +++- nvim/default.nix | 1 - nvim/lua/jj-snacks.lua | 22 +++++++++++++++++++++- nvim/lua/plugins/lsp.lua | 25 +------------------------ nvim/nix/bytecompile.nix | 24 +++++++++++++++++++++++- 6 files changed, 51 insertions(+), 28 deletions(-) diff --git a/modules/cli/nix/impermanence.nix b/modules/cli/nix/impermanence.nix index 356d40c..8e0c9ac 100644 --- a/modules/cli/nix/impermanence.nix +++ b/modules/cli/nix/impermanence.nix @@ -73,6 +73,7 @@ ".local/state/nvim" # opencode ".config/opencode" + ".cache/opencode" ".local/share/opencode" ".local/stateshare/opencode" # Gnome accounts @@ -86,6 +87,8 @@ ".cache/.bun" ".cache/yarn" ".cache/go-build" + # android studio + ".cache/Google" ]; files = [ ".config/zsh/custom.zsh" diff --git a/modules/gui/kitty.nix b/modules/gui/kitty.nix index 8666224..6c2ccaf 100644 --- a/modules/gui/kitty.nix +++ b/modules/gui/kitty.nix @@ -29,8 +29,10 @@ map ctrl+0 change_font_size current 0 map ctrl+backspace change_font_size current 0 - # this is used to map + # this is used for a tmux keybind. map ctrl+@ send_key f11 + + map ctrl+shift+f6 debug_config ''; }; diff --git a/nvim/default.nix b/nvim/default.nix index 3659d98..d5c2c87 100644 --- a/nvim/default.nix +++ b/nvim/default.nix @@ -66,7 +66,6 @@ in postPatch = "rm -rf doc/"; }) SchemaStore-nvim - # roslyn-nvim (conform-nvim.overrideAttrs { # clashes with oil postPatch = "rm doc/recipes.md"; diff --git a/nvim/lua/jj-snacks.lua b/nvim/lua/jj-snacks.lua index 4e9ed69..f89e7d6 100644 --- a/nvim/lua/jj-snacks.lua +++ b/nvim/lua/jj-snacks.lua @@ -132,6 +132,8 @@ Snacks.picker.jj_log = function(file) [""] = { "jj_edit", mode = { "i" } }, [""] = { "jj_squash", mode = { "i" } }, [""] = { "jj_squash_interactive", mode = { "i" } }, + [""] = { "jj_gsplit", mode = { "i" } }, + [""] = { "jj_gvsplit", mode = { "i" } }, }, }, }, @@ -148,6 +150,14 @@ Snacks.picker.jj_log = function(file) picker:close() vim.cmd(string.format("J squash -i -r %s", item.change_id)) end, + jj_gsplit = function(picker, item) + picker:close() + vim.cmd('Gsplit ' .. vim.fn.fnameescape(item.commit .. ':' .. file)) + end, + jj_gvsplit = function(picker, item) + picker:close() + vim.cmd('Gvsplit ' .. vim.fn.fnameescape(item.commit .. ':' .. file)) + end, }, }) end @@ -235,6 +245,8 @@ Snacks.picker.jj_show = function(ref) input = { keys = { [""] = { "jj_split", mode = { "i" } }, + [""] = { "jj_gsplit", mode = { "i" } }, + [""] = { "jj_gvsplit", mode = { "i" } }, }, }, }, @@ -248,7 +260,15 @@ Snacks.picker.jj_show = function(ref) 'J split "\'%s\'"', table.concat(items, "' | '") )) - end + end, + jj_gsplit = function(picker, item) + picker:close() + vim.cmd('Gvsplit ' .. vim.fn.fnameescape(item.commit .. ':' .. item.file)) + end, + jj_gvsplit = function(picker, item) + picker:close() + vim.cmd('Gsplit ' .. vim.fn.fnameescape(item.commit .. ':' .. item.file)) + end, }, }) end diff --git a/nvim/lua/plugins/lsp.lua b/nvim/lua/plugins/lsp.lua index 199f67f..42414cc 100644 --- a/nvim/lua/plugins/lsp.lua +++ b/nvim/lua/plugins/lsp.lua @@ -20,7 +20,7 @@ vim.lsp.enable({ "tailwindcss", "sqls", "qmlls", - "roslyn_ls", --we use roslyn.nvim plugin instead. + "roslyn_ls", }) -- vim.api.nvim_create_autocmd("LspAttach", { @@ -36,26 +36,3 @@ vim.lsp.on_type_formatting.enable() vim.lsp.document_color.enable(true, nil, { style = "virtual" }) return {} --- return { --- -- see https://github.com/seblyng/roslyn.nvim/pull/178 --- { --- "roslyn.nvim", --- ft = { "cs", "vb" }, --- opts = { --- broad_search = true, --- }, --- after = function(plug) --- vim.lsp.config("roslyn", { --- cmd = { --- 'Microsoft.CodeAnalysis.LanguageServer', --- '--logLevel', --- 'Information', --- '--extensionLogDirectory', --- vim.fs.joinpath(vim.uv.os_tmpdir(), 'roslyn_ls/logs'), --- '--stdio', --- }, --- }) --- require("roslyn").setup(plug.opts) --- end, --- }, --- } diff --git a/nvim/nix/bytecompile.nix b/nvim/nix/bytecompile.nix index dd44153..ad12516 100644 --- a/nvim/nix/bytecompile.nix +++ b/nvim/nix/bytecompile.nix @@ -17,7 +17,7 @@ luajit = lib.getExe' pkgs.luajit "luajit"; in pkgs.writeText "byte-compile-lua-hook.sh" # bash - + '' byteCompileLuaPostFixup() { # Target is a single file @@ -78,6 +78,28 @@ # or Nvim will use original runtime directory rm $out/bin/nvim cp ${package}/bin/nvim $out/bin/nvim + + # Ensure .desktop file exists for wrapNeovimUnstable + # (neovim nightly may not ship one) + mkdir -p $out/share/applications + if [ ! -e $out/share/applications/nvim.desktop ]; then + cat > $out/share/applications/nvim.desktop <