Merge branch 'main' of labs.scarif.space:chris/nvim

This commit is contained in:
Chris
2026-08-21 11:59:34 +01:00
2 changed files with 30 additions and 28 deletions
+20 -26
View File
@@ -50,32 +50,6 @@ vim.api.nvim_create_autocmd('User', {
end,
})
local fidget_group = vim.api.nvim_create_augroup('CodeCompanionFidgetHooks', { clear = true })
vim.api.nvim_create_autocmd({ 'User' }, {
pattern = 'CodeCompanionRequestStarted',
group = fidget_group,
callback = function(event)
local FidgetHelper = require 'utils.fidget_helper'
-- Pass event instead of request if the callback receives the full event object
local handle = FidgetHelper:create_progress_handle(event)
FidgetHelper:store_progress_handle(event.data.id, handle)
end,
})
vim.api.nvim_create_autocmd({ 'User' }, {
pattern = 'CodeCompanionRequestFinished',
group = fidget_group,
callback = function(event)
local FidgetHelper = require 'utils.fidget_helper'
local handle = FidgetHelper:pop_progress_handle(event.data.id)
if handle then
FidgetHelper:report_exit_status(handle, event)
handle:finish()
end
end,
})
-- vim.api.nvim_create_autocmd('BufEnter', {
-- callback = function(event)
-- local windows = vim.api.nvim_list_wins()
@@ -124,6 +98,19 @@ vim.api.nvim_create_autocmd('BufWritePost', {
end,
})
-- Run shortcuts script when saving shortcut files
vim.api.nvim_create_autocmd('BufWritePost', {
pattern = {
(os.getenv 'XDG_CONFIG_HOME' or (os.getenv 'HOME' .. '/.config')) .. '/shell/bm-files',
(os.getenv 'XDG_CONFIG_HOME' or (os.getenv 'HOME' .. '/.config')) .. '/shell/bm-dirs',
},
desc = 'Run shortcuts script',
callback = function()
os.execute 'station-shortcuts'
vim.notify('Shortcuts updated!', vim.log.levels.INFO)
end,
})
local configs = {
{
path = os.getenv 'HOME' .. '/.config/nixos',
@@ -139,6 +126,13 @@ local configs = {
track_untracked = false,
force_add = false,
},
{
path = os.getenv 'HOME' .. '/Notes',
worktree = nil,
git_dir = nil,
track_untracked = true,
force_add = false,
},
{
path = os.getenv 'HOME',
worktree = os.getenv 'HOME',