From 97f42c56ff7492cca59f353cf53bc92768189ba6 Mon Sep 17 00:00:00 2001 From: Fire Chicken Date: Tue, 19 Aug 2025 10:05:05 -0600 Subject: [PATCH 01/13] Start discussing language specific implementation details --- docs/Voice Coding/language-specific.md | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/docs/Voice Coding/language-specific.md b/docs/Voice Coding/language-specific.md index eae4f19d..b866d5cf 100644 --- a/docs/Voice Coding/language-specific.md +++ b/docs/Voice Coding/language-specific.md @@ -31,3 +31,28 @@ This activates commands related to types and functions. `type ` ## user.code_keywords This activates support for dictating language keywords. `put +` inserts the specified keywords. Keywords in the `user.code_keyword_unprefixed` list can be dictated without the put prefix. You can see the contents of the prefixed and unprefixed keyword lists for the active language with the commands `help keywords` and `help keywords unprefixed` respectively. + +# Navigating the Language Directory Structure +While not strictly necessary for voice coding with community, understanding the directory structure is useful for discovering additional functionality and expanding support for languages. Programming language support is implemented under the `lang` directory. Voice commands intended to be used across multiple languages are defined under the `tags` subdirectory. Support for a specific language is defined under the `lang` subdirectory named after the language. To understand the talent concepts discussed in this section, please read the documentation of the [talon framework](/Customization/Talon%20Framework/talon-framework-overview). + +## the tags subdirectory +The .talon files in this directory define commands that become available when the tag at the top of the file is activated. Languages can activate these tags in their .talon file to make these commands available. The .py files in this directory define the action signatures that need to be implemented in python on a per language basis to make these commands actually useful. The .py files additionally define things like lists that can also be implemented on a per language basis. + +This structure allows defining generic commands, actions, and lists that can be relied on as long as the active programming language provides implementations. For instance, a user could use the following talon file to allow dictating a typename followed by a space: + +```talon +tag: user.code_functions +- +strut : '{code_type} ' +``` + +If you look at the tags activated by your language's .talon file, you can find the corresponding commands activated by looking for that tag in the `tags` directory. You can find the corresponding actions there and see how they are implemented in the language's .py file. + +## understanding language specific .py files +Languages differ in how much support they have implemented. The following describes things you may find there. + +There is usually an Operators object defining the operators that can be inserted. + +There might be language specific actions, lists, and captures defined on a Module object. + +Language specific implementations of generic functionality will be defined on a context object. \ No newline at end of file From 21b65977b8051520c0b12d9ee61f497fdbbff984 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Tue, 19 Aug 2025 16:06:10 +0000 Subject: [PATCH 02/13] [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --- docs/Voice Coding/language-specific.md | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/docs/Voice Coding/language-specific.md b/docs/Voice Coding/language-specific.md index b866d5cf..b8d88b5a 100644 --- a/docs/Voice Coding/language-specific.md +++ b/docs/Voice Coding/language-specific.md @@ -33,10 +33,12 @@ This activates commands related to types and functions. `type ` This activates support for dictating language keywords. `put +` inserts the specified keywords. Keywords in the `user.code_keyword_unprefixed` list can be dictated without the put prefix. You can see the contents of the prefixed and unprefixed keyword lists for the active language with the commands `help keywords` and `help keywords unprefixed` respectively. # Navigating the Language Directory Structure + While not strictly necessary for voice coding with community, understanding the directory structure is useful for discovering additional functionality and expanding support for languages. Programming language support is implemented under the `lang` directory. Voice commands intended to be used across multiple languages are defined under the `tags` subdirectory. Support for a specific language is defined under the `lang` subdirectory named after the language. To understand the talent concepts discussed in this section, please read the documentation of the [talon framework](/Customization/Talon%20Framework/talon-framework-overview). ## the tags subdirectory -The .talon files in this directory define commands that become available when the tag at the top of the file is activated. Languages can activate these tags in their .talon file to make these commands available. The .py files in this directory define the action signatures that need to be implemented in python on a per language basis to make these commands actually useful. The .py files additionally define things like lists that can also be implemented on a per language basis. + +The .talon files in this directory define commands that become available when the tag at the top of the file is activated. Languages can activate these tags in their .talon file to make these commands available. The .py files in this directory define the action signatures that need to be implemented in python on a per language basis to make these commands actually useful. The .py files additionally define things like lists that can also be implemented on a per language basis. This structure allows defining generic commands, actions, and lists that can be relied on as long as the active programming language provides implementations. For instance, a user could use the following talon file to allow dictating a typename followed by a space: @@ -49,10 +51,11 @@ strut : '{code_type} ' If you look at the tags activated by your language's .talon file, you can find the corresponding commands activated by looking for that tag in the `tags` directory. You can find the corresponding actions there and see how they are implemented in the language's .py file. ## understanding language specific .py files + Languages differ in how much support they have implemented. The following describes things you may find there. There is usually an Operators object defining the operators that can be inserted. There might be language specific actions, lists, and captures defined on a Module object. -Language specific implementations of generic functionality will be defined on a context object. \ No newline at end of file +Language specific implementations of generic functionality will be defined on a context object. From 35f5a272f6a36840caa91de24abc5f2687e3d502 Mon Sep 17 00:00:00 2001 From: Fire Chicken Date: Tue, 19 Aug 2025 10:10:02 -0600 Subject: [PATCH 03/13] Fix misrecognition --- docs/Voice Coding/language-specific.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/Voice Coding/language-specific.md b/docs/Voice Coding/language-specific.md index b8d88b5a..d38aa6d9 100644 --- a/docs/Voice Coding/language-specific.md +++ b/docs/Voice Coding/language-specific.md @@ -34,7 +34,7 @@ This activates support for dictating language keywords. `put # Navigating the Language Directory Structure -While not strictly necessary for voice coding with community, understanding the directory structure is useful for discovering additional functionality and expanding support for languages. Programming language support is implemented under the `lang` directory. Voice commands intended to be used across multiple languages are defined under the `tags` subdirectory. Support for a specific language is defined under the `lang` subdirectory named after the language. To understand the talent concepts discussed in this section, please read the documentation of the [talon framework](/Customization/Talon%20Framework/talon-framework-overview). +While not strictly necessary for voice coding with community, understanding the directory structure is useful for discovering additional functionality and expanding support for languages. Programming language support is implemented under the `lang` directory. Voice commands intended to be used across multiple languages are defined under the `tags` subdirectory. Support for a specific language is defined under the `lang` subdirectory named after the language. To understand the talon concepts discussed in this section, please read the documentation of the [talon framework](/Customization/Talon%20Framework/talon-framework-overview). ## the tags subdirectory From 86f37d89f60793bdc8fd89e7466085cf98c6bcd3 Mon Sep 17 00:00:00 2001 From: Fire Chicken Date: Tue, 19 Aug 2025 10:12:08 -0600 Subject: [PATCH 04/13] Use actual words --- docs/Voice Coding/language-specific.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/Voice Coding/language-specific.md b/docs/Voice Coding/language-specific.md index d38aa6d9..54da35ac 100644 --- a/docs/Voice Coding/language-specific.md +++ b/docs/Voice Coding/language-specific.md @@ -40,7 +40,7 @@ While not strictly necessary for voice coding with community, understanding the The .talon files in this directory define commands that become available when the tag at the top of the file is activated. Languages can activate these tags in their .talon file to make these commands available. The .py files in this directory define the action signatures that need to be implemented in python on a per language basis to make these commands actually useful. The .py files additionally define things like lists that can also be implemented on a per language basis. -This structure allows defining generic commands, actions, and lists that can be relied on as long as the active programming language provides implementations. For instance, a user could use the following talon file to allow dictating a typename followed by a space: +This structure allows defining generic commands, actions, and lists that can be relied on as long as the active programming language provides implementations. For instance, a user could use the following talon file to allow dictating a type name followed by a space: ```talon tag: user.code_functions From aabb98af90d340653fafe86886c1db588fe44ffb Mon Sep 17 00:00:00 2001 From: Fire Chicken Date: Tue, 19 Aug 2025 10:13:31 -0600 Subject: [PATCH 05/13] Be more correct --- docs/Voice Coding/language-specific.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/Voice Coding/language-specific.md b/docs/Voice Coding/language-specific.md index 54da35ac..80c1b0f5 100644 --- a/docs/Voice Coding/language-specific.md +++ b/docs/Voice Coding/language-specific.md @@ -48,7 +48,7 @@ tag: user.code_functions strut : '{code_type} ' ``` -If you look at the tags activated by your language's .talon file, you can find the corresponding commands activated by looking for that tag in the `tags` directory. You can find the corresponding actions there and see how they are implemented in the language's .py file. +If you look at the tags activated by a language's .talon file, you can find the corresponding commands activated by looking for that tag in the `tags` directory. You can find the corresponding action signatures there and see how they are implemented in the language's .py file. ## understanding language specific .py files From a2b8b536319e32b62e74fa1bb7d4109722fcf763 Mon Sep 17 00:00:00 2001 From: Fire Chicken Date: Tue, 19 Aug 2025 13:42:19 -0600 Subject: [PATCH 06/13] Capitalize context --- docs/Voice Coding/language-specific.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/Voice Coding/language-specific.md b/docs/Voice Coding/language-specific.md index 80c1b0f5..df649192 100644 --- a/docs/Voice Coding/language-specific.md +++ b/docs/Voice Coding/language-specific.md @@ -58,4 +58,4 @@ There is usually an Operators object defining the operators that can be inserted There might be language specific actions, lists, and captures defined on a Module object. -Language specific implementations of generic functionality will be defined on a context object. +Language specific implementations of generic functionality will be defined on a Context object. From 415c7e657be4734ced5ced630306b30a70f8973f Mon Sep 17 00:00:00 2001 From: Nicholas Riley Date: Sat, 23 Aug 2025 12:37:17 -0400 Subject: [PATCH 07/13] Update language-specific.md --- docs/Voice Coding/language-specific.md | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/docs/Voice Coding/language-specific.md b/docs/Voice Coding/language-specific.md index df649192..b94a64b5 100644 --- a/docs/Voice Coding/language-specific.md +++ b/docs/Voice Coding/language-specific.md @@ -4,9 +4,11 @@ sidebar_position: 5 # Miscellaneous Language Specific Commands -The community [lang directory](https://github.com/talonhub/community/tree/main/lang) contains folders implementing support for specific programming languages. In the .talon file named after the programming language, you will see several tags activated. These tags activate programming commands whose behavior depends on the active programming language. Descriptions of the commands activated by these tags are available below. +The community [lang directory](https://github.com/talonhub/community/tree/main/lang) contains folders implementing support for specific programming languages and programming language features. -This page leaves out functionality that is now better done with [snippets](snippets.md) than the tag based grammar. For many languages, you will find additional language specific functionality in the language .talon and .py files. +`/.talon` files activate one or more tags. These tags enable commands shared across languages with similar features, meaning you have fewer commands to memorize if you code in multiple languages. The behavior of these commands depends on the active programming language. Descriptions of the commands activated by these tags are below. + +This page leaves out functionality that is now better done with [snippets](snippets.md) than tag-based commands. For many languages, you will find additional language specific functionality in the `/.talon` and `/.py` files. ## user.code_data_bool From 5e5897b024aaad37173b44a149fba3d68d0382a8 Mon Sep 17 00:00:00 2001 From: Nicholas Riley Date: Sat, 23 Aug 2025 12:38:06 -0400 Subject: [PATCH 08/13] Update docs/Voice Coding/language-specific.md --- docs/Voice Coding/language-specific.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/Voice Coding/language-specific.md b/docs/Voice Coding/language-specific.md index b94a64b5..f14f252d 100644 --- a/docs/Voice Coding/language-specific.md +++ b/docs/Voice Coding/language-specific.md @@ -36,7 +36,7 @@ This activates support for dictating language keywords. `put # Navigating the Language Directory Structure -While not strictly necessary for voice coding with community, understanding the directory structure is useful for discovering additional functionality and expanding support for languages. Programming language support is implemented under the `lang` directory. Voice commands intended to be used across multiple languages are defined under the `tags` subdirectory. Support for a specific language is defined under the `lang` subdirectory named after the language. To understand the talon concepts discussed in this section, please read the documentation of the [talon framework](/Customization/Talon%20Framework/talon-framework-overview). +While not strictly necessary for voice coding with community, understanding the directory structure is useful to discover functionality and when expanding language support. Each subdirectory of the `lang` directory corresponds to a programming language, except for `tags`, which includes voice commands intended to be used across multiple languages. To understand the Talon concepts discussed in this section, please read the [Talon framework](/Customization/Talon%20Framework/talon-framework-overview) documentation. ## the tags subdirectory From 94761234c2a63ae88a470c0dc13c1dea0b62261f Mon Sep 17 00:00:00 2001 From: Nicholas Riley Date: Sat, 23 Aug 2025 12:38:11 -0400 Subject: [PATCH 09/13] Update docs/Voice Coding/language-specific.md --- docs/Voice Coding/language-specific.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/Voice Coding/language-specific.md b/docs/Voice Coding/language-specific.md index f14f252d..83834b74 100644 --- a/docs/Voice Coding/language-specific.md +++ b/docs/Voice Coding/language-specific.md @@ -38,7 +38,7 @@ This activates support for dictating language keywords. `put While not strictly necessary for voice coding with community, understanding the directory structure is useful to discover functionality and when expanding language support. Each subdirectory of the `lang` directory corresponds to a programming language, except for `tags`, which includes voice commands intended to be used across multiple languages. To understand the Talon concepts discussed in this section, please read the [Talon framework](/Customization/Talon%20Framework/talon-framework-overview) documentation. -## the tags subdirectory +## The `tags` Subdirectory The .talon files in this directory define commands that become available when the tag at the top of the file is activated. Languages can activate these tags in their .talon file to make these commands available. The .py files in this directory define the action signatures that need to be implemented in python on a per language basis to make these commands actually useful. The .py files additionally define things like lists that can also be implemented on a per language basis. From db13e6e7fa045850d7369b840fefcc7b9f89296c Mon Sep 17 00:00:00 2001 From: Nicholas Riley Date: Sat, 23 Aug 2025 12:38:17 -0400 Subject: [PATCH 10/13] Update docs/Voice Coding/language-specific.md --- docs/Voice Coding/language-specific.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/Voice Coding/language-specific.md b/docs/Voice Coding/language-specific.md index 83834b74..31d5f704 100644 --- a/docs/Voice Coding/language-specific.md +++ b/docs/Voice Coding/language-specific.md @@ -40,7 +40,7 @@ While not strictly necessary for voice coding with community, understanding the ## The `tags` Subdirectory -The .talon files in this directory define commands that become available when the tag at the top of the file is activated. Languages can activate these tags in their .talon file to make these commands available. The .py files in this directory define the action signatures that need to be implemented in python on a per language basis to make these commands actually useful. The .py files additionally define things like lists that can also be implemented on a per language basis. +The .talon files in this directory define commands that become available when the tag at the top of the file is activated. Languages can activate these tags in their .talon file to make these commands available. The .py files in this directory define the action signatures that need to be implemented in Python on a per-language basis to make these commands actually useful. The .py files additionally define things like lists that can also be implemented on a per-language basis. This structure allows defining generic commands, actions, and lists that can be relied on as long as the active programming language provides implementations. For instance, a user could use the following talon file to allow dictating a type name followed by a space: From 0ebf3c4eb90b9a9b2de8ed8293e7d72d908bf2dc Mon Sep 17 00:00:00 2001 From: Nicholas Riley Date: Sat, 13 Sep 2025 13:03:25 -0400 Subject: [PATCH 11/13] Update docs/Voice Coding/language-specific.md --- docs/Voice Coding/language-specific.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/Voice Coding/language-specific.md b/docs/Voice Coding/language-specific.md index 31d5f704..0c77a861 100644 --- a/docs/Voice Coding/language-specific.md +++ b/docs/Voice Coding/language-specific.md @@ -36,7 +36,7 @@ This activates support for dictating language keywords. `put # Navigating the Language Directory Structure -While not strictly necessary for voice coding with community, understanding the directory structure is useful to discover functionality and when expanding language support. Each subdirectory of the `lang` directory corresponds to a programming language, except for `tags`, which includes voice commands intended to be used across multiple languages. To understand the Talon concepts discussed in this section, please read the [Talon framework](/Customization/Talon%20Framework/talon-framework-overview) documentation. +While not strictly necessary for voice coding with community, understanding the directory structure is useful to discover functionality and when extending language support. Each subdirectory of the `lang` directory corresponds to a programming language, except for `tags`, which includes voice commands intended to be used across multiple languages. To understand the Talon concepts discussed in this section, please read the [Talon framework](/Customization/Talon%20Framework/talon-framework-overview) documentation. ## The `tags` Subdirectory From 253ca24d3297f6d0b4a871bdd7ed344a58d2daf1 Mon Sep 17 00:00:00 2001 From: Nicholas Riley Date: Sat, 13 Sep 2025 13:03:31 -0400 Subject: [PATCH 12/13] Update docs/Voice Coding/language-specific.md --- docs/Voice Coding/language-specific.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/Voice Coding/language-specific.md b/docs/Voice Coding/language-specific.md index 0c77a861..e1d9eb9e 100644 --- a/docs/Voice Coding/language-specific.md +++ b/docs/Voice Coding/language-specific.md @@ -40,7 +40,7 @@ While not strictly necessary for voice coding with community, understanding the ## The `tags` Subdirectory -The .talon files in this directory define commands that become available when the tag at the top of the file is activated. Languages can activate these tags in their .talon file to make these commands available. The .py files in this directory define the action signatures that need to be implemented in Python on a per-language basis to make these commands actually useful. The .py files additionally define things like lists that can also be implemented on a per-language basis. +The .talon files in this directory define commands that become available when the tag at the top of the file is activated. Languages can activate these tags in their .talon file to make these commands available. The .py files in this directory declare the actions that need to be implemented in a per-language context in Python to make these commands actually useful. The .py files additionally declare lists and settings that can be defined on a per-language basis. This structure allows defining generic commands, actions, and lists that can be relied on as long as the active programming language provides implementations. For instance, a user could use the following talon file to allow dictating a type name followed by a space: From e0dac1d59e0b612c8e5971c4b6a3a191d745c5bf Mon Sep 17 00:00:00 2001 From: Nicholas Riley Date: Sat, 13 Sep 2025 13:03:37 -0400 Subject: [PATCH 13/13] Update docs/Voice Coding/language-specific.md --- docs/Voice Coding/language-specific.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/Voice Coding/language-specific.md b/docs/Voice Coding/language-specific.md index e1d9eb9e..9ea7d41c 100644 --- a/docs/Voice Coding/language-specific.md +++ b/docs/Voice Coding/language-specific.md @@ -52,7 +52,7 @@ strut : '{code_type} ' If you look at the tags activated by a language's .talon file, you can find the corresponding commands activated by looking for that tag in the `tags` directory. You can find the corresponding action signatures there and see how they are implemented in the language's .py file. -## understanding language specific .py files +## Understanding language specific .py files Languages differ in how much support they have implemented. The following describes things you may find there.