| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
| |
The daily-prep workflow now keeps its stable symlink at the project root as daily-prep.org instead of inbox/today-prep.org. I repointed cj/open-project-daily-prep (C-c p d) to match, updating its docstring, not-found message, and test for the new path.
|
| |
|
|
| |
C-c p d (cj/open-project-daily-prep) always forced the prep doc into another window. I switched it to cj/--find-file-respecting-split, the same helper the sibling C-c p t (project todo) uses: it opens the other window when the frame is split and reuses the current window when it isn't. The two project-open commands now behave the same way.
|
| |
|
|
|
|
| |
prog-general uses code-dir, projects-dir, and snippets-dir (all from user-constants) in its projectile and yasnippet configs, but it only declared them as compile-time defvars and leaned on init.el loading user-constants first. That load-order assumption broke when the test suite ran combined: if another test file loaded prog-general before user-constants, yasnippet's :config hit a void snippets-dir and yas-global-mode never enabled, so eight yas-activation tests failed.
I replaced the three compile-time defvars with a runtime (require 'user-constants) so the module declares its real dependency and is self-contained. The combined prog-general suite is now 15/15, and the module no longer depends on init.el's load order for constants it reads at load time.
|
| |
|
|
|
|
| |
I added cj/open-project-daily-prep on C-c p d. It opens inbox/today-prep.org under the Projectile project root in another window, project-scoped, so a project without a prep file just reports it rather than erroring. The binding had only ever been eval'd live into the daemon in a past session and vanished on the next restart, so this persists it to the module.
Freeing d meant reworking the deadgrep bindings. deadgrep-in-dir moves to C-c p G (replacing plain deadgrep, which stays M-x-callable), and deadgrep-here keeps C-c p g. Plain project-wide deadgrep dropped off the projectile prefix because it overlapped the context-aware and arbitrary-directory variants. Tests cover the open, missing-file, and not-in-a-project paths.
|
| |
|
|
|
|
| |
C-c p t (cj/open-project-root-todo) called find-file, which always opened todo.org in the selected window, replacing whatever I was looking at. Now it opens in the other window when the frame is split and in the current window when it isn't, through a small cj/--find-file-respecting-split helper. The helper is a top-level defun rather than buried in the projectile :config block so it can be unit-tested without loading projectile.
I left cj/project-switch-actions alone. Opening the todo on a project switch is a different trigger and not what this fixes.
|
| |
|
|
|
|
| |
Sixth classification batch: prog-general plus the language modules — prog-c, prog-go, prog-lisp, prog-python, prog-webdev, prog-json, prog-yaml, prog-shell, prog-training. I annotated each header, added a Batch 6 table to the inventory, and extended the validation allowlist. 52 of 102 modules are now classified.
prog-general owns the shared defaults and tree-sitter/LSP policy and stays eager. The language modules are eager only by init order and should load by major mode, so they're tagged Phase 6 deferral candidates. prog-shell's after-save executable hook is the one side effect worth scoping. No new hidden dependencies.
|
| |
|
|
|
|
|
|
| |
The yasnippet use-package block switches from `:hook (prog-mode . yas-minor-mode)` to `:demand t` + `(yas-global-mode 1)`. That makes yas-minor-mode active in every buffer, not just prog-mode-derived ones.
I added a small helper, `cj/--yas-activate-fundamental-extras`, attached as `:hook (yas-minor-mode . ...)`. It calls `(yas-activate-extra-mode 'fundamental-mode)` so the snippet table at `snippets/fundamental-mode/` is consulted in every buffer regardless of the buffer's own major mode. That's what makes universal triggers like `<cj` work everywhere.
The new `tests/test-prog-general-yas-activation.el` covers both wiring (yas-global-mode on, fundamental-mode in yas-extra-modes, yas-minor-mode active in org/text buffers) and end-to-end expansion (the marker snippet expands correctly in fundamental, text, org, emacs-lisp, and python-ts modes). 9 tests, all green; full unit suite green with no regressions.
|
| |
|
|
|
|
| |
I commented out the global `compilation-finish-functions' hook that closed the *compilation* window 1.5 seconds after a successful compile. With the F6 test runner now landing test output in *compilation*, I want the buffer to stay open afterward so I can read the results, not have it slide out from under me.
The block stays in the file as a commented-out reference so I can flip it back on later if I want. A prog-mode-only variant is noted in the comment for the day I want the auto-close back for non-prog compiles (org-export, etc.) — that needs advice on `compile' to capture the originating buffer's `major-mode' at compile-start, since the hook fires after `compilation-mode' has already taken over the current buffer. Skipped for now per the simpler path.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
I added a new module `modules/dev-fkeys.el` that owns the dev F-key block. F4 prompts via `completing-read` with a candidate set filtered by project type (compiled / interpreted / unknown). C-F4 is the compile-only fast path. M-F4 is clean + rebuild. It runs a heuristic clean command derived from the project markers (go.mod, Cargo.toml, Eask, Makefile, CMakeLists.txt) and chains `projectile-compile-project` on success. S-F4 stays on `recompile` and now lives globally instead of duplicated across prog-general.el and prog-c.el. F6 is bound globally to `projectile-test-project` as a Phase 1 stopgap. Phase 2 replaces it with the polyglot test runner spec'd in todo.org.
Project-type detection runs against the projectile root and falls back to `unknown` when no marker matches. Interpreted markers are checked first so a Python or Node project with a Makefile for tasks classifies as interpreted instead of compiled. Compile + Run sequencing uses a one-shot `compilation-finish-functions` hook that self-removes on first invocation and only fires the follow-up when the status string starts with `finished`.
Cleanup in the same commit:
- Dropped F4/F5/F6 from `prog-general.el`'s prog-mode-hook. They are now global.
- Dropped F6→format bindings from prog-c.el / prog-python.el / prog-shell.el. C-; f was already bound in each, so this is pure removal.
- Dropped the duplicate S-F4 from prog-c.el. The global binding covers it.
- Updated the keybinding header in prog-general.el and the workflow comments in prog-c.el / prog-shell.el.
- Wired `(require 'dev-fkeys)` in init.el alongside coverage-core.
TDD: 73 tests across 11 files, one per helper. Production code is split into small testable internals (`cj/--detect-project-type`, `cj/--f4-candidates`, `cj/--f4-derive-clean-cmd`, `cj/--f4-make-once-hook`, `cj/--f4-dispatch`, `cj/--f4-compile-and-run-impl`, `cj/--f4-clean-rebuild-impl`, `cj/--f4-project-root`) plus three thin interactive wrappers. Smoke tests confirm bindings register on load.
Known limitation: if another `compilation-finish-functions` hook fires between my add-hook and the compile finishing, the chain can fire on the wrong compile. The hook self-removes on first invocation regardless of which compile it sees. Documented in the impl docstring. Acceptable for v1.
Phase 2 will replace F6 with the polyglot test runner (tree-sitter queries for Python/Go/TS, sexp scan for Elisp, buffer-local last-test memory).
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Method 2 improvements for cleaner, faster configuration:
1. **Replaced doom-modeline with mood-line** (modules/modeline-config.el)
- Simplified from 70+ lines to ~10 lines (-40 lines net)
- mood-line is lightweight, minimal, inspired by doom-modeline
- Better performance with no dependencies
- Keeps all essential features: buffer status, major mode, VCS,
flycheck, cursor position, multiple-cursors counters
2. **Removed deprecated tree-sitter package** (modules/prog-general.el)
- Deleted `(use-package tree-sitter)`
- Now relies solely on Emacs 29+ built-in treesit with treesit-auto
- treesit-auto continues to manage grammars automatically
- No functionality lost, cleaner dependency tree
Both changes serve Method 2: "Stop Problems Before They Appear"
- Simpler code = fewer bugs
- Fewer dependencies = less maintenance
- Native features = better integration
Updated todo.org to mark both tasks complete [2/5 in Method 2].
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The previous commit incorrectly moved deadgrep to 'D', which conflicts
with the important dired-do-delete command (immediate delete of marked
files). This commit moves deadgrep to 'G' instead.
## Changes
**prog-general.el:**
- Move cj/deadgrep-here from 'D' to 'G' (was dired-do-chgrp, rarely used)
**dirvish-config.el:**
- Updated Commentary to document both 'D' and 'G' keybindings
- 'D' remains dired-do-delete (standard dired immediate delete)
- 'G' is now deadgrep search
## Final Keybinding Map
| Key | Binding | Purpose |
|-----|-------------------------------|--------------------------------|
| d | cj/dirvish-duplicate-file | Duplicate with "-copy" suffix |
| D | dired-do-delete | Delete marked files (standard) |
| g | dirvish-quick-access | Quick directory menu |
| G | cj/deadgrep-here | Search with deadgrep |
Capital G is mnemonic for "Grep" and doesn't conflict with important
dired commands. dired-do-chgrp is rarely used and not a loss.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This commit adds a convenient file duplication function to dirvish and
reorganizes keybindings to avoid conflicts.
## Changes
**1. New function: cj/dirvish-duplicate-file (dirvish-config.el:150)**
Duplicates the file at point with "-copy" suffix before the extension:
- report.pdf → report-copy.pdf
- script.el → script-copy.el
- README → README-copy
Features:
- Prevents duplicating directories (files only)
- Checks if target exists and prompts to overwrite
- Refreshes buffer automatically after copying
- Shows clear message with old and new names
**2. Keybinding changes**
dirvish-config.el:
- Bound 'd' to cj/dirvish-duplicate-file (was dired-flag-file-deletion)
- Updated Commentary section to document new binding
prog-general.el:
- Moved cj/deadgrep-here from 'd' to 'D' (capital D)
- More mnemonic: D for Deadgrep
- Avoids conflict with new duplicate function
## Rationale
The 'd' key is prime real estate in file managers, and duplicating files
is a very common operation. The standard dired-flag-file-deletion is still
available via 'x' or the mark-and-delete workflow.
Deadgrep on 'D' is more discoverable (capital D for Deadgrep) and less
likely to be pressed accidentally.
## Usage
In dirvish, navigate to a file and press:
- 'd' - Duplicate file with "-copy" suffix
- 'D' - Search with deadgrep in current directory
|
| |
|
|
|
|
|
| |
Replace the `setq yas-snippet-dirs` with `list` function for better
readability and add `yas-reload-all` to ensure snippets are
reloaded. Remove `ivy-yasnippet` configuration as it is not
required.
|
| |
|
|
|
|
|
|
|
|
|
|
| |
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.
|
| |
|
|
|
|
|
|
|
| |
Add language-specific keybindings and configurations for C, Go,
Python, and shell scripting panels. Introduce system utility
function declarations and improve keybinding consistency across
languages. Implement keybindings for debug, format, and static
analysis tools tailored to each programming language, enhancing the
developer experience and workflow efficiency.
|
| |
|
|
|
|
|
| |
Add Language Server Protocol support for intelligent code completion
and navigation across multiple languages. Configure `lsp-mode` and
`lsp-ui` packages with performance optimizations and enhanced
completion features.
|
| |
|
|
|
|
| |
Add cl-lib requirement and pin Go grammar to v0.19.1 to ensure
compatibility with Emacs 30.2 font-lock queries. Remove redundant
hs-minor-mode hook from bicycle configuration.
|
| |
|
|
|
|
|
| |
- Remove deferred loading from various use-package declarations to streamline.
- Replace deprecated `define-key` with `keymap-set` in `dired-mode-map`.
- Update Python configuration to prefer `python-ts-mode` over `python-mode` and ensure associated modes and hooks work with `python-ts-mode`.
- Clean up deprecated `auto-mode-alist` usage to reflect the transition to Tree-sitter based major modes.
|
| |
|