aboutsummaryrefslogtreecommitdiff
path: root/modules/flycheck-config.el
Commit message (Collapse)AuthorAgeFilesLines
* refactor(load-graph): make hidden module dependencies explicitCraig Jennings12 days1-3/+4
| | | | | | | | | | | | | Phase 2 of the load-graph project. I fixed the seven hidden dependencies the classification surfaced, so each module declares what it uses instead of relying on init order. - system-defaults now requires host-environment and user-constants at runtime. They were eval-when-compile only, but env-bsd-p and user-home-dir are read at load, so the compiled module couldn't load standalone. - custom-buffer-file, dev-fkeys, calendar-sync, and video-audio-recording require keybindings and drop their (when (boundp 'cj/custom-keymap) ...) shims. The shim silently dropped the C-; binding when the module loaded before keybindings. The explicit require makes the dependency real. - flycheck-config and mail-config require keybindings for their cj/custom-keymap bindings (a use-package :map and a direct keymap-set). - Removed a dead eval-when-compile (defvar cj/custom-keymap) in transcription-config; nothing there used the variable. No init.el load-order change. keybindings and the foundation modules already load before these, so the requires are no-ops at startup and only fix standalone and test loading. I verified each fix with a fresh emacs --batch (require 'X), then swept all modules standalone: every one loads or fails only with a clear missing-package message. Full make test, make validate-modules, and an init smoke all pass. Module headers and the inventory's hidden-dependency section are updated to mark the seven resolved.
* docs(load-graph): classify dev, diff, help, lint, and VC modulesCraig Jennings12 days1-1/+12
| | | | | | Fifth classification batch: the development-workflow entry points and package config — coverage-core, coverage-elisp, dev-fkeys, diff-config, help-config, help-utils, flycheck-config, test-runner, vc-config. I annotated each header, added a Batch 5 table to the inventory, and extended the validation allowlist. 42 of 102 modules are now classified. Two more hidden dependencies turned up, both about cj/custom-keymap. dev-fkeys repeats the custom-buffer-file boundp shim for its C-; P binding. flycheck-config binds (:map cj/custom-keymap ...) through use-package without requiring keybindings, so it fails to load standalone. Both recorded for the Phase 2 dependency pass.
* fix(flycheck): wrap languagetool checker definition in eval+backquoteCraig Jennings2026-05-161-10/+15
| | | | | | | | | | | | | | | | | | | | | | | flycheck's `flycheck-define-checker' macro requires the `:command' executable to be a string literal at macro-expansion time -- it does `(stringp (car command))' and errors otherwise. The previous `(eval (expand-file-name ...))' form (commit d84aa437, the externalization fix) put a `(eval FORM)' wrapper in the executable position, which flycheck rejected at load: Error (use-package): recentf/:config: Command executable for syntax checker languagetool must be a string: (eval (expand-file-name "scripts/languagetool-flycheck" user-emacs-directory)) `(eval FORM)' is only valid for SUBSEQUENT command-list elements (arguments), not the executable. Wrap the entire `flycheck-define-checker' invocation in `eval' + backquote so the expanded path is spliced in as a string literal before the macro sees it. The hardcoded `~/.emacs.d/...' path is gone for the same reason the original externalization wanted it gone: survives a non-standard `user-emacs-directory'.
* refactor(prog): six programming-track hygiene fixes from re-reviewCraig Jennings2026-05-161-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - prog-lsp.el: rename `cj/lsp--remove-eldoc-provider' → `cj/lsp--remove-eldoc-provider-global' and call it once from the lsp-mode `:config' block instead of attaching it per-buffer via `lsp-managed-mode-hook'. The previous per-buffer remove with the buffer-local flag raced lsp-mode's own population of the local hook; removing the provider from the global default before any LSP buffer attaches makes the absence stick. Two existing tests updated to the new contract (remove-from-default + idempotent re-run). - prog-webdev.el / prog-python.el: warn at load time when `prettier' or `pyright' is missing on PATH via `cj/executable-find-or-warn'. Both modules now `(require 'system-lib)' to expose the helper. Missing dependencies surface up front instead of mid-edit at first format/LSP attach. - keyboard-compat.el: document existing idempotence. The hook install uses a named function so `add-hook' deduplicates, and the hook body only calls `define-key' (latest binding wins, same value) -- adding a comment so future readers don't re-question. - dev-fkeys.el: add a `typescript' clause to `cj/--f6-test-runner-cmd-for'. F6 now runs `npx --no-install vitest <path>' when vitest is on PATH, otherwise `npx --no-install jest <path>'. Updates the matching test from "returns nil" to cover both code paths; the impl-level test now asserts the routed command instead of expecting a user-error. - flycheck-config.el: build the LanguageTool wrapper path with `(expand-file-name "scripts/languagetool-flycheck" user-emacs-directory)' instead of a hardcoded `~/.emacs.d/...'. Survives a non-standard `user-emacs-directory'. - latex-config.el: replace the hardcoded Zathura viewer with `cj/--latex-select-pdf-viewer', which walks `cj/--latex-pdf-viewer-candidates' (zathura → evince → okular → SumatraPDF → xdg-open) and falls back to "PDF Tools" when nothing is on PATH. Each entry maps an executable to the matching TeX-view-program-list name so AUCTeX's defaults handle the actual viewer invocation.
* feat(modeline): surface flycheck status in the custom modelineCraig Jennings2026-05-161-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The custom modeline builds `mode-line-format` from explicit segments and skips `minor-mode-alist`, so flycheck's lighter never appears. That hid error and warning counts even in buffers where flycheck was auto-enabling (every emacs-lisp and sh buffer). The fix is Option 4 from the design doc: customize the flycheck modeline variables, then add a single guarded `(:eval ...)` form to `mode-line-format`. Five new lines total, two-file change. `modules/flycheck-config.el` :custom block gets: (flycheck-mode-line-prefix "🐛") (flycheck-mode-success-indicator " ✓") `flycheck-mode-line-color` stays default-t so error / warning counts pick up their faces automatically. `modules/modeline-config.el` `mode-line-format` gets an `(:eval ...)` between the recording indicator and `cj/modeline-vc-branch`: (:eval (when (and (mode-line-window-selected-p) (bound-and-true-p flycheck-mode)) (flycheck-mode-line-status-text))) The `mode-line-window-selected-p` guard mirrors `cj/modeline-vc-branch` and `cj/modeline-misc-info` -- segments hide in inactive windows. The `bound-and-true-p flycheck-mode` guard keeps the form silent in buffers where flycheck hasn't loaded or isn't enabled, which is safer than referencing `flycheck-mode` directly. The `(:eval ...)` is inline rather than a named `defvar-local`, so no addition to the risky-local-variable list is needed. `tests/test-modeline-config-flycheck-segment.el` -- 3 smoke tests asserting the segment is present and both guards are in place. All existing tests stay green. Manual verification (per the design doc) is the user's call -- the emoji prefix and the colored count behavior need a running GUI Emacs to observe.
* fix(flycheck): correct abbrev-mode no-arg toggle in cj/prose-helpers-onCraig Jennings2026-05-151-6/+5
| | | | | | | | | | | | | | | | | The shape (if (not (abbrev-mode)) (abbrev-mode)) calls abbrev-mode with no argument -- that's the toggle signature, not a query. When the mode was already on the function flipped it off then on instead of being a no-op. Replaced with (unless (bound-and-true-p VAR) (MODE 1)) for both abbrev-mode and flycheck-mode. 4 ERT tests cover both-off, both-on, and the two mixed states. Also ran the module hardening pass across 24 newly-added modules, renamed the six completed Review sub-tasks to Harden, filed 11 new findings under their Harden parents, and broke three design specs (EMMS-free music, dev F-keys, dev-setup-project) into 20 dependency-ordered sub-tasks via parallel subagents. Verified the sqlite finalizer bug from 2026-04-26 is gone and closed its tracking entry.
* feat: Add LanguageTool integration for comprehensive grammar checkingCraig Jennings2025-11-041-26/+28
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Integrated LanguageTool as an on-demand grammar checker, replacing the previously disabled proselint checker. Changes: - Created scripts/languagetool-flycheck wrapper for flycheck integration - Converts LanguageTool JSON output to flycheck format - Includes suggestions in error messages - 30-second timeout for large files - Updated modules/flycheck-config.el: - Defined languagetool checker for text/markdown/org/gfm modes - Updated cj/flycheck-prose-on-demand to use LanguageTool - Added installation instructions (sudo pacman -S languagetool) - Improved documentation clarity - Usage: Press C-; ? in org/text/markdown files - Enables flycheck with LanguageTool - Shows errors in *Flycheck errors* buffer - On-demand only (no performance impact) - Updated docs/NOTES.org: - Added best practice: Test Emacs launch after non-trivial changes - Example: emacs --eval "(kill-emacs)" - Catches startup errors before committing - Disabled weather debug mode (wttrin-debug nil) - Marked todo.org grammar checker task as DONE LanguageTool catches real grammar issues (subject-verb agreement, tense, punctuation, common mistakes) that proselint missed. Installation: LanguageTool 6.6 (222MB) from Arch repos Dependencies: Python 3 (for wrapper script)
* feat:which-key: Add descriptive labels for custom keymapsCraig Jennings2025-10-271-0/+3
| | | | | | | | | | | | Enhance which-key integration by providing detailed descriptions for new key bindings across multiple modules. This improves the usability of custom keymaps by clarifying the purpose of each keybinding, making it easier for users to navigate and understand different menus and options available within the configuration. This update ensures that all custom keymaps now display a descriptive label in the which-key popup to explain their functionality, aiding users in identifying keymap purposes promptly.
* bug: flycheck: remove load after now-renamed moduleCraig Jennings2025-10-161-1/+0
|
* changing repositoriesCraig Jennings2025-10-121-0/+99