Commit Graph

510 Commits

Author SHA1 Message Date
Pokey Rule
255e889547
Create guidelines.md (#1139) 2022-11-15 19:50:13 +01:00
Pokey Rule
7a1e8150a6
Move ide out of graph and into its own module (#1102)
* Move  out of  and into its own module

* Empty commit

* Remove unused import

* PR feedback

* Fix CI
2022-11-10 16:55:44 +00:00
Andreas Arvidsson
5ea6108f29
Updated If statement insertion delimiter (#1125)
* Updated if statement insertion delimiter

* Updated test
2022-11-10 08:58:56 +00:00
Andreas Arvidsson
ccf9d68166
Added fields and methods to java statement definition (#1117)
Co-authored-by: Pokey Rule <755842+pokey@users.noreply.github.com>
2022-11-08 15:46:42 +01:00
Andreas Arvidsson
ac2a5411d9
Added shell:true to init launch sandbox (#1114)
Co-authored-by: Pokey Rule <755842+pokey@users.noreply.github.com>
2022-11-08 14:24:05 +00:00
pre-commit-ci[bot]
afb99523d8
[pre-commit.ci] pre-commit autoupdate (#1104)
* [pre-commit.ci] pre-commit autoupdate

updates:
- [github.com/pre-commit/mirrors-prettier: v2.7.1 → v3.0.0-alpha.4](https://github.com/pre-commit/mirrors-prettier/compare/v2.7.1...v3.0.0-alpha.4)
- [github.com/Zac-HD/shed: 0.10.5 → 0.10.7](https://github.com/Zac-HD/shed/compare/0.10.5...0.10.7)
- [github.com/wenkokke/talonfmt: 1.8.0 → 1.8.1](https://github.com/wenkokke/talonfmt/compare/1.8.0...1.8.1)

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* Update .pre-commit-config.yaml

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Pokey Rule <755842+pokey@users.noreply.github.com>
2022-11-08 14:08:43 +00:00
Andreas Arvidsson
6238d685d9
Added new notebook editor field (#1118) 2022-11-04 19:22:43 +01:00
Pokey Rule
4bb51b8310
Add a few default scope type delimiters (#1106)
* Add a few default scope type delimiters

* Remove unintended test

* Fix tests

Co-authored-by: Andreas Arvidsson <andreas.arvidsson87@gmail.com>
2022-11-02 15:38:23 +01:00
Andreas Arvidsson
597b7f4d83
Implemented strongly typed internal function to run Cursorless commands (#1113)
* Implemented strongly typed internal function to run Cursorless commands

* Refactor

* Clean up

* clean up

* Use import type

* Restore backwards compatibility tests

* Rename

Co-authored-by: Pokey Rule <755842+pokey@users.noreply.github.com>
2022-11-02 15:26:15 +01:00
Andreas Arvidsson
34a2d387d9
Fixed bug with reusing regex in token preference (#1109)
* Fixed bug with reusing regex in token preference

* update test

* Add take token twice test

* Apply suggestions from code review

Co-authored-by: Pokey Rule <755842+pokey@users.noreply.github.com>
2022-11-02 13:34:57 +01:00
Phil Cohen
96bed97b61
ide: introduce getActiveTextEditor() (#1103)
* activeEditor: introduce class

* migrate all usages of  `vscode.window.activeTextEditor`

* migrate all usages of  `window.activeTextEditor`

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* activeEditor: improve comment

* `getActiveTextEditor`

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* Lint for references to `activeTextEditor`

* Rename file `activeEditor` => `activeTextEditor`

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Pokey Rule <755842+pokey@users.noreply.github.com>
2022-11-01 20:24:09 +01:00
Pokey Rule
7c4b3c3dc7
Switch tree-sitter-markdown dependency (#1105)
* Switch tree-sitter-markdown dependency

* Remove unused imports

* Empty commit
2022-11-01 17:54:49 +00:00
Pokey Rule
655df52204
Update PULL_REQUEST_TEMPLATE.md (#1101) 2022-10-31 12:34:09 +01:00
Andreas Arvidsson
d46bb7112f
Added paragraph scope handler (#1095)
* Added paragraph scope handler

* Use nested scope handler

* Updated for new base scope handler

* Moved tests

* Added more tests
2022-10-31 10:46:21 +00:00
Andreas Arvidsson
ee1f394b28
Updated to correct name for forward backward modifier (#1100) 2022-10-31 11:14:09 +01:00
Andreas Arvidsson
5c18f35af2
Added test to enforce that both ends has to be overlapping for containing (#1092) 2022-10-30 13:01:31 +00:00
Pokey Rule
1294e2259f
Switch NestedScopeHandler to generator (#1099)
* Switch `NestedScopeHandler` to generator

* Cleanup docs
2022-10-29 22:39:16 +02:00
Pokey Rule
1871635283
Iteration-based scope handler interface (#1096)
* Iteration-based scope handler interface

* Remove `getPreferredScopeTouchingPosition`

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* `isPreferredOver` skeleton

* Reintroduce token preferences

* Attempt at more simplification

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* Tweak hints

* Cleanup

* Remove `allowNoOverlap` from requirements

* New RelativeInclusive semantics

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* Add tests

* Migrate early stopping to base class

* More doc tweaks

* More doc tweaks

* More docs

* More docs

* More docs

* More doc strings

* More cleanup

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* More docs

* More docs

* More docs

* Fixes

* More docs

* More docstring tweaks

* Tweak docs

* Address PR comments

* Tweak token `isPreferredOver`

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2022-10-29 16:18:23 +01:00
David Vo
cf66411ba8
Find VSCode settings in $XDG_CONFIG_HOME (#1074)
Co-authored-by: Andreas Arvidsson <andreas.arvidsson87@gmail.com>
2022-10-25 11:57:26 +01:00
Will Sommers
272dc49481
Force tab size on test run (#731)
* Force tab size on test run

- This fixes problems related to different local configurations
- Tests expect tabSize to be 4

* Ensure we set tab size on recording tests

- Check if we're in debug mode and set tabSize if so
- Move tabSize to constants file

* Move tab setting out of command loop and into test recorder

* Remove unused import

* Init tab setting as undefined

* Force insert spaces on tests

* Only show message if necessary

* Move code to hooks

* Fixes

* Whoops

Co-authored-by: Pokey Rule <755842+pokey@users.noreply.github.com>
Co-authored-by: Andreas Arvidsson <andreas.arvidsson87@gmail.com>
2022-10-24 21:19:22 +01:00
Andreas Arvidsson
f1e7b4c6c7
One of compound scope type (#1069)
* Draft off one of compound scope type

* Tweaks

* More tweaks

* Tweak implementation

* Fix a couple bugs

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

Co-authored-by: Pokey Rule <755842+pokey@users.noreply.github.com>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2022-10-24 20:49:51 +01:00
Andreas Arvidsson
78fa2b38b4
Supports states scope for interface properties (#1065)
* Supports states scope for interface properties

* Remove trailing semi

* Added test

* Add class fields

* Use extend past optional finder

* updated test

* Added inline test

* Updated state definition for typescript

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* Add "item" tests

Co-authored-by: Pokey Rule <755842+pokey@users.noreply.github.com>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2022-10-24 20:37:03 +01:00
Andreas Arvidsson
ba9644becb
Add word separator setting (#1078)
* Added word separator setting. Removed language specific regex components.

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* Updated tests

* Word separator is now a list

* Update documentation

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* Mock word separators for tests

* Minor tweaks

* Update src/core/tokenizerConfiguration.ts

Co-authored-by: Pokey Rule <755842+pokey@users.noreply.github.com>

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* Revert "Minor tweaks"

This reverts commit b7f3695975.

* cleanup

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* Use join to create key

* Update src/core/tokenizer.ts

Co-authored-by: Pokey Rule <755842+pokey@users.noreply.github.com>

* Update docs

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Pokey Rule <755842+pokey@users.noreply.github.com>
2022-10-24 20:17:42 +01:00
Pokey Rule
04c14ba041
Add 619d7f7 to .git-blame-ignore-revs (#1085) 2022-10-24 15:41:44 +01:00
Pokey Rule
619d7f7271
Switch to prettier trailingComma: "all" (#1084)
* Switch to prettier `trailingComma: "all"`

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2022-10-24 16:08:53 +02:00
Pokey Rule
2a0f9d1e3e
Don't return single containing scope from "every" (#1080)
* Don't return single containing scope from "every"

* Cleanup code

Co-authored-by: Andreas Arvidsson <andreas.arvidsson87@gmail.com>
2022-10-24 15:21:22 +02:00
Andreas Arvidsson
e737f9da21
Renamed cheat sheet folder (#1083)
* Renamed cheat sheet folder

* Fix missing reference

Co-authored-by: Pokey Rule <755842+pokey@users.noreply.github.com>
2022-10-24 13:54:11 +01:00
Andreas Arvidsson
dba5f678ab
Remove old code (#1081) 2022-10-24 13:34:51 +01:00
Pokey Rule
c914d477c9
Improve JSdocs (#1079)
Co-authored-by: Andreas Arvidsson <andreas.arvidsson87@gmail.com>
2022-10-24 13:48:52 +02:00
Andreas Arvidsson
084afc3dc5
Moved global state into ide definition (#1067)
* Moved global state into ide definition

* revert font measurements

* use typed key

* Use list of keys to synchronize

* use correct type

* Use default value

* Clean up

* Clean up

* Improved type inference

* More typing improvements

* Doc string

* More cleanup

Co-authored-by: Pokey Rule <755842+pokey@users.noreply.github.com>
2022-10-24 11:40:06 +02:00
Andreas Arvidsson
c796c2b494
Update token removal range to keep leading indentation (#1064)
* Update token removal range to keep leading indentation

* Rework implementation; new tests

* Tweak docstring elsewhere

* One more tweak

Co-authored-by: Pokey Rule <755842+pokey@users.noreply.github.com>
2022-10-24 10:57:58 +02:00
Pokey Rule
c4d0918452
Simplify default iteration scopes; file scopeHandler (#1075)
* Started migrating scope stages into handlers

* cleanup

* more clean up

* Tweaks

* Simplify default iteration scopes; file scopeHandler

* Restore "every file" test

* Tweak

* More tweaks

* More simplification

* cleanup

* Disallow undefined iterationScopeType

* tweak

* Update src/processTargets/modifiers/scopeHandlers/DocumentScopeHandler.ts

Co-authored-by: Andreas Arvidsson <andreas.arvidsson87@gmail.com>
2022-10-24 10:22:17 +02:00
Andreas Arvidsson
a4cee9611f
Generic scope handler interfaces (#1031)
* Original scope handlers

* More stuff

* Use proper token stage in sub token stage

* Work around for identifier matcher

* Use new scope handler in relative scope stage

* Use new scope handlers in ordinal scope stage

* Update usage of containing indices

* Rename

* Refactored create target

* Clean up

* clean up

* Add some tests that should pass

* Add a bunch more tests

* Attempt at different approach to scope handlers

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* Initial implementation of new idea

* More work on this stuff

* Rename and add some todos

* More stuff

* Tweaks

* Renames and docstrings

* Restructuring

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* More jsdocs

* Tweaks

* Test fixes

* Fix error messages

* Revert `OrdinalScopeStage`

* Tweak

* jsdocs; fix import

* Don't export legacy types

* Fix import

* Preparation for surrounding pairs

* Naming cleanup

* Unify `getLegacyScopeStage` functions

* Lots of cleanup

* Fix regex `lastIndex` issue

* More cleanup

* More cleanup

* More cleanup

* Add `ancestorIndex` in prepartion for #124

* Add more jsdocs

* More docs

* More docs

* docstrings

* Improve hierarchical error type

* Docs

* More minor dog tweaks

* More docs

* More docs

* Doc strings and a couple tests

* Remove `isPreferredOver`

* Support `ancestorIndex` on api surface

* Improved jsdocs

* Split and cleanup relative stages

* Make scope handler constructor args optional

* More legacy type fixes

* Add `"identifier"` scope

* Working new code

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* Docs + cheatsheet

* Update docs

* Add jsdoc

* jsdoc

* JSDocs

* doc tweaks

* reflow

* Tweaks

Co-authored-by: Pokey Rule <755842+pokey@users.noreply.github.com>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2022-10-23 11:56:31 +02:00
Andreas Arvidsson
0b651c786b
Support abstract methods (#1063)
* Support abstract methods

* Use trailing matcher

* Don't remove extra whitespace; always remove `;`

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

Co-authored-by: Pokey Rule <755842+pokey@users.noreply.github.com>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2022-10-23 09:29:02 +02:00
David Vo
5589b5e39e
.github/workflows: Bump actions for node16 (#1068) 2022-10-22 14:31:18 +01:00
Andreas Arvidsson
6ade4bec59
Support matching pair inside jsx text nodes (#1062) 2022-10-22 10:37:21 +02:00
Phil Cohen
54a1f4399c
pre-commit: add talonfmt (#1001) 2022-10-20 07:19:23 +01:00
Pokey Rule
9cad053a1f
Tweak recording calibration display (#930)
* Tweak recording calibration display

* Tweak timing

* Fix

Co-authored-by: Andreas Arvidsson <andreas.arvidsson87@gmail.com>
2022-10-14 15:12:48 +02:00
Will Sommers
57caa79493
Add unit sub-selection for values in SCSS/CSS (#722)
* Add unit scope to SCSS/CSS

* Add unit to docs

* Add unit to new targetDescriptor type

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* Fix upgrade types

* Improve unit support

* Minor import cleanup

* Remove `that` marks to fix tests

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Pokey Rule <755842+pokey@users.noreply.github.com>
Co-authored-by: Andreas Arvidsson <andreas.arvidsson87@gmail.com>
2022-10-14 13:50:05 +01:00
Pokey Rule
fc97290e4c
Tweak inference warning message (#1036) 2022-10-14 13:11:49 +01:00
Andreas Arvidsson
9195bf2ff0
Added "its" modifier to use with inference (#1024)
* Added its modifier to use with inference

* Fix test failures

* Remove unnecessary spy

Co-authored-by: Pokey Rule <755842+pokey@users.noreply.github.com>
2022-10-14 12:32:20 +01:00
Pokey Rule
4c72cde4aa
Switch to chai for assertions (#1034)
Co-authored-by: Andreas Arvidsson <andreas.arvidsson87@gmail.com>
2022-10-14 13:11:11 +02:00
Pokey Rule
ac7437ed91
Remove unused off-screen modification protection (#1035)
Co-authored-by: Andreas Arvidsson <andreas.arvidsson87@gmail.com>
2022-10-14 12:59:25 +02:00
Pokey Rule
2d4576fba0
Add support for spying ide; add ide.messages (#1033)
* Add support for spying ide; add `ide.messages`

* Tweak wording
2022-10-14 12:48:10 +02:00
Andreas Arvidsson
429b6b72db
Update sub word regex/splitter (#1027)
* Added subWordSplitter function

* Add support for unicode characters in sub words

* Added additional test

* Support language specific identifier regex

* Cleanup

* cleanup

* Use unicode number in camel case regex

Co-authored-by: Pokey Rule <755842+pokey@users.noreply.github.com>
2022-10-11 16:24:33 +01:00
pre-commit-ci[bot]
0e769bee81
[pre-commit.ci] pre-commit autoupdate (#1029)
* [pre-commit.ci] pre-commit autoupdate

updates:
- [github.com/pre-commit/mirrors-prettier: v2.7.1 → v3.0.0-alpha.1](https://github.com/pre-commit/mirrors-prettier/compare/v2.7.1...v3.0.0-alpha.1)
- [github.com/Zac-HD/shed: 0.10.3 → 0.10.5](https://github.com/Zac-HD/shed/compare/0.10.3...0.10.5)

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* Revert prettier

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Pokey Rule <755842+pokey@users.noreply.github.com>
2022-10-11 14:10:36 +01:00
Andreas Arvidsson
7a776b6cf7
Token removal range based upon merging of tokens or not (#1028)
* Token removable range based upon merging of tokens or not

* Updated tests

* Clean up

* clean up

Co-authored-by: Pokey Rule <755842+pokey@users.noreply.github.com>
2022-10-11 13:22:58 +01:00
Pokey Rule
6e41f17bcb
Move HTML cheatsheet to home directory (#884)
* Make local HTML cheatsheet more robust

* Add a comment

* Narrow scope of PR

Co-authored-by: Andreas Arvidsson <andreas.arvidsson87@gmail.com>
2022-10-11 09:23:26 +02:00
Pokey Rule
2b21593d98
Add cursorless-talon-dev (#1017)
* Add cursorless-talon-dev

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* Tweaks

* More tweaks

* Woops

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Andreas Arvidsson <andreas.arvidsson87@gmail.com>
2022-10-11 00:07:44 +02:00
Pokey Rule
76df94abe6
Workaround for number_small performance on old knausj version (#1026)
Co-authored-by: Andreas Arvidsson <andreas.arvidsson87@gmail.com>
2022-10-10 23:57:41 +02:00