Add comprehensive inline documentation to all modules and enhance README

Co-authored-by: dwinkler1 <22460147+dwinkler1@users.noreply.github.com>
This commit is contained in:
copilot-swe-agent[bot] 2026-01-11 19:40:13 +00:00
commit 40095ac868
13 changed files with 587 additions and 32 deletions

View file

@ -1,16 +1,42 @@
-- Configuration for mini.notify
-- Filters out some verbose LSP progress notifications
-- Neovim notification configuration using mini.notify
--
-- This file configures the mini.notify plugin to filter out verbose LSP messages.
-- It reduces noise from the Lua language server during development.
--
-- What it does:
-- - Sets up mini.notify as the notification handler
-- - Filters out "Diagnosing" and "semantic tokens" messages from lua_ls
-- - Keeps all other notifications visible
--
-- Usage:
-- Loaded automatically via flake.nix:
-- optionalLuaPreInit.project = [(builtins.readFile ./lib/mini-notify-config.lua)]
--
-- Customization:
-- - Add more patterns to filter in the predicate function
-- - Filter notifications from other LSP servers by client_name
-- - Adjust notification display settings in setup() call
-- Predicate function to filter notifications
-- Returns true if notification should be shown, false to hide it
local predicate = function(notif)
-- Keep all non-LSP notifications
if not (notif.data.source == "lsp_progress" and notif.data.client_name == "lua_ls") then
return true
end
-- Filter out some LSP progress notifications from 'lua_ls'
-- Filter out specific verbose LSP progress notifications from lua_ls
-- These messages are too frequent and not useful during development
return notif.msg:find("Diagnosing") == nil and notif.msg:find("semantic tokens") == nil
end
-- Custom sort function that applies filtering
-- Filters notification array before sorting
local custom_sort = function(notif_arr)
return MiniNotify.default_sort(vim.tbl_filter(predicate, notif_arr))
end
-- Initialize mini.notify with custom configuration
require("mini.notify").setup({ content = { sort = custom_sort } })
-- Set mini.notify as the default notification handler
vim.notify = MiniNotify.make_notify()

View file

@ -1,8 +1,27 @@
# Shell hook configuration
#
# This module generates the welcome message displayed when entering the dev shell.
# It provides information about available commands and how to get started.
#
# The message includes:
# - Project name and welcome banner
# - Quick start instructions (initProject, updateDeps)
# - List of all available commands based on enabled languages
# - Instructions for editing configuration
#
# Commands are conditionally shown based on config.enabledLanguages settings.
# This ensures users only see commands relevant to their configuration.
#
# Usage:
# Imported in flake.nix as:
# shellHook = import ./lib/shell-hook.nix config pkgs;
#
# Generates the help message displayed when entering the dev shell
config: pkgs: let
inherit (config) defaultPackageName enabledLanguages enabledPackages;
# Build dynamic list of available commands based on enabled languages
# Filters out empty strings for disabled languages
shellCmds = pkgs.lib.concatLines (pkgs.lib.filter (cmd: cmd != "") [
(pkgs.lib.optionalString enabledLanguages.r " - ${defaultPackageName}-r: Launch R console")
(pkgs.lib.optionalString enabledLanguages.julia " - ${defaultPackageName}-jl: Launch Julia REPL")