Compare commits

...

6 commits

Author SHA1 Message Date
5c7b8ed564
aerc: Add ikhal calendar key bind
Open ikhal in an embedded terminal with <space>k.
2025-09-30 14:35:52 +02:00
d8d126e51e
office: Remove left-over calcurse alias
I have not used calcurse in a _long_ time, preferring khal nowadays.
This removes an old (vdir-enabling) alias in the office module.
2025-09-30 14:35:51 +02:00
36f6e0b30f
aerc: Split edit in compose view to edit headers by default 2025-09-30 14:35:51 +02:00
7fa4b06eea
carapace: Alias cat to bat
For some reason the regular 'cat' completion does not work, perhaps
because it is regularly aliased to 'bat' on my systems. This manually
fixes it with a spec alias for carapace
(https://carapace-sh.github.io/carapace-bin/spec/run.html#alias)

Should find a better implementation over time but for now this is a
simple workaround. I do _not_ know how it interacts with systems when no
'bat' command is found.
2025-09-30 14:35:50 +02:00
c3e2720b3c
wezterm: Rename tabs
Rename tabs with `<leader><S-R>`. This will provide a (full-screen)
prompt in which you can exit with esc (not changing anything), provide a
static name for the tab, or hit enter with nothing on the prompt to
return to the default naming behavior.
2025-09-30 14:35:50 +02:00
1f328d2663
nvim: Add copilot suggestions to blink
Suggestions are given at the top of the completion menu. Additionally,
since that can get really annoying really quick there have been some
changes specifically for copilot.lua:

We start with it disabled. It can be enabled with `<leader>ap` and
disabled again with `<leader>aP` for Ai>coPilot. If the plugin at some
point exposes functionality to toggle itself on/off completely I would
gladly switch to that. The current toggle command only attaches/detaches
the buffer but still runs the client in the background. This is less
desirable for me, plus it means the completions are still done
automatically in blink.
2025-09-30 14:35:49 +02:00
6 changed files with 84 additions and 34 deletions

View file

@ -3,6 +3,7 @@
"FixCursorHold.nvim": { "branch": "master", "commit": "1900f89dc17c603eec29960f57c00bd9ae696495" },
"Navigator.nvim": { "branch": "master", "commit": "91d86506ac2a039504d5205d32a1d4bc7aa57072" },
"bats.vim": { "branch": "master", "commit": "6a5d2ef22b0ede503d867770afd02ebb1f97b709" },
"blink-copilot": { "branch": "main", "commit": "41e91a659bd9b8cba9ba2ea68a69b52ba5a9ebd8" },
"blink.cmp": { "branch": "main", "commit": "9bcb14b43852a6f2bfd5ac9ef29cb5cf09b1b39b" },
"blink.compat": { "branch": "main", "commit": "2ed6d9a28b07fa6f3bface818470605f8896408c" },
"cmp-calc": { "branch": "main", "commit": "5947b412da67306c5b68698a02a846760059be2e" },

View file

@ -2,22 +2,79 @@ return {
{
-- NOTE: Requires manual auth with ':Copilot auth' or 'GH_COPILOT_TOKEN' set as envvar
"zbirenbaum/copilot.lua",
dependencies = { "AndreM222/copilot-lualine" },
dependencies = {
"AndreM222/copilot-lualine",
{ -- show completions in blink
"saghen/blink.cmp",
optional = true,
dependencies = {
{
"fang2hou/blink-copilot",
opts = {
auto_refresh = {
backward = false,
forward = false,
},
},
},
},
opts = {
sources = {
default = { "copilot" },
providers = {
copilot = {
name = "copilot",
module = "blink-copilot",
score_offset = 100,
async = true,
},
},
},
},
},
},
cmd = "Copilot",
event = "InsertEnter",
event = { "InsertEnter", "VeryLazy" },
opts = {
panel = { layout = { position = "bottom" } },
suggestion = { keymap = { accept = "<M-p>" } },
logger = { print_log_level = vim.log.levels.ERROR },
},
config = function(_, opts)
require("copilot").setup(opts)
-- TODO: See also https://github.com/zbirenbaum/copilot.lua/issues/302 for potential
-- better solutions.
-- TODO: also Find way of having a 'toggle' for mapping below.
-- Current copilot.lua exposed 'toggle' command does NOT do the same.
require("copilot.command").disable()
end,
keys = {
{
"<leader>ap",
"<leader>aC",
function()
-- FIXME: If opening before lazy-loaded, errors
require("copilot.panel").setup()
require("copilot.panel").open({})
require("copilot.panel").refresh()
end,
desc = "Refresh Copilot Panel",
desc = "Open copilot panel",
silent = true,
mode = { "n" },
},
{
"<leader>ap",
function()
require("copilot.command").enable()
end,
desc = "Enable copilot",
silent = true,
mode = { "n" },
},
{
"<leader>aP",
function()
require("copilot.command").disable()
end,
desc = "Disable copilot",
silent = true,
mode = { "n" },
},

View file

@ -90,6 +90,8 @@ l = :view<Enter>
<space>w = :filter tag:wait<Enter>
<space>l = :filter tag:delegated<Enter>
<space>k = :terminal ikhal<Enter>
d = :move Trash<Enter>
D = :choose -o y 'Really delete this message' :delete<Enter>
a = :archive flat<Enter> # archive message
@ -209,7 +211,8 @@ x = :encrypt<Enter> # Toggle encryption to all recipients
v = :preview<Enter> # Preview message
p = :postpone<Enter> # Postpone
q = :choose -o d discard abort -o p postpone postpone<Enter> # Abort or postpone
e = :edit<Enter> # Edit (body and headers)
e = :edit -e<Enter> # Edit, headers in-message
E = :edit -E<Enter> # Edit, body and headers separate
a = :attach -m<Enter> # Add attachment
d = :detach<space> # Remove attachment

View file

@ -1,27 +0,0 @@
#!/usr/bin/env sh
#
# Wraps around the calcurse invocation and syncs calendar data
# to local vdir - given by default below.
#
# For now ONLY PROVIDES ONE-WAY Synchronization, see below.
# The path in which *the calendars* reside (i.e. toplevel with access to all paths)
CAL_PATH="$HOME/documents/calendars"
calcurse() {
find "$CAL_PATH" -maxdepth 1 -type d -exec calcurse-vdir import {} \;
}
# Enable two-way sync. One issue is that calcurse would sync everything
# into the top-level path (or the selected calendar path) since it makes
# not the same differentiation as the vdir between calendars.
# FIXME Not sure how to resolve currently.
#
# The below works as a simple two-way synchronization on exiting calcurse.
# To function the invocation has to be turned from a function above to an
# executable shell-script file instead.
# trap 'calcurse_export' 0
#
# calcurse_export() {
# calcurse-vdir export "$CAL_PATH"
# }

View file

@ -0,0 +1,3 @@
# yaml-language-server: $schema=https://carapace.sh/schemas/command.json
name: cat
run: "[bat]"

View file

@ -52,6 +52,19 @@ local keys = {
mods = "LEADER|CTRL",
action = act.PaneSelect({ mode = "MoveToNewTab" }),
},
{
key = "R",
mods = "LEADER",
action = act.PromptInputLine({
description = "Enter new name for tab",
action = wezterm.action_callback(function(win, _, line)
if line then
win:active_tab():set_title(line)
end
end),
}),
},
{ key = "c", mods = "LEADER", action = act.SpawnTab("CurrentPaneDomain") },
{ key = ",", mods = "LEADER", action = act.ActivateTabRelative(-1) },
{ key = ".", mods = "LEADER", action = act.ActivateTabRelative(1) }, -- workspace selection
@ -62,6 +75,7 @@ local keys = {
mods = "LEADER",
action = act.ShowLauncherArgs({ flags = "FUZZY|WORKSPACES" }),
},
{ key = "t", mods = "LEADER", action = act.EmitEvent("toggle-tabbar") },
{ key = "T", mods = "LEADER", action = act.ShowTabNavigator },
{ key = "[", mods = "LEADER", action = act.ActivateCopyMode },
{
@ -105,7 +119,6 @@ local keys = {
},
{ key = "e", mods = "LEADER", action = act.EmitEvent("edit-scrollback") },
{ key = "a", mods = "CTRL|ALT", action = act.EmitEvent("toggle-leader") },
{ key = "t", mods = "LEADER", action = act.EmitEvent("toggle-tabbar") },
{
key = ":",
mods = "LEADER|SHIFT",