mirror of
https://github.com/cursorless-dev/cursorless.git
synced 2024-10-04 21:07:21 +03:00
Don't let the cursor slow you down
starred-cursorless-dev-repostarred-repostructure-editortalonvoicevoicevoice-codingvscodevscode-extension
ae5304ddf3
When given a comparator, uniqWith is quadratic. Add uniqWithHash that uses an optional hash function to return to approximately linear behavior, assuming that the hash function is good. For targets and selections, Using the contentRange/selection as the hash value seems to be pretty good in practice. I've added "concise" printing versions of positions, ranges, and selections. These are handy as hash functions, but I've also made heavy use of them while investigating hat allocation. They are generally useful. "take every line" on a file containing 3000 lines used to take about 15s on my computer. Now it takes about 1s. That's still not great but it's fast enough that it doesn't appear that Cursorless has hung. I've half a mind to try upstreaming this, or at least sending a documentation fix, because a quadratic API is a big footgun. Fixes #1830 enough for now ## Checklist - [x] I have added [tests](https://www.cursorless.org/docs/contributing/test-case-recorder/) - [/] I have updated the [docs](https://github.com/cursorless-dev/cursorless/tree/main/docs) and [cheatsheet](https://github.com/cursorless-dev/cursorless/tree/main/cursorless-talon/src/cheatsheet) - [/] I have not broken the cheatsheet --------- Co-authored-by: pre-commit-ci-lite[bot] <117423508+pre-commit-ci-lite[bot]@users.noreply.github.com> Co-authored-by: Pokey Rule <755842+pokey@users.noreply.github.com> |
||
---|---|---|
.github | ||
.meta-updater | ||
.vscode | ||
cursorless-snippets | ||
cursorless-talon | ||
cursorless-talon-dev | ||
data/playground | ||
docs | ||
fonts | ||
images | ||
packages | ||
patches | ||
queries | ||
schemas | ||
scripts | ||
typings | ||
.editorconfig | ||
.eslintrc.json | ||
.git-blame-ignore-revs | ||
.gitignore | ||
.npmrc | ||
.pre-commit-config.yaml | ||
.prettierignore | ||
.prettierrc | ||
.syncpackrc.json | ||
CHANGELOG.md | ||
CONTRIBUTING.md | ||
LICENSE | ||
netlify.toml | ||
NOTICE.md | ||
package.json | ||
pnpm-lock.yaml | ||
pnpm-workspace.yaml | ||
pyproject.toml | ||
README.md | ||
SECURITY.md | ||
third-party-licenses.csv | ||
tsconfig.base.json | ||
tsconfig.json |
Welcome to Cursorless!
Cursorless is a spoken language for structural code editing, enabling developers to code by voice at speeds not possible with a keyboard. Cursorless decorates every token on the screen and defines a spoken language for rapid, high-level semantic manipulation of structured text.
Checkout the docs and videos to learn more. See installation for installation instructions.
And I heard you like GIFs?
Installation
Currently depends on Talon, though a keyboard version is planned.
See installation for installation instructions.
Extension Settings
This extension contributes the following settings:
cursorless.showOnStart
: Whether decorations should appear on workspace startcursorless.hatSizeAdjustment
: Percentage to increase or decrease hat size; positive increases sizecursorless.hatVerticalOffset
: How much to vertically shift the hats as a percentage of font size; positive is upcursorless.hatEnablement.colors
: Whether to enable particular hat colors.cursorless.hatEnablement.shapes
: Whether to enable particular hat shapes.cursorless.hatPenalties.colors
: How much to penalize each hat color. You will probably want to set this one to the number of syllables in the given style. Cursorless will then sort every style combination by number of syllables to refer to it.cursorless.hatPenalties.shapes
: How much to penalize each hat shape. You will probably want to set this one to the number of syllables in the given style. Cursorless will then sort every style combination by number of syllables to refer to it.cursorless.maximumHatStylePenalty
: The maximum allowed penalty for a hat style. Any hat style whose penalty is greater than this amount will not be used. A hat style penalty is defined to be the shape penalty plus the colour penalty. Setting this value less than or equal to zero is treated as no maximum.
Known Issues
- Cursorless calculates the position of the hats based on the characteristics of your font. If you find that the hats are off center you can try running this command:
cursorless.recomputeDecorationStyles
Contributing
See contributing.
Change Log
See CHANGELOG.md.
Attributions
See NOTICE.md.