Commit Graph

155 Commits

Author SHA1 Message Date
Andreas Arvidsson
44a36e6740
Lint to prevent floating promises (#2497)
Fixes #1984

Note that I just mechanically went through all the errors and tried to
fix them. We definitely need to look at the change log and decide if we
like the changes. Maybe we should add a few more if statements with
throw instead of asserting not now and so on.

## Checklist

- [/] 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>
2024-07-30 16:01:46 +00:00
Pokey Rule
8479b9a564
Bumpt typescript => 5.5.3 (#2530)
## Checklist

- [-] 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
2024-07-18 14:48:36 +00:00
Pokey Rule
e22456fa51
pnpm => 9.5.0; pnpm dedupe (#2486)
## Checklist

- [-] 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
2024-07-11 20:30:42 +00:00
Pokey Rule
02e70878d3
Bump pnpm => 9.0.6 (#2314)
## Checklist

- [-] 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
2024-04-29 13:28:26 +00:00
Pokey Rule
d5be7e7e81
Add scope type parser piece of custom command grammar (#2295)
Initial work towards
https://github.com/cursorless-dev/cursorless/issues/492; will be used to
parse scope types in
https://github.com/cursorless-dev/cursorless/pull/2131

Exposes a function `parseScopeType` that can parse strings like `funk`,
`curly` etc into their corresponding scope type payloads

Here's a railroad:
https://deploy-preview-2295--cursorless.netlify.app/custom-command-railroad

## Checklist

- [ ] 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
2024-04-22 12:33:12 +00:00
Pokey Rule
b9709f9ad3
Upgrade all dependencies (#2273)
This PR upgrades all of our dependencies to the latest versions,
including a few major dependency version bumps. Figured it was good
housekeeping to do once in a while

I pinned node and vscode, but otherwise everything is upgraded

## Checklist

- [-] 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)
- [x] I have not broken the cheatsheet
2024-03-28 04:33:53 +00:00
Pokey Rule
de37ebf778
Add prettier-plugin-tailwindcss (#2245)
Sorts in [this
order](https://tailwindcss.com/blog/automatic-class-sorting-with-prettier#how-classes-are-sorted),
which seems reasonable

## Checklist

- [-] 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>
2024-03-25 19:50:54 +00:00
Pokey Rule
50e74d86ac
bump pnpm => 8.15.3 (#2248)
## Checklist

- [-] 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
2024-02-24 11:44:55 +00:00
Pokey Rule
a4c7fc7c44
bump docusauruas => 3.1.0 (#2176)
## Checklist

- [ ] 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
2024-01-18 06:32:17 +00:00
Pokey Rule
c6f5600a63
Bump pnpm => 8.12.0 (#2127)
## Checklist

- [ ] 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
2023-12-12 18:32:08 +00:00
Pokey Rule
cc81dbcc52
Disallow .only in mocha tests (#2107)
Fixes #2105



## Checklist

- [ ] 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
2023-12-07 13:41:28 +00:00
Pokey Rule
7a51850e1a
keyboard: Use parser for key sequences (#2051)
## 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)
(keeping this somewhat under wraps while we experiment
- [x] I have not broken the cheatsheet
- [-] Refactor delete mapping to just issue token for delete action
- [x] Extract partial parameters
- [-] Add railroad to docs?
2023-12-05 15:27:34 +00:00
Pokey Rule
2a56990b94
Bump docusaurus 3.0.0 => 3.0.1 (#2088)
Removes dependency on wait-on, which has security warning

## Checklist

- [ ] 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
2023-12-05 12:05:28 +00:00
Pokey Rule
b941a3a111
Cleanup docusaurus config (#2027)
And ensure linter is actually running on it

## Checklist

- [-] 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
2023-11-13 16:13:10 +00:00
Pokey Rule
2603f74cf3
Bump typescript-eslint to 6.10.0 (#2025)
- Fixes #2024

## Checklist

- [ ] 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
2023-11-13 15:31:24 +00:00
Pokey Rule
7efcbfd91d
bump typescript => 5.2.2 (#1979)
## Checklist

- [-] 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)
- [x] I have not broken the cheatsheet
- [x] Check source maps are working for extension
- [x] Check source maps are working in test files
- [x] Don't depend on esbuild in all packages?
- [x] Try running vsix from CI locally
- [-] Use two .. for update recorded tests script

---------

Co-authored-by: Andreas Arvidsson <andreas.arvidsson87@gmail.com>
2023-11-13 13:30:21 +00:00
Pokey Rule
2df07ac0d8
Bump prettier and typescript-eslint (#1989)
- In preparation for #1979

## Checklist

- [ ] 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
2023-11-03 22:44:37 +00:00
Pokey Rule
718ab994a3
Bump next.js to 13.5.4 (#1937)
## Checklist

- [ ] 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
2023-10-13 15:03:54 +00:00
Pokey Rule
318d3ba05c
deps: Upgrade @pnpm/meta-updater to 1.0.0 (#1791)
## Checklist

- [ ] 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
2023-08-15 11:05:45 +00:00
Pokey Rule
8bfe58a152
bump pnpm to 8.6.12 (#1759)
## Checklist

- [ ] 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
2023-08-09 14:58:36 +00:00
Pokey Rule
20c995ba33
upgrade typescript to 5.1.6 (#1761)
## Checklist

- [ ] 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
2023-08-09 14:58:16 +00:00
Pokey Rule
16973f8f32
Bump docusaurus to 3.0.0-alpha.0 (#1745)
We have some security warnings on a couple packages that are
dependencies of docusaurus, so I decided to upgrade to the latest to
remove those dependencies. Docusaurus uses their nightly version on
their own docs, and things seem to work for us on this version with no
issue, so I think it's ok. In addition, we were violating their peer
dependencies by using react 18; we now no longer need to do that. Also,
this version allows us to use mdx v2, which has a lot of niceties that
we'll probably want as we do our big docs refactor
(https://github.com/cursorless-dev/cursorless/issues/867)

- depends on https://github.com/cursorless-dev/cursorless/pull/1750 to
fix typedoc failure

## Checklist

- [ ] 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
2023-08-09 13:40:09 +00:00
David Vo
bd965dec44
Update to prettier 3.0.0 (#1697)
https://prettier.io/blog/2023/07/05/3.0.0.html

## Checklist

- [ ] 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>
2023-07-30 18:52:59 +00:00
Andreas Arvidsson
7781732919
Added compile clean script (#1556)
## Checklist

- [ ] 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
2023-07-08 17:08:39 +00:00
Pokey Rule
e37762f6ca
Merge cursorless-vscode-core into cursorless-vscode (#1421)
- Depends on #1393

## Checklist

- [ ] 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
2023-04-14 22:03:16 +00:00
Pokey Rule
570f16230e
Add recorded test formatter to pre-commit (#1423)
## Checklist

- [ ] 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>
2023-04-14 12:15:11 +00:00
Pokey Rule
14c3dec9e5
Clean up package.json scripts (#1413)
- Sort scripts
- Rename fixers to start with `fix:`
- Add a couple fixers
- Remove old scripts

## Checklist

- [ ] 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
2023-04-13 19:18:53 +00:00
Pokey Rule
c91b389716
Upgrade prettier and eslint (#1412)
## Checklist

- [ ] 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>
2023-04-11 14:56:43 +00:00
David Vo
e8035b8e0f
Lint *.tsx from top-level lint script (#1403)
The website `*.tsx` files weren't being linted in CI, as `pnpm test`
isn't doing a recursive `pnpm lint`:


68ba545520/package.json (L18)

A single `eslint` run should be enough to lint the entire TypeScript
codebase with the correct configs, I think.

## Checklist

- [ ] 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
2023-04-10 16:12:02 +00:00
Pokey Rule
047a09e3a5
typescript 4.9.5 => 5.0.3 (#1377)
## Checklist

- [ ] 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
2023-04-03 13:42:51 +00:00
Pokey Rule
0d7b536c37
Bump pnpm: 7.29.1 => 8.1.0 (#1373)
## Checklist

- [ ] 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
2023-03-31 16:00:46 +00:00
Pokey Rule
f90f49677d
Migrate to a pnpm monorepo (#1281)
- closes https://github.com/cursorless-dev/cursorless/issues/945
- closes https://github.com/cursorless-dev/cursorless/issues/1044
- depends on https://github.com/cursorless-dev/cursorless/pull/1322
- depends on https://github.com/cursorless-dev/cursorless/pull/1327

## Checklist

- [x] Split into smaller PRs for ease of review
- [x] Try DX tests again
https://github.com/cursorless-dev/cursorless/discussions/1289
- [x] 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)
- [x] File issue for speeding up cheatsheet / making it not optional
locally https://github.com/cursorless-dev/cursorless/issues/1307
- [x] Set package manager in package.json
https://nodejs.org/api/packages.html#packagemanager
- [x] Re-add lint rule to prevent api types from importing anything
- [x] Try local install
  - [x] Make sure cheatsheet works
- [x] Make sure local extension build depends on building cheatsheet, or
allows no cheatsheet
- [x] Figure out why we're getting so many extra `internal` modules
- [x] Update https://github.com/cursorless-dev/cursorless/issues/931 to
indicate we're now patching instead of swizzling
- [x] Make sure lint rules are actually running in CI
- [x] Check that we've addressed everything in
https://github.com/cursorless-dev/cursorless/issues/945
- [x] Incorporate changes from
https://github.com/cursorless-dev/cursorless/pull/1166
- [x] ~~Make sure this PR doesn't break doc links; see
https://github.com/cursorless-dev/cursorless/pull/942#discussion_r968556276~~
There's no way to avoid these links getting broken if we upgrade
typedoc; filed https://github.com/cursorless-dev/cursorless/issues/1304
to track
- [x] Revert https://github.com/cursorless-dev/cursorless/pull/1284
- [x] I have added
[tests](https://www.cursorless.org/docs/contributing/test-case-recorder/)
- [x] I have not broken the cheatsheet
- [x] Generate cursorless-vscode package.json automatically, and change
the name we use to `@cursorless/cursorless-vscode` in the `package.json`
checked into source control
- [x] Be sure to update meta-updater to check for that instead of name
`cursorless` (see fixme in its `index.ts`)

## Desiderata

- From https://github.com/cursorless-dev/cursorless/discussions/1289

### Correctly flagging errors

- [x] `D1`: It is a compile error to import external packages that are
not listed in `package.json`
   - [x] `D1.1`: `vscode` (for some reason this one behaves strangely)
   - [x] `D1.2`: Other packages
- [x] `D2`: It is **not** a compile error to import from local packages
that you depend on, using our preferred syntax (eg `@cursorless/foo`)
- [x] `D3`: It is a compile error to import from local packages that you
depend on, **not** using our preferred syntax (eg `../foo`)
- [x] `D4`: It is a compile error to import from local packages that you
do **not** depend on, either
- [x] `D4.1`: using our non-preferred syntax (eg `../packages/foo`), or
  - [x] `D4.2`: using preferred syntax (eg `@cursorless/foo`)
- [ ] `D5`: It is a compile error to import from anything other than
`index.ts` in another module
  - [x] `D5.1`: **no** `@cursorless/foo/bar`
  - [x] `D5.2`: **no** `../foo/bar`
  - [x] `a`: Even if you depend on the module
- [ ] `b`: Even if `bar` was re-exported in `foo/index.ts`. In that case
it should be required to import `@cursorless/foo`. Untested, but
probably works, and I ran out of steam 😅
- [x] `D6`: It is **not** a compile error to import external packages
listed in `package.json`
   - [x] `D6.1`: `vscode` (for some reason this one behaves strangely)
   - [x] `D6.2`: Other packages

### Auto-import
- [x] `D7`: Auto-import doesn't import from external packages not listed
in `package.json`
   - [x] `D7.1`: `vscode` (for some reason this one behaves strangely)
   - [x] `D7.2`: Other packages
- [x] `D8`: Auto-import imports from external packages listed in
`package.json`
   - [x] `D8.1`: `vscode` (for some reason this one behaves strangely)
   - [x] `D8.2`: Other packages
- [x] `D9`: Auto-import imports from local packages that you depend on,
using our preferred syntax (eg `@cursorless/foo`)
- [x] `D10`: Auto-import doesn't import from local packages that you
don't depend on
- [x] `D11`: Auto-import doesn't import from anything other than
`index.ts` in another package (eg **no** `@cursorless/foo/bar`)
   - [x] `D11.1`: When you depend on the package
   - [x] `D11.2`: When you don't depend on the package

### Other DX
- [x] `D12`: Find references across projects when no file from the
referencing project is open
- [x] `D13`: Rename across projects when no file from the referencing
project is open
- [x] `D14`: Jump to definition across projects
- [ ] `D15`: It is easy to move a file from one package to another
- [ ] `D16`: It is easy to create a new package
- [ ] `D17`: Breakpoints work in Cursorless extension
- [x] `D18`: Breakpoints work on Cursorless root website
- [ ] `D19`: Breakpoints work on Cursorless docs website
2023-03-21 13:28:05 +00:00
Pokey Rule
1b18e38efe
Restructure directories in preparation for move to pnpm workspace (#1275)
This PR does a massive restructure of our directories in preparation for
splitting up into separate packages for #945. Here is the new layout:

<img width="286" alt="image"
src="https://user-images.githubusercontent.com/755842/220430713-56d211fe-043a-46ae-b802-449cd0693cd5.png">


## Checklist

- [x] I have added
[tests](https://www.cursorless.org/docs/contributing/test-case-recorder/)
- [x] 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)
- [x] I have not broken the cheatsheet

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2023-02-23 15:09:07 +01:00
Pokey Rule
597fd4a935
Remove vscode references from test case recorder (#1272)
Also simplifies workflow for adding a new directory to recorded test
case dir by adding an inline option:

<img width="870" alt="image"
src="https://user-images.githubusercontent.com/755842/219060655-8a8d3a1d-5989-403e-b56e-80ede9f5526f.png">

## Checklist

- [ ] 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: Andreas Arvidsson <andreas.arvidsson87@gmail.com>
2023-02-16 14:02:34 +01:00
Pokey Rule
9ee77715fe
Reintroduce stable hats (#1252) 2023-02-10 09:55:46 -07:00
Pokey Rule
bac6592da7
Revert "Stable hats (#1225)" (#1251)
This reverts commit 9406cd30a7.

## Checklist

- [ ] 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[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2023-02-04 16:55:59 +00:00
Pokey Rule
9406cd30a7
Stable hats (#1225)
- Fixes #432 

## Checklist

- [ ] I have added
[tests](https://www.cursorless.org/docs/contributing/test-case-recorder/)
- [ ] Add test for case where enabled hat styles change, both adding or
removing an enabled hat style
- [ ] 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[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2023-02-04 17:21:37 +01:00
Andreas Arvidsson
4dc746c3e3
Update editor config indent (#1126)
## Checklist

- [ ] 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[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2022-12-21 12:07:32 +00:00
David Vo
62d4238574
[keyboard] Add some missing scopes (#1189) 2022-12-17 15:11:53 +00:00
Simeon Cheeseman
c9e06d765c
Fix test fixture upgrade scripts (#942)
Fixed the v1 to v2 script to preserve order and not drop any values.

- [ ] ~~Use normalisation code for updating fixtures in
a4cee9611f/src/test/suite/recorded.test.ts (L130-L138~~)
(filed https://github.com/cursorless-dev/cursorless/issues/1168 to
follow up on this one)

Co-authored-by: Pokey Rule <755842+pokey@users.noreply.github.com>
Co-authored-by: David Vo <auscompgeek@users.noreply.github.com>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2022-12-12 11:11:46 +00:00
Pokey Rule
541832fa24
Initial basic keyboard actions (#958)
See
https://deploy-preview-958--cursorless.netlify.app/docs/user/experimental/keyboard/modal/

## Checklist

- [x] I have added
[tests](https://www.cursorless.org/docs/contributing/test-case-recorder/)
- [x] Figure out why it fails if cursorless test case recorder is active
- [x] Figure out why it won't let go of `type` once it hits an error, eg
test case recorder error
2022-12-08 12:35:44 +01:00
Phil Cohen
371e74e44e
eslint: make --fix remove unused imports (#1076)
I noticed that `eslint --fix` didn't remove unused imports and `eslint
src --ext ts` complained with a warning about an existing unused one:

```
$ eslint src --ext ts
.../src/core/commandVersionUpgrades/canonicalizeAndValidateCommand.ts
  1:10  warning  'window' is defined but never used. Allowed unused vars must match /^_/u  @typescript-eslint/no-unused-vars
```

I imagine this is because most people are fixing this up using the
Visual Studio Code action, but it's nice to have everything working from
the command line. Also JetBrains will only do it if `eslint --fix` does,
hence my motivation :)

This adds the configuration such that `eslint src --ext ts --fix`
removed unused imports, and fixes the existing unused imports in the
codebase. Let me know if I made a mistake.

## Checklist

- [ ] 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_html)

Co-authored-by: Pokey Rule <755842+pokey@users.noreply.github.com>
2022-11-18 08:08:25 -08:00
Andreas Arvidsson
94dadfc898
Implement our own types instead of vscode (#1128)
* Started working on our own replacement for vscode types

* remove unused imports

* More workl

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

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

* more changes

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

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

* More stuff

* Stuff stuff

* Some super secret clean up stuff

* Additional changes beyond human comprehension

* clean up

* Trans dimensional super fixes

* Mind boggling changes

* Hopefully done with this suffering

* Fixed circular dependencies

* Updated fake ide

* Added test for position

* Added range test

* Added getter to vscode editable editor implementation

* Convert position

* Added text line implementation

* Better handling of selections

* group  document by uri

* Remove on use to vscode converter

* Clean up tests

* Make sure functions use arrow format

* Use weak map to keep track of text editors

* cleanup

* empty

* use arrow functions

* updated lock file

* restore normal methods for position and range

* Remove arrow expressions as method

* added is active on the text editor

* Error when trying to deselect all selections

* added types

* Make use of `@cursorless` imports

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

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

* Moved vscode utilities

* update

* Fixed stupid bug

* empty

* stuff

* stuff

* Added to empty range on position

* cleaned up vscode edit

* clean up

* clean up vscode focus editor

* move creation of text editors into ide

* cleanup

* moved get node at location into editor

* empty

* remove spread

* Add license reference

* use full vscode implementation

* Revert "moved get node at location into editor"

This reverts commit 4c2ec1cfab.

* remove location type

* Switch `getNodeAtLocation` to use document

* Use editable editor for performing edits

* Add `ide` reference to editable text editor

* docs

* Tweak

* tweak

* Fix bug with id / editor generation

* Remove unnecessary functions

* Tweak name

* merged vscode text editor implementations

* Add back comments about range adjustment

* Tweak docstrings

* docs

* add a couple tests

* Updated line behavior

* Test tweaks

* updated behavior

* added selection isEqual

* `isEqual` => `isRangeEqual`

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

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

* cleanup

* Capture more unit tests in launch config

* move `openNewEditor`

* Basic `TextLine` test

* Selection + more range tests

* yarn.lock tweak

* more line 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>
2022-11-16 17:52:12 +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
Pokey Rule
1294e2259f
Switch NestedScopeHandler to generator (#1099)
* Switch `NestedScopeHandler` to generator

* Cleanup docs
2022-10-29 22:39:16 +02: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
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
b474f22cdd
Improve cheatsheet update machinery (#1010)
* Improve cheatsheet update machinery

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

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

* Tweak

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2022-10-05 08:30:03 +02:00
Pokey Rule
9efff2154b
Prefer ui side (#973) 2022-09-21 11:24:36 +01:00
Pokey Rule
af15ae2c05
Fix special chars without accents (#907)
* Add some tests for special chars

* Tweak naming

* Remove `preserveAccents` setting

* `accentsToPreserve` => `lettersToPreserve`

* Fixes

* Update doc string

* Fix `æ`

* Improve tests

Co-authored-by: Andreas Arvidsson <andreas.arvidsson87@gmail.com>
2022-08-04 08:44:44 +02:00