Skip to content
Merged
Show file tree
Hide file tree
Changes from all 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
Original file line number Diff line number Diff line change
Expand Up @@ -670,7 +670,7 @@ The following are internal scopes. They are not intended for user interaction or

### Interior: Resource

<i>the body of a 'with' / 'use' / 'using' statement</i>
<i>the body of a `with` / `use` / `using` statement</i>

##### C#

Expand Down
10 changes: 5 additions & 5 deletions packages/app-web-docs/src/docs/user/languages/csharp.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -692,7 +692,7 @@ Below are visualizations of all our scope tests for this language. These were cr

#### 22. Name: Resource

<i>Name in a 'with' / 'use' / 'using' statement</i>
<i>Name in a `with` / `use` / `using` statement</i>

<ScopeVisualizer fixtureName="scopes/csharp/name/name.resource" languageId="csharp" />

Expand Down Expand Up @@ -944,7 +944,7 @@ Below are visualizations of all our scope tests for this language. These were cr

#### 22. Statement: Resource

<i>A 'with' / 'use' / 'using' statement</i>
<i>A `with` / `use` / `using` statement</i>

<ScopeVisualizer fixtureName="scopes/csharp/statement/statement.resource" languageId="csharp" />

Expand Down Expand Up @@ -1130,7 +1130,7 @@ Below are visualizations of all our scope tests for this language. These were cr

#### 15. Type: Resource

<i>Type in a 'with' / 'use' / 'using' statement</i>
<i>Type in a `with` / `use` / `using` statement</i>

<ScopeVisualizer fixtureName="scopes/csharp/type/type.resource" languageId="csharp" />

Expand Down Expand Up @@ -1308,7 +1308,7 @@ Below are visualizations of all our scope tests for this language. These were cr

#### 14. Value: Resource

<i>Value of a 'with' / 'use' / 'using' statement</i>
<i>Value of a `with` / `use` / `using` statement</i>

<ScopeVisualizer fixtureName="scopes/csharp/value/value.resource" languageId="csharp" />

Expand Down Expand Up @@ -1510,7 +1510,7 @@ The following are internal scopes. They are not intended for user interaction or

#### 13. Interior: Resource

<i>the body of a 'with' / 'use' / 'using' statement</i>
<i>the body of a `with` / `use` / `using` statement</i>

<ScopeVisualizer fixtureName="scopes/csharp/interior/interior.resource" languageId="csharp" />

Expand Down
10 changes: 5 additions & 5 deletions packages/app-web-docs/src/docs/user/languages/java.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -670,7 +670,7 @@ Below are visualizations of all our scope tests for this language. These were cr

#### 18. Name: Resource

<i>Name in a 'with' / 'use' / 'using' statement</i>
<i>Name in a `with` / `use` / `using` statement</i>

<ScopeVisualizer fixtureName="scopes/java/name/name.resource" languageId="java" />

Expand Down Expand Up @@ -902,7 +902,7 @@ Below are visualizations of all our scope tests for this language. These were cr

#### 22. Statement: Resource

<i>A 'with' / 'use' / 'using' statement</i>
<i>A `with` / `use` / `using` statement</i>

<ScopeVisualizer fixtureName="scopes/java/statement/statement.resource" languageId="java" />

Expand Down Expand Up @@ -1076,7 +1076,7 @@ Below are visualizations of all our scope tests for this language. These were cr

#### 13. Type: Resource

<i>Type in a 'with' / 'use' / 'using' statement</i>
<i>Type in a `with` / `use` / `using` statement</i>

<ScopeVisualizer fixtureName="scopes/java/type/type.resource" languageId="java" />

Expand Down Expand Up @@ -1202,7 +1202,7 @@ Below are visualizations of all our scope tests for this language. These were cr

#### 7. Value: Resource

<i>Value of a 'with' / 'use' / 'using' statement</i>
<i>Value of a `with` / `use` / `using` statement</i>

<ScopeVisualizer fixtureName="scopes/java/value/value.resource" languageId="java" />

Expand Down Expand Up @@ -1344,7 +1344,7 @@ The following are internal scopes. They are not intended for user interaction or

#### 11. Interior: Resource

<i>the body of a 'with' / 'use' / 'using' statement</i>
<i>the body of a `with` / `use` / `using` statement</i>

<ScopeVisualizer fixtureName="scopes/java/interior/interior.resource" languageId="java" />

Expand Down
14 changes: 14 additions & 0 deletions packages/app-web-docs/src/docs/user/languages/plaintext.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,20 @@ Below are visualizations of all our scope tests for this language. These were cr

<ScopeVisualizer fixtureName="scopes/plaintext/fullLine2" languageId="plaintext" />

### Glyph

#### 1. Glyph: A

<i>A single `a` glyph</i>

<ScopeVisualizer fixtureName="scopes/plaintext/glyph.a" languageId="plaintext" />

#### 2. Glyph: Dollar

<i>A single `$` glyph</i>

<ScopeVisualizer fixtureName="scopes/plaintext/glyph.dollar" languageId="plaintext" />

### Identifier

#### 1. Identifier
Expand Down
6 changes: 3 additions & 3 deletions packages/app-web-docs/src/docs/user/languages/python.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -640,7 +640,7 @@ Below are visualizations of all our scope tests for this language. These were cr

#### 16. Name: Resource

<i>Name in a 'with' / 'use' / 'using' statement</i>
<i>Name in a `with` / `use` / `using` statement</i>

<ScopeVisualizer fixtureName="scopes/python/name/name.resource" languageId="python" />

Expand Down Expand Up @@ -842,7 +842,7 @@ Below are visualizations of all our scope tests for this language. These were cr

#### 15. Statement: Resource

<i>A 'with' / 'use' / 'using' statement</i>
<i>A `with` / `use` / `using` statement</i>

<ScopeVisualizer fixtureName="scopes/python/statement/statement.resource" languageId="python" />

Expand Down Expand Up @@ -1270,7 +1270,7 @@ The following are internal scopes. They are not intended for user interaction or

#### 7. Interior: Resource

<i>the body of a 'with' / 'use' / 'using' statement</i>
<i>the body of a `with` / `use` / `using` statement</i>

<ScopeVisualizer fixtureName="scopes/python/interior/interior.resource" languageId="python" />

Expand Down
27 changes: 27 additions & 0 deletions packages/app-web-docs/src/docs/user/scopes/glyph.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
sidebar_label: Glyph
---

import { ScopeVisualizer, ScopeVisualizerOptions, ScopeVisualizerProvider } from "@site/src/docs/components/ScopeVisualizer";

# Glyph

Cursorless ID: `glyph`
Expand All @@ -17,3 +19,28 @@ Default: `glyph`
## Examples

- `"take next glyph air"` - Selects the next `a`.
- `"take every glyph dollar"` - Selects every `$`.

<ScopeVisualizerProvider>

## Scopes

<ScopeVisualizerOptions />

### Glyph: A

<i>A single `a` glyph</i>

##### Plaintext

<ScopeVisualizer fixtureName="scopes/plaintext/glyph.a" />

### Glyph: Dollar

<i>A single `$` glyph</i>

##### Plaintext

<ScopeVisualizer fixtureName="scopes/plaintext/glyph.dollar" />

</ScopeVisualizerProvider>
2 changes: 1 addition & 1 deletion packages/app-web-docs/src/docs/user/scopes/name.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -1196,7 +1196,7 @@ Default: `name`

### Name: Resource

<i>Name in a 'with' / 'use' / 'using' statement</i>
<i>Name in a `with` / `use` / `using` statement</i>

##### C#

Expand Down
2 changes: 1 addition & 1 deletion packages/app-web-docs/src/docs/user/scopes/statement.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -1198,7 +1198,7 @@ Default: `state`

### Statement: Resource

<i>A 'with' / 'use' / 'using' statement</i>
<i>A `with` / `use` / `using` statement</i>

##### C#

Expand Down
2 changes: 1 addition & 1 deletion packages/app-web-docs/src/docs/user/scopes/type.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -642,7 +642,7 @@ Default: `type`

### Type: Resource

<i>Type in a 'with' / 'use' / 'using' statement</i>
<i>Type in a `with` / `use` / `using` statement</i>

##### C#

Expand Down
2 changes: 1 addition & 1 deletion packages/app-web-docs/src/docs/user/scopes/value.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -674,7 +674,7 @@ Default: `value`

### Value: Resource

<i>Value of a 'with' / 'use' / 'using' statement</i>
<i>Value of a `with` / `use` / `using` statement</i>

##### C#

Expand Down
5 changes: 5 additions & 0 deletions packages/lib-common/src/references/scopeReferences.ts
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ interface ScopeReferenceEntry extends ReferenceEntry<ScopeReferenceGroupId> {
const DEFAULT_PATTERN = VAR_SPOKEN_FORM;

const AIR = graphemeDefaultSpokenForms.a;
const DOLLAR = graphemeDefaultSpokenForms["$"];
const PARENTHESIS = pairedDelimiterReferences.parentheses.defaultSpokenForm;
const NEXT = modifierExtraReferences.next.defaultSpokenForm;
const FIRST = modifierExtraReferences.first.defaultSpokenForm;
Expand Down Expand Up @@ -359,6 +360,10 @@ When an opening and closing delimiter use the same character and no parse-tree i
command: `${SET_SELECTION} ${NEXT} ${VAR_SPOKEN_FORM} ${AIR}`,
description: `Selects the next \`a\`.`,
},
{
command: `${SET_SELECTION} ${EVERY} ${VAR_SPOKEN_FORM} ${DOLLAR}`,
description: `Selects every \`$\`.`,
},
],
},

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -98,15 +98,25 @@ export const plaintextScopeSupportFacetInfos: Record<
},
"collectionItem.textual": {
description: "A text based collection item",
scopeType: {
type: "collectionItem",
},
scopeType: "collectionItem",
},
"collectionItem.textual.iteration": {
description: "Iteration scope for text based collection items",
scopeType: "collectionItem",
isIteration: true,
},
"glyph.a": {
description: "A single `a` glyph",
scopeType: {
type: "collectionItem",
type: "glyph",
character: "a",
},
},
"glyph.dollar": {
description: "A single `$` glyph",
scopeType: {
type: "glyph",
character: "$",
},
isIteration: true,
},
};
Original file line number Diff line number Diff line change
Expand Up @@ -244,7 +244,7 @@ export const scopeSupportFacetInfos: Record<
scopeType: "statement",
},
"statement.resource": {
description: "A 'with' / 'use' / 'using' statement",
description: "A `with` / `use` / `using` statement",
scopeType: "statement",
},
"statement.command": {
Expand Down Expand Up @@ -808,7 +808,7 @@ export const scopeSupportFacetInfos: Record<
"name.iteration.enum": enumIter("name", "names"),
"name.iteration.document": documentIter("name", "names"),
"name.resource": {
description: "Name in a 'with' / 'use' / 'using' statement",
description: "Name in a `with` / `use` / `using` statement",
scopeType: "name",
},
"name.argument.actual": {
Expand Down Expand Up @@ -958,7 +958,7 @@ export const scopeSupportFacetInfos: Record<
"value.iteration.enum": enumIter("value", "values"),
"value.iteration.document": documentIter("value", "values"),
"value.resource": {
description: "Value of a 'with' / 'use' / 'using' statement",
description: "Value of a `with` / `use` / `using` statement",
scopeType: "value",
},
"value.argument.actual": {
Expand Down Expand Up @@ -1119,7 +1119,7 @@ export const scopeSupportFacetInfos: Record<
"the type argument list",
),
"type.resource": {
description: "Type in a 'with' / 'use' / 'using' statement",
description: "Type in a `with` / `use` / `using` statement",
scopeType: "type",
},
"type.iteration.block": blockIter("type", "types"),
Expand Down Expand Up @@ -1200,7 +1200,7 @@ export const scopeSupportFacetInfos: Record<
scopeType: { type: "interior" },
},
"interior.resource": {
description: "the body of a 'with' / 'use' / 'using' statement",
description: "the body of a `with` / `use` / `using` statement",
scopeType: { type: "interior" },
},
"interior.namespace": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -368,7 +368,9 @@ export type PlaintextScopeSupportFacet =
| "surroundingPair.iteration"
| "interior.surroundingPair"
| "collectionItem.textual"
| "collectionItem.textual.iteration";
| "collectionItem.textual.iteration"
| "glyph.a"
| "glyph.dollar";

export type LanguageScopeSupportFacetMap = Partial<
Record<ScopeSupportFacet, ScopeSupportFacetLevel>
Expand Down
15 changes: 10 additions & 5 deletions resources/fixtures/scope-support-facet-infos.md
Original file line number Diff line number Diff line change
Expand Up @@ -173,6 +173,11 @@
- `functionCallee.generic` The function being called in a function call with generic type arguments
- `functionCallee.method` The function being called in a method call, including parent objects.

### glyph

- `glyph.a` A single `a` glyph
- `glyph.dollar` A single `$` glyph

### identifier

- `identifier` A single alphanumeric identifier in the document
Expand All @@ -198,7 +203,7 @@
- `interior.lambda` The block body of a lambda/anonymous function
- `interior.method` The body of a method declaration
- `interior.namespace` the body of a namespace statement
- `interior.resource` the body of a 'with' / 'use' / 'using' statement
- `interior.resource` the body of a `with` / `use` / `using` statement
- `interior.static` the body of a static statement

### surroundingPairInterior
Expand Down Expand Up @@ -265,7 +270,7 @@
- `name.method` Name of a class method
- `name.method.interface` Name of a interface method
- `name.namespace` Name of a namespace
- `name.resource` Name in a 'with' / 'use' / 'using' statement
- `name.resource` Name in a `with` / `use` / `using` statement
- `name.typeAlias` Name of a type alias
- `name.variable.destructuring` Name (LHS) of a variable declaration with pattern destructuring
- `name.variable.initialized` Name (LHS) of an initialized variable declaration
Expand Down Expand Up @@ -380,7 +385,7 @@
- `statement.misc` A miscellaneous statement
- `statement.namespace` A namespace declaration
- `statement.package` A package declaration
- `statement.resource` A 'with' / 'use' / 'using' statement
- `statement.resource` A `with` / `use` / `using` statement
- `statement.return` A return statement
- `statement.static` A static statement
- `statement.switch` A switch statement
Expand Down Expand Up @@ -456,7 +461,7 @@
- `type.iteration.class` Iteration scope for types: class bodies.
- `type.iteration.document` Iteration scope for types: the entire document including leading and trailing empty lines.
- `type.iteration.interface` Iteration scope for types: interface bodies.
- `type.resource` Type in a 'with' / 'use' / 'using' statement
- `type.resource` Type in a `with` / `use` / `using` statement
- `type.return` Type of a return value in a function declaration
- `type.return.lambda` Type of a return value in a lambda declaration
- `type.return.method` Type of a return value in a method declaration
Expand Down Expand Up @@ -501,7 +506,7 @@
- `value.iteration.enum` Iteration scope for values: enum bodies.
- `value.mapPair` Value (RHS) of a key-value pair in a map
- `value.mapPair.iteration` Iteration scope for values of key-value pairs in a map: should be between the braces.
- `value.resource` Value of a 'with' / 'use' / 'using' statement
- `value.resource` Value of a `with` / `use` / `using` statement
- `value.return` Return value of a function
- `value.return.lambda` Implicit return value from a lambda
- `value.switch` The value / subject of a switch statement
Expand Down
Loading
Loading