-
-
Notifications
You must be signed in to change notification settings - Fork 42
Attempt to optimize dfa #57
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
Conversation
|
||
|
||
mod.list("cursorless_multiple_target_action", desc="Cursorless move or bring actions") | ||
ctx.lists["self.cursorless_multiple_target_action"] = {"bring", "move", "swap", "call"} |
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.
Unified the syntax for all these multi-target commands. Slightly awkward for some of them but not too bad so far; will have to see how well it works for a couple days
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.
I total understand why you did it but I'm not quite happy with it :s
src/cursorless.talon
Outdated
|
||
replace <user.cursorless_target> with <user.cursorless_replace_value>$: | ||
user.cursorless_replace(cursorless_target, cursorless_replace_value) | ||
|
||
reformat <user.cursorless_target> as <user.formatters>: | ||
format <user.formatters> onto <user.cursorless_target>: |
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.
ok so this one is pretty awkward, but surprisingly swapping these two captures seems to improve DFA compilation. We could prob come up with better terminology here
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.
Maybe we should just remove onto and make it format camel blue air
Talon can pre-optimize multiple commands that begin and end with the same capture in some cases. Maybe that's what you're seeing.
|
|
||
mod.list("cursorless_pair_symbol", desc="A symbol that comes in pairs, eg brackets") | ||
ctx.lists["self.cursorless_pair_symbol"] = { | ||
"skis": "backtickQuotes", |
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.
Can't we make do with just brick wrap
?
…talon into pokey-dfa-optimization
src/actions/actions.py
Outdated
MakeshiftAction("drink cell", "jupyter.insertCellAbove"), | ||
MakeshiftAction("follow", "editor.action.revealDefinition"), |
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.
Personally I use reveal definition much more than I use find. Maybe we should rename find instead?
I kept almost all functionality, but dropped a couple things I never use, and the grammar is maybe a bit more awkward
Curious what people think
One of my takeaways here is that DFA compilation seems to be quicker if big captures appear towards the end of a command rather than the beginning. @lunixbochs does that sound right to you?
fixes #50