-
-
Notifications
You must be signed in to change notification settings - Fork 241
rewrite keymap system, introduce transient-like functionality #2100
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
mahmoodsh36
wants to merge
55
commits into
lem-project:main
Choose a base branch
from
mahmoodsh36:transient
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from 1 commit
Commits
Show all changes
55 commits
Select commit
Hold shift + click to select a range
04dcd3a
rewrite keymap system
mahmoodsh36 eb57d77
introduce keymap-activate and initialize transient.lisp
mahmoodsh36 7a213e7
add simple popup
mahmoodsh36 e3f6d6a
make popup more informative
mahmoodsh36 a3d56b3
improve docstrings a little more
mahmoodsh36 d8ac6fb
slight refactor
mahmoodsh36 fdb7bf9
make multi-choice prefix work
mahmoodsh36 2d7e130
fix order of keymaps (hence fix priorities)
mahmoodsh36 8fe748d
slight change
mahmoodsh36 7b9f3a6
add find-prefix-by-id
mahmoodsh36 42977a4
introduce :back, :cancel suffix values
mahmoodsh36 7e73c23
rename package to lem/transient
mahmoodsh36 ebce66e
rename package to lem/transient
mahmoodsh36 ba5694b
rename package to lem/transient and system to lem-transient
mahmoodsh36 33cdde7
use "intern" with explicit package name
mahmoodsh36 d5023be
introduce prefix-behavior, with-last-read-key-sequence, and handle ex…
mahmoodsh36 2397e14
use :description instead of :name for keymaps
mahmoodsh36 4d37d35
introduce toggle infix, use prompt for multi-choice infix
mahmoodsh36 8a418d8
fix vim search
mahmoodsh36 4b33545
fix undefine-key (actually undefine-key-internal)
mahmoodsh36 30d4ea5
remvoe some redundant stuff
mahmoodsh36 79229a8
properly parse keymap keywords in transient, change title styling
mahmoodsh36 3d8b2d5
small fix
mahmoodsh36 891b2f3
introduce "intermediate" prefixes
mahmoodsh36 3ea00ea
introduce *transient-always-show*
mahmoodsh36 1f3a109
small refactor
mahmoodsh36 facc26c
introduce multi-value infix to demo
mahmoodsh36 eb7fc25
remove outdated comment
mahmoodsh36 caf8743
introduce variable-syncing (sync infix with var)
mahmoodsh36 06b58e5
add :extend keyword to make-keymap
mahmoodsh36 f708a1e
add mode-transient-keymap, show extended keymap keys in transient
mahmoodsh36 0af3651
rename keymap-extend to keymap-base
mahmoodsh36 64631a3
export more symbols
mahmoodsh36 feafe41
remove redundant keymap-find-keybind arg and rename it to keymap-find
mahmoodsh36 d11647b
remove "dynamic properties" and just rely on CLOS
mahmoodsh36 50be8c8
small fixes
mahmoodsh36 42158ab
make parse-transient eval values, so that quotes are needed
mahmoodsh36 9ca5ad6
add bottomside-window and define transient-mode
mahmoodsh36 e3da420
add scrolling support
mahmoodsh36 ac9b675
fix horizontal scrolling
mahmoodsh36 c39df30
set always-show to nil
mahmoodsh36 a1533e3
remove "dirty" redrawing technique
mahmoodsh36 24badca
separate child keymaps from prefixes
mahmoodsh36 6e28acc
handle editor-abort in suffix prompts
mahmoodsh36 7ea0eda
add define-transient-key
mahmoodsh36 d811a8b
indentation
mahmoodsh36 6db325d
add define-prefix, add post-command hook to update popup
mahmoodsh36 46ebbbe
fix issue: self-insert was being invoked when it shouldnt have been
mahmoodsh36 1a42a5e
show maps that have show-p set, regardless of mode
mahmoodsh36 b69ae34
use defvar instead of defparameter to avoid issues on recomp
mahmoodsh36 5bda002
fix handling of undef-hook
mahmoodsh36 40ab039
set popup max-lines to 10 instead of 15 by default
mahmoodsh36 1610e48
fix undef-hook/function-table edge case
mahmoodsh36 62201d2
fix popup behavior when switching buffers
mahmoodsh36 9abe4ff
remove outdated comment
mahmoodsh36 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
remove "dynamic properties" and just rely on CLOS
the idea of "dynamic" properties/slots that i had before i think was redundant and just overcomplicated things. this is a refactors things. now we just rely on CLOS even for instance-specific "overrides" in keymaps/prefixes.
- Loading branch information
commit d11647bcb5e91ef4e0e240872a01f6bd7a37d6ec
Some comments aren't visible on the classic Files Changed page.
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,6 +1,7 @@ | ||
| (in-package :lem/transient) | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Code Contractor: defpackage_rule Contract: contract AI check failed: "defpackage_rule" Reason: |
||
|
|
||
| (defvar *demo-language* "lisp" | ||
| (defvar *demo-language* | ||
| "lisp" | ||
| "a demo variable that stays in sync with an infix.") | ||
|
|
||
| (define-transient *demo-keymap* | ||
|
|
@@ -39,7 +40,7 @@ | |
| (:key "l" | ||
| :type :choice | ||
| :id :mode | ||
| :choices ("lisp" "python" "js") | ||
| :choices-func (list "lisp" "python" "js") | ||
| :value "python" | ||
| :description "mode")) | ||
| (:keymap | ||
|
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code Contractor: internal_symbol_rule
Contract: contract
AI check failed: "internal_symbol_rule"
Reason:
Added code contains direct references to internal (non-exported) symbols via package double-colon qualifiers (e.g.
lem-core::other-keymaps), which violates the rule to use exported symbols fromlemorlem-coreand avoid internal symbol access.