Skip to content
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 29 additions & 1 deletion .github/workflows/deploy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ on:
branches: [main]

jobs:
deploy:
publish-extension:
runs-on: ubuntu-latest
if: ${{ github.event.workflow_run.conclusion == 'success' }}
environment: production
Expand All @@ -33,3 +33,31 @@ jobs:
pat: ${{ secrets.VS_MARKETPLACE_TOKEN }}
registryUrl: https://marketplace.visualstudio.com
extensionFile: ${{ steps.publishToOpenVSX.outputs.vsixPath }}

push-cursorless-talon:
name: Push cursorless-talon subrepo
runs-on: ubuntu-latest
needs: publish-extension
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We make sure extension publication was successful before pushing talon side so that users don't end up with new talon files but old extension

environment: production
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do deep clone so that we can use it for our git push

path: main
- name: Checkout cursorless-talon
uses: actions/checkout@v2
with:
repository: cursorless-dev/cursorless-talon
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Notice we moved cursorless-talon into a new cursorless-dev organization, because that's the only way to make it so that only certain users can push to a branch

token: ${{ secrets.CURSORLESS_BOT_TOKEN }}
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We now have a bot 🤖. Only the bot is allowed to push to main on cursorless-talon now

path: cursorless-talon
- name: Checkout git-subrepo
uses: actions/checkout@v2
with:
repository: ingydotnet/git-subrepo
path: git-subrepo
- run: |
source ../git-subrepo/.rc
git subrepo push cursorless-talon --remote="file://$(realpath ../cursorless-talon)"
working-directory: main
- run: git push
working-directory: cursorless-talon
6 changes: 6 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,3 +27,9 @@ jobs:
if: runner.os == 'Linux'
- run: yarn test
if: runner.os != 'Linux'
lint-python:
name: Python lint
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: psf/black@stable
1 change: 1 addition & 0 deletions cursorless-talon/.github/CODEOWNERS
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
* @pokey
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All the files under cursorless-talon just come from the main branch there

13 changes: 13 additions & 0 deletions cursorless-talon/.github/FUNDING.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# These are supported funding model platforms

github: pokey # Replace with up to 4 GitHub Sponsors-enabled usernames e.g., [user1, user2]
patreon: # Replace with a single Patreon username
open_collective: # Replace with a single Open Collective username
ko_fi: # Replace with a single Ko-fi username
tidelift: # Replace with a single Tidelift platform-name/package-name e.g., npm/babel
community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry
liberapay: # Replace with a single Liberapay username
issuehunt: # Replace with a single IssueHunt username
otechie: # Replace with a single Otechie username
lfx_crowdfunding: # Replace with a single LFX Crowdfunding project-name e.g., cloud-foundry
custom: # Replace with up to 4 custom sponsorship URLs e.g., ['link1', 'link2']
10 changes: 10 additions & 0 deletions cursorless-talon/.github/workflows/black.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
name: Lint
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure we need to run linting there as well 🤔


on: [push, pull_request]

jobs:
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: psf/black@stable
3 changes: 3 additions & 0 deletions cursorless-talon/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
*.flac
data/
.vscode/settings.json
12 changes: 12 additions & 0 deletions cursorless-talon/.gitrepo
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
; DO NOT EDIT (unless you know what you are doing)
;
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So this is the file generated by git-subrepo. Keeps track of all the information needed for pushing. Pretty cool

; This subdirectory is a git "subrepo", and this file is maintained by the
; git-subrepo command. See https://github.com/git-commands/git-subrepo#readme
;
[subrepo]
remote = https://github.com/cursorless-dev/cursorless-talon.git
branch = main
commit = afa65b88397984b3a9e66702550beaadd23a3f00
parent = bfd4097f4ac0eeaf4db325a05ad238c845cdcaac
method = merge
cmdver = 0.4.3
123 changes: 123 additions & 0 deletions cursorless-talon/.vscode/.ropeproject/config.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,123 @@
# The default ``config.py``
# flake8: noqa


def set_prefs(prefs):
"""This function is called before opening the project"""

# Specify which files and folders to ignore in the project.
# Changes to ignored resources are not added to the history and
# VCSs. Also they are not returned in `Project.get_files()`.
# Note that ``?`` and ``*`` match all characters but slashes.
# '*.pyc': matches 'test.pyc' and 'pkg/test.pyc'
# 'mod*.pyc': matches 'test/mod1.pyc' but not 'mod/1.pyc'
# '.svn': matches 'pkg/.svn' and all of its children
# 'build/*.o': matches 'build/lib.o' but not 'build/sub/lib.o'
# 'build//*.o': matches 'build/lib.o' and 'build/sub/lib.o'
prefs["ignored_resources"] = [
"*.pyc",
"*~",
".ropeproject",
".hg",
".svn",
"_svn",
".git",
".tox",
]

# Specifies which files should be considered python files. It is
# useful when you have scripts inside your project. Only files
# ending with ``.py`` are considered to be python files by
# default.
# prefs['python_files'] = ['*.py']

# Custom source folders: By default rope searches the project
# for finding source folders (folders that should be searched
# for finding modules). You can add paths to that list. Note
# that rope guesses project source folders correctly most of the
# time; use this if you have any problems.
# The folders should be relative to project root and use '/' for
# separating folders regardless of the platform rope is running on.
# 'src/my_source_folder' for instance.
# prefs.add('source_folders', 'src')

# You can extend python path for looking up modules
# prefs.add('python_path', '~/python/')

# Should rope save object information or not.
prefs["save_objectdb"] = True
prefs["compress_objectdb"] = False

# If `True`, rope analyzes each module when it is being saved.
prefs["automatic_soa"] = True
# The depth of calls to follow in static object analysis
prefs["soa_followed_calls"] = 0

# If `False` when running modules or unit tests "dynamic object
# analysis" is turned off. This makes them much faster.
prefs["perform_doa"] = True

# Rope can check the validity of its object DB when running.
prefs["validate_objectdb"] = True

# How many undos to hold?
prefs["max_history_items"] = 32

# Shows whether to save history across sessions.
prefs["save_history"] = True
prefs["compress_history"] = False

# Set the number spaces used for indenting. According to
# :PEP:`8`, it is best to use 4 spaces. Since most of rope's
# unit-tests use 4 spaces it is more reliable, too.
prefs["indent_size"] = 4

# Builtin and c-extension modules that are allowed to be imported
# and inspected by rope.
prefs["extension_modules"] = []

# Add all standard c-extensions to extension_modules list.
prefs["import_dynload_stdmods"] = True

# If `True` modules with syntax errors are considered to be empty.
# The default value is `False`; When `False` syntax errors raise
# `rope.base.exceptions.ModuleSyntaxError` exception.
prefs["ignore_syntax_errors"] = False

# If `True`, rope ignores unresolvable imports. Otherwise, they
# appear in the importing namespace.
prefs["ignore_bad_imports"] = False

# If `True`, rope will insert new module imports as
# `from <package> import <module>` by default.
prefs["prefer_module_from_imports"] = False

# If `True`, rope will transform a comma list of imports into
# multiple separate import statements when organizing
# imports.
prefs["split_imports"] = False

# If `True`, rope will remove all top-level import statements and
# reinsert them at the top of the module when making changes.
prefs["pull_imports_to_top"] = True

# If `True`, rope will sort imports alphabetically by module name instead
# of alphabetically by import statement, with from imports after normal
# imports.
prefs["sort_imports_alphabetically"] = False

# Location of implementation of
# rope.base.oi.type_hinting.interfaces.ITypeHintingFactory In general
# case, you don't have to change this value, unless you're an rope expert.
# Change this value to inject you own implementations of interfaces
# listed in module rope.base.oi.type_hinting.providers.interfaces
# For example, you can add you own providers for Django Models, or disable
# the search type-hinting in a class hierarchy, etc.
prefs[
"type_hinting_factory"
] = "rope.base.oi.type_hinting.factory.default_type_hinting_factory"


def project_opened(project):
"""This function is called after opening the project"""
# Do whatever you like here!
Binary file added cursorless-talon/.vscode/.ropeproject/objectdb
Binary file not shown.
21 changes: 21 additions & 0 deletions cursorless-talon/LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
MIT License

Copyright (c) 2021 Brandon Virgil Rule

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
75 changes: 75 additions & 0 deletions cursorless-talon/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,75 @@
# Cursorless talon

This repository contains the talon side of [Cursorless](https://marketplace.visualstudio.com/items?itemName=pokey.cursorless).

## Documentation

Full documentation can be found in [docs](docs/), or by saying `"cursorless docs"`. Once you understand the concepts, you can pull up a cheatsheet for reference using the command `"cursorless help"`.

## Installation

First, install the dependencies:

### Dependencies

1. Install [Talon](https://talonvoice.com/)
2. Install [knausj_talon](https://github.com/knausj85/knausj_talon). Note that
even a heavily modified version of knausj should be fine, but make sure you
have merged since commit
[knausj85/knausj_talon@`ff89cc1`](https://github.com/knausj85/knausj_talon/commit/ff89cc18f73669fd175ab91b9f3e53665c6044df).
If rebasing is too painful, or if you are not a user of knausj, you can just
clone [the command
client](https://github.com/pokey/talon-vscode-command-client) into your
talon user directory. You may need a couple other things from knausj but nothing major. Please file an issue if you have trouble getting this repo to work without knausj.
3. Install [VSCode](https://code.visualstudio.com/)
4. Install the [VSCode talon extension pack](https://marketplace.visualstudio.com/items?itemName=pokey.talon)
5. Install the [Cursorless VSCode extension](https://marketplace.visualstudio.com/items?itemName=pokey.cursorless)
6. Follow the instructions below to install cursorless-vscode itself.

### Installing this repo

#### Linux & Mac

Clone repo into `~/.talon/user`

```insert code:
cd ~/.talon/user
git clone https://github.com/pokey/cursorless-talon cursorless-talon
```

Alternatively, access the directory by right clicking the Talon icon in taskbar, clicking Scripting>Open ~/talon, and navigating to user.

The folder structure should look something like the below:

```insert code:
~/.talon/user/knausj_talon
~/.talon/user/knausj_talon/apps
~/.talon/user/knausj_talon/code
...
~/.talon/user/cursorless-talon
~/.talon/user/cursorless-talon/src
...
```

#### Windows

Clone repo into `%AppData%\Talon\user`

```insert code:
cd %AppData%\Talon\user
git clone https://github.com/pokey/cursorless-talon cursorless-talon
```

Alternatively, access the directory by right clicking the Talon icon in taskbar, clicking Scripting>Open ~/talon, and navigating to user.

The folder structure should look something like the below:

```insert code:
%AppData%\Talon\user\knausj_talon
%AppData%\Talon\user\knausj_talon\apps
%AppData%\Talon\user\knausj_talon\code
...
%AppData%\Talon\user\cursorless-talon
%AppData%\Talon\user\cursorless-talon\src
...
```
Loading