From 3cdf5c4b9c0c5997b7c847c88cd62c3e827d7183 Mon Sep 17 00:00:00 2001 From: Andreas Arvidsson Date: Fri, 29 Aug 2025 19:16:28 +0200 Subject: [PATCH 1/7] Added language support for (java) properties --- .../scopes/java-properties/index.json | 3 + .../scopes/properties/comment.line.scope | 10 + .../properties/key.mapPair.iteration.scope | 12 + .../scopes/properties/key.mapPair.scope | 13 + .../scopes/properties/key.mapPair2.scope | 13 + .../properties/name.iteration.document.scope | 12 + .../scopes/properties/name.variable.scope | 13 + .../scopes/properties/name.variable2.scope | 13 + .../statement.iteration.document.scope | 12 + .../properties/statement.variable.scope | 10 + .../textFragment.comment.line.scope | 10 + .../properties/value.iteration.document.scope | 12 + .../properties/value.mapPair.iteration.scope | 12 + .../scopes/properties/value.mapPair.scope | 13 + .../scopes/properties/value.variable.scope | 13 + .../scopes/properties/value.variable2.scope | 13 + .../scopes/properties/value.variable3.scope | 13 + .../languageScopeSupport.ts | 3 + .../src/scopeSupportFacets/properties.ts | 331 ++++++++++++++++++ queries/java-properties.scm | 3 + queries/properties.scm | 9 + 21 files changed, 543 insertions(+) create mode 100644 data/fixtures/scopes/java-properties/index.json create mode 100644 data/fixtures/scopes/properties/comment.line.scope create mode 100644 data/fixtures/scopes/properties/key.mapPair.iteration.scope create mode 100644 data/fixtures/scopes/properties/key.mapPair.scope create mode 100644 data/fixtures/scopes/properties/key.mapPair2.scope create mode 100644 data/fixtures/scopes/properties/name.iteration.document.scope create mode 100644 data/fixtures/scopes/properties/name.variable.scope create mode 100644 data/fixtures/scopes/properties/name.variable2.scope create mode 100644 data/fixtures/scopes/properties/statement.iteration.document.scope create mode 100644 data/fixtures/scopes/properties/statement.variable.scope create mode 100644 data/fixtures/scopes/properties/textFragment.comment.line.scope create mode 100644 data/fixtures/scopes/properties/value.iteration.document.scope create mode 100644 data/fixtures/scopes/properties/value.mapPair.iteration.scope create mode 100644 data/fixtures/scopes/properties/value.mapPair.scope create mode 100644 data/fixtures/scopes/properties/value.variable.scope create mode 100644 data/fixtures/scopes/properties/value.variable2.scope create mode 100644 data/fixtures/scopes/properties/value.variable3.scope create mode 100644 packages/common/src/scopeSupportFacets/properties.ts create mode 100644 queries/java-properties.scm create mode 100644 queries/properties.scm diff --git a/data/fixtures/scopes/java-properties/index.json b/data/fixtures/scopes/java-properties/index.json new file mode 100644 index 0000000000..ff5508f47e --- /dev/null +++ b/data/fixtures/scopes/java-properties/index.json @@ -0,0 +1,3 @@ +{ + "imports": ["properties"] +} diff --git a/data/fixtures/scopes/properties/comment.line.scope b/data/fixtures/scopes/properties/comment.line.scope new file mode 100644 index 0000000000..42719cdbb8 --- /dev/null +++ b/data/fixtures/scopes/properties/comment.line.scope @@ -0,0 +1,10 @@ +# Hello world +--- + +[Content] = +[Removal] = +[Domain] = 0:0-0:13 + >-------------< +0| # Hello world + +[Insertion delimiter] = "\n" diff --git a/data/fixtures/scopes/properties/key.mapPair.iteration.scope b/data/fixtures/scopes/properties/key.mapPair.iteration.scope new file mode 100644 index 0000000000..379107f231 --- /dev/null +++ b/data/fixtures/scopes/properties/key.mapPair.iteration.scope @@ -0,0 +1,12 @@ + +foo=bar + +--- + +[Content] = +[Domain] = 0:0-2:0 + > +0| +1| foo=bar +2| + < diff --git a/data/fixtures/scopes/properties/key.mapPair.scope b/data/fixtures/scopes/properties/key.mapPair.scope new file mode 100644 index 0000000000..193ff7b458 --- /dev/null +++ b/data/fixtures/scopes/properties/key.mapPair.scope @@ -0,0 +1,13 @@ +foo=bar +--- + +[Content] = +[Removal] = 0:0-0:3 + >---< +0| foo=bar + +[Domain] = 0:0-0:7 + >-------< +0| foo=bar + +[Insertion delimiter] = " " diff --git a/data/fixtures/scopes/properties/key.mapPair2.scope b/data/fixtures/scopes/properties/key.mapPair2.scope new file mode 100644 index 0000000000..7761824c9b --- /dev/null +++ b/data/fixtures/scopes/properties/key.mapPair2.scope @@ -0,0 +1,13 @@ +foo.bar=baz +--- + +[Content] = +[Removal] = 0:0-0:7 + >-------< +0| foo.bar=baz + +[Domain] = 0:0-0:11 + >-----------< +0| foo.bar=baz + +[Insertion delimiter] = " " diff --git a/data/fixtures/scopes/properties/name.iteration.document.scope b/data/fixtures/scopes/properties/name.iteration.document.scope new file mode 100644 index 0000000000..379107f231 --- /dev/null +++ b/data/fixtures/scopes/properties/name.iteration.document.scope @@ -0,0 +1,12 @@ + +foo=bar + +--- + +[Content] = +[Domain] = 0:0-2:0 + > +0| +1| foo=bar +2| + < diff --git a/data/fixtures/scopes/properties/name.variable.scope b/data/fixtures/scopes/properties/name.variable.scope new file mode 100644 index 0000000000..193ff7b458 --- /dev/null +++ b/data/fixtures/scopes/properties/name.variable.scope @@ -0,0 +1,13 @@ +foo=bar +--- + +[Content] = +[Removal] = 0:0-0:3 + >---< +0| foo=bar + +[Domain] = 0:0-0:7 + >-------< +0| foo=bar + +[Insertion delimiter] = " " diff --git a/data/fixtures/scopes/properties/name.variable2.scope b/data/fixtures/scopes/properties/name.variable2.scope new file mode 100644 index 0000000000..7761824c9b --- /dev/null +++ b/data/fixtures/scopes/properties/name.variable2.scope @@ -0,0 +1,13 @@ +foo.bar=baz +--- + +[Content] = +[Removal] = 0:0-0:7 + >-------< +0| foo.bar=baz + +[Domain] = 0:0-0:11 + >-----------< +0| foo.bar=baz + +[Insertion delimiter] = " " diff --git a/data/fixtures/scopes/properties/statement.iteration.document.scope b/data/fixtures/scopes/properties/statement.iteration.document.scope new file mode 100644 index 0000000000..379107f231 --- /dev/null +++ b/data/fixtures/scopes/properties/statement.iteration.document.scope @@ -0,0 +1,12 @@ + +foo=bar + +--- + +[Content] = +[Domain] = 0:0-2:0 + > +0| +1| foo=bar +2| + < diff --git a/data/fixtures/scopes/properties/statement.variable.scope b/data/fixtures/scopes/properties/statement.variable.scope new file mode 100644 index 0000000000..e3a44a1c0e --- /dev/null +++ b/data/fixtures/scopes/properties/statement.variable.scope @@ -0,0 +1,10 @@ +foo=bar +--- + +[Content] = +[Removal] = +[Domain] = 0:0-0:7 + >-------< +0| foo=bar + +[Insertion delimiter] = "\n" diff --git a/data/fixtures/scopes/properties/textFragment.comment.line.scope b/data/fixtures/scopes/properties/textFragment.comment.line.scope new file mode 100644 index 0000000000..2c362ef415 --- /dev/null +++ b/data/fixtures/scopes/properties/textFragment.comment.line.scope @@ -0,0 +1,10 @@ +# Hello world +--- + +[Content] = +[Removal] = +[Domain] = 0:0-0:13 + >-------------< +0| # Hello world + +[Insertion delimiter] = " " diff --git a/data/fixtures/scopes/properties/value.iteration.document.scope b/data/fixtures/scopes/properties/value.iteration.document.scope new file mode 100644 index 0000000000..379107f231 --- /dev/null +++ b/data/fixtures/scopes/properties/value.iteration.document.scope @@ -0,0 +1,12 @@ + +foo=bar + +--- + +[Content] = +[Domain] = 0:0-2:0 + > +0| +1| foo=bar +2| + < diff --git a/data/fixtures/scopes/properties/value.mapPair.iteration.scope b/data/fixtures/scopes/properties/value.mapPair.iteration.scope new file mode 100644 index 0000000000..379107f231 --- /dev/null +++ b/data/fixtures/scopes/properties/value.mapPair.iteration.scope @@ -0,0 +1,12 @@ + +foo=bar + +--- + +[Content] = +[Domain] = 0:0-2:0 + > +0| +1| foo=bar +2| + < diff --git a/data/fixtures/scopes/properties/value.mapPair.scope b/data/fixtures/scopes/properties/value.mapPair.scope new file mode 100644 index 0000000000..39ca35fcc4 --- /dev/null +++ b/data/fixtures/scopes/properties/value.mapPair.scope @@ -0,0 +1,13 @@ +foo=bar +--- + +[Content] = +[Removal] = 0:4-0:7 + >---< +0| foo=bar + +[Domain] = 0:0-0:7 + >-------< +0| foo=bar + +[Insertion delimiter] = " " diff --git a/data/fixtures/scopes/properties/value.variable.scope b/data/fixtures/scopes/properties/value.variable.scope new file mode 100644 index 0000000000..39ca35fcc4 --- /dev/null +++ b/data/fixtures/scopes/properties/value.variable.scope @@ -0,0 +1,13 @@ +foo=bar +--- + +[Content] = +[Removal] = 0:4-0:7 + >---< +0| foo=bar + +[Domain] = 0:0-0:7 + >-------< +0| foo=bar + +[Insertion delimiter] = " " diff --git a/data/fixtures/scopes/properties/value.variable2.scope b/data/fixtures/scopes/properties/value.variable2.scope new file mode 100644 index 0000000000..adcaa3065b --- /dev/null +++ b/data/fixtures/scopes/properties/value.variable2.scope @@ -0,0 +1,13 @@ +foo=123 +--- + +[Content] = +[Removal] = 0:4-0:7 + >---< +0| foo=123 + +[Domain] = 0:0-0:7 + >-------< +0| foo=123 + +[Insertion delimiter] = " " diff --git a/data/fixtures/scopes/properties/value.variable3.scope b/data/fixtures/scopes/properties/value.variable3.scope new file mode 100644 index 0000000000..4e567ad7dd --- /dev/null +++ b/data/fixtures/scopes/properties/value.variable3.scope @@ -0,0 +1,13 @@ +foo=${bar} +--- + +[Content] = +[Removal] = 0:4-0:10 + >------< +0| foo=${bar} + +[Domain] = 0:0-0:10 + >----------< +0| foo=${bar} + +[Insertion delimiter] = " " diff --git a/packages/common/src/scopeSupportFacets/languageScopeSupport.ts b/packages/common/src/scopeSupportFacets/languageScopeSupport.ts index ea98a324c7..a013bc2e1b 100644 --- a/packages/common/src/scopeSupportFacets/languageScopeSupport.ts +++ b/packages/common/src/scopeSupportFacets/languageScopeSupport.ts @@ -17,6 +17,7 @@ import { latexScopeSupport } from "./latex"; import { luaScopeSupport } from "./lua"; import { markdownScopeSupport } from "./markdown"; import { phpScopeSupport } from "./php"; +import { propertiesScopeSupport } from "./properties"; import { pythonScopeSupport } from "./python"; import { rScopeSupport } from "./r"; import { rubyScopeSupport } from "./ruby"; @@ -51,6 +52,8 @@ export const languageScopeSupport: StringRecord = lua: luaScopeSupport, markdown: markdownScopeSupport, php: phpScopeSupport, + properties: propertiesScopeSupport, + "java-properties": propertiesScopeSupport, python: pythonScopeSupport, r: rScopeSupport, ruby: rubyScopeSupport, diff --git a/packages/common/src/scopeSupportFacets/properties.ts b/packages/common/src/scopeSupportFacets/properties.ts new file mode 100644 index 0000000000..d957a72128 --- /dev/null +++ b/packages/common/src/scopeSupportFacets/properties.ts @@ -0,0 +1,331 @@ +import type { LanguageScopeSupportFacetMap } from "./scopeSupportFacets.types"; +import { ScopeSupportFacetLevel } from "./scopeSupportFacets.types"; + +const { supported, unsupported, notApplicable } = ScopeSupportFacetLevel; + +export const propertiesScopeSupport: LanguageScopeSupportFacetMap = { + "statement.variable": supported, + "statement.iteration.document": supported, + + "key.mapPair.iteration": supported, + "key.mapPair": supported, + "name.iteration.document": supported, + "name.variable": supported, + + "value.iteration.document": supported, + "value.mapPair.iteration": supported, + "value.mapPair": supported, + "value.variable": supported, + + "comment.line": supported, + "textFragment.comment.line": supported, + + /* NOT APPLICABLE */ + + // Class + class: notApplicable, + "class.iteration.block": notApplicable, + "class.iteration.document": notApplicable, + "name.class": notApplicable, + "name.field.class": notApplicable, + "name.iteration.class": notApplicable, + "statement.class": notApplicable, + "statement.field.class": notApplicable, + "statement.iteration.class": notApplicable, + "type.class": notApplicable, + "type.field.class": notApplicable, + "type.iteration.class": notApplicable, + "value.field.class": notApplicable, + "value.iteration.class": notApplicable, + "interior.class": notApplicable, + + // Constructor + "statement.constructor": notApplicable, + "namedFunction.constructor": notApplicable, + "functionCall.constructor": notApplicable, + "functionCallee.constructor": notApplicable, + "argument.actual.constructor.singleLine": notApplicable, + "argument.actual.constructor.multiLine": notApplicable, + "argument.actual.constructor.iteration": notApplicable, + "argument.formal.constructor.singleLine": notApplicable, + "argument.formal.constructor.multiLine": notApplicable, + "argument.formal.constructor.iteration": notApplicable, + "argumentList.actual.constructor.empty": notApplicable, + "argumentList.actual.constructor.singleLine": notApplicable, + "argumentList.actual.constructor.multiLine": notApplicable, + "argumentList.formal.constructor.empty": notApplicable, + "argumentList.formal.constructor.singleLine": notApplicable, + "argumentList.formal.constructor.multiLine": notApplicable, + "interior.constructor": notApplicable, + "name.argument.formal.constructor": notApplicable, + "name.argument.formal.constructor.iteration": notApplicable, + "name.constructor": notApplicable, + "type.argument.formal.constructor": notApplicable, + "type.argument.formal.constructor.iteration": notApplicable, + "value.argument.formal.constructor": notApplicable, + "value.argument.formal.constructor.iteration": notApplicable, + + // Method + "statement.method": notApplicable, + "namedFunction.method": notApplicable, + "argument.actual.method.singleLine": notApplicable, + "argument.actual.method.multiLine": notApplicable, + "argument.actual.method.iteration": notApplicable, + "argument.formal.method.singleLine": notApplicable, + "argument.formal.method.multiLine": notApplicable, + "argument.formal.method.iteration": notApplicable, + "argumentList.actual.method.multiLine": notApplicable, + "argumentList.formal.method.empty": notApplicable, + "argumentList.formal.method.singleLine": notApplicable, + "argumentList.formal.method.multiLine": notApplicable, + "interior.method": notApplicable, + "name.argument.formal.method": notApplicable, + "name.argument.formal.method.iteration": notApplicable, + "name.method": notApplicable, + "type.argument.formal.method": notApplicable, + "type.argument.formal.method.iteration": notApplicable, + "value.argument.formal.method": notApplicable, + "value.argument.formal.method.iteration": notApplicable, + "functionCall.method": notApplicable, + "functionCallee.method": notApplicable, + + // Function + namedFunction: notApplicable, + "namedFunction.iteration.document": notApplicable, + "namedFunction.iteration.class": notApplicable, + "statement.function": notApplicable, + "name.function": notApplicable, + "interior.function": notApplicable, + "argument.actual.iteration": notApplicable, + "argument.actual.singleLine": notApplicable, + "argument.actual.multiLine": notApplicable, + "argumentList.actual.empty": notApplicable, + "argumentList.actual.singleLine": notApplicable, + "argumentList.actual.multiLine": notApplicable, + "argumentList.formal.empty": notApplicable, + "argumentList.formal.singleLine": notApplicable, + "argumentList.formal.multiLine": notApplicable, + "argument.formal.singleLine": notApplicable, + "argument.formal.multiLine": notApplicable, + "argument.formal.iteration": notApplicable, + "name.argument.formal": notApplicable, + "name.argument.formal.iteration": notApplicable, + "type.argument.formal": notApplicable, + "type.argument.formal.iteration": notApplicable, + "value.argument.formal": notApplicable, + "value.argument.formal.iteration": notApplicable, + functionCall: notApplicable, + functionCallee: notApplicable, + "functionCall.chain": notApplicable, + "functionCallee.chain": notApplicable, + + // Anonymous function / lambda + anonymousFunction: notApplicable, + "argumentList.formal.lambda.empty": notApplicable, + "argumentList.formal.lambda.singleLine": notApplicable, + "argumentList.formal.lambda.multiLine": notApplicable, + "argument.formal.lambda.singleLine": notApplicable, + "argument.formal.lambda.multiLine": notApplicable, + "argument.formal.lambda.iteration": notApplicable, + "value.return.lambda": notApplicable, + "interior.lambda": notApplicable, + + // Keyword argument + "name.argument.actual": notApplicable, + "name.argument.actual.iteration": notApplicable, + "value.argument.actual": notApplicable, + "value.argument.actual.iteration": notApplicable, + + // Return statement + "statement.return": notApplicable, + "type.return": notApplicable, + "value.return": notApplicable, + + // Yield statement + "statement.yield": notApplicable, + "value.yield": notApplicable, + + // Interface + "statement.interface": notApplicable, + "statement.field.interface": notApplicable, + "statement.iteration.interface": notApplicable, + "interior.interface": notApplicable, + "name.interface": notApplicable, + "name.field.interface": notApplicable, + "name.iteration.interface": notApplicable, + "type.interface": notApplicable, + "type.field.interface": notApplicable, + "type.iteration.interface": notApplicable, + + // Enum + "statement.enum": notApplicable, + "name.enum": notApplicable, + "name.field.enum": notApplicable, + "name.iteration.enum": notApplicable, + "value.field.enum": notApplicable, + "value.iteration.enum": notApplicable, + "type.enum": notApplicable, + "interior.enum": notApplicable, + + // Try catch + "statement.try": notApplicable, + "branch.try": notApplicable, + "branch.try.iteration": notApplicable, + "interior.try": notApplicable, + "argument.catch": notApplicable, + "name.argument.catch": notApplicable, + "type.argument.catch": notApplicable, + + // If statement + ifStatement: notApplicable, + "statement.if": notApplicable, + "branch.if": notApplicable, + "branch.if.elif.else": notApplicable, + "branch.if.else": notApplicable, + "branch.if.iteration": notApplicable, + "condition.if": notApplicable, + "interior.if": notApplicable, + + // Switch statement + "statement.switch": notApplicable, + "branch.switchCase": notApplicable, + "branch.switchCase.iteration": notApplicable, + "condition.switchCase": notApplicable, + "condition.switchCase.iteration": notApplicable, + "interior.switch": notApplicable, + "interior.switchCase": notApplicable, + "value.switch": notApplicable, + + // Loop + "branch.loop": notApplicable, + "branch.loop.iteration": notApplicable, + + // For loop + "statement.for": notApplicable, + "condition.for": notApplicable, + "interior.for": notApplicable, + + // For-each loop + "statement.foreach": notApplicable, + "interior.foreach": notApplicable, + "name.foreach": notApplicable, + "type.foreach": notApplicable, + "value.foreach": notApplicable, + + // While loop + "statement.while": notApplicable, + "condition.while": notApplicable, + "interior.while": notApplicable, + + // Do-while loop + "statement.doWhile": notApplicable, + "condition.doWhile": notApplicable, + "interior.doWhile": notApplicable, + + // Resource statement + "statement.resource": notApplicable, + "interior.resource": notApplicable, + "name.resource": notApplicable, + "name.resource.iteration": notApplicable, + "type.resource": notApplicable, + "type.resource.iteration": notApplicable, + "value.resource": notApplicable, + "value.resource.iteration": notApplicable, + + // Pattern destruction + "name.assignment.pattern": notApplicable, + "name.variable.pattern": notApplicable, + "value.variable.pattern": notApplicable, + + // String + "string.singleLine": notApplicable, + "string.multiLine": notApplicable, + "textFragment.string.singleLine": notApplicable, + "textFragment.string.multiLine": notApplicable, + + // Block comment + "comment.block": notApplicable, + "textFragment.comment.block": notApplicable, + + // Static + "statement.static": notApplicable, + "interior.static": notApplicable, + + // Namespace + "statement.namespace": notApplicable, + "interior.namespace": notApplicable, + "name.namespace": notApplicable, + + // Ternary + "branch.ternary": notApplicable, + "branch.ternary.iteration": notApplicable, + "condition.ternary": notApplicable, + + // Section + section: notApplicable, + "section.iteration.document": notApplicable, + "section.iteration.parent": notApplicable, + + // Element + element: notApplicable, + "interior.element": notApplicable, + "textFragment.element": notApplicable, + tags: notApplicable, + startTag: notApplicable, + endTag: notApplicable, + + // Attribute + attribute: notApplicable, + "key.attribute": notApplicable, + "value.attribute": notApplicable, + + // Notebook cell + notebookCell: notApplicable, + "interior.cell": notApplicable, + + // Type alias + "type.alias": notApplicable, + "value.typeAlias": notApplicable, + + // Collection item + "collectionItem.unenclosed.singleLine": notApplicable, + "collectionItem.unenclosed.multiLine": notApplicable, + "collectionItem.unenclosed.iteration": notApplicable, + + // Command + command: notApplicable, + "statement.command": notApplicable, + "name.command": notApplicable, + "value.command": notApplicable, + "interior.command": notApplicable, + + // Miscellaneous statements + "statement.break": notApplicable, + "statement.continue": notApplicable, + "statement.assignment": notApplicable, + "statement.iteration.block": notApplicable, + + // Assignment + "name.assignment": notApplicable, + "value.assignment": notApplicable, + + // Miscellaneous + "name.iteration.block": notApplicable, + "statement.misc": notApplicable, + "type.cast": notApplicable, + "type.iteration.block": notApplicable, + "type.iteration.document": notApplicable, + "type.typeArgument.iteration": notApplicable, + "type.typeArgument": notApplicable, + "type.variable": notApplicable, + "value.iteration.block": notApplicable, + disqualifyDelimiter: notApplicable, + environment: notApplicable, + fieldAccess: notApplicable, + list: notApplicable, + map: notApplicable, + pairDelimiter: notApplicable, + regularExpression: notApplicable, + selector: notApplicable, + unit: notApplicable, +}; diff --git a/queries/java-properties.scm b/queries/java-properties.scm new file mode 100644 index 0000000000..47c0498a6a --- /dev/null +++ b/queries/java-properties.scm @@ -0,0 +1,3 @@ +;; These files can have language id "properties" or `java-properties` + +;; import properties.scm diff --git a/queries/properties.scm b/queries/properties.scm new file mode 100644 index 0000000000..423fa24e90 --- /dev/null +++ b/queries/properties.scm @@ -0,0 +1,9 @@ +(comment) @comment @textFragment + +(property + (key) @collectionKey @name + (value) @value +) @statement @_.domain + +(file) @statement.iteration @comment.iteration +(file) @collectionKey.iteration @name.iteration @value.iteration From f81314cd6d5c550625a3a5aa6b1f3babbded531c Mon Sep 17 00:00:00 2001 From: Andreas Arvidsson Date: Fri, 29 Aug 2025 19:20:05 +0200 Subject: [PATCH 2/7] Add mdx files --- .../src/docs/user/languages/java-properties.mdx | 5 +++++ .../src/docs/user/languages/properties.mdx | 5 +++++ 2 files changed, 10 insertions(+) create mode 100644 packages/cursorless-org-docs/src/docs/user/languages/java-properties.mdx create mode 100644 packages/cursorless-org-docs/src/docs/user/languages/properties.mdx diff --git a/packages/cursorless-org-docs/src/docs/user/languages/java-properties.mdx b/packages/cursorless-org-docs/src/docs/user/languages/java-properties.mdx new file mode 100644 index 0000000000..7755242c74 --- /dev/null +++ b/packages/cursorless-org-docs/src/docs/user/languages/java-properties.mdx @@ -0,0 +1,5 @@ +import { Language } from "./components/Language"; + +# Java-properties + + diff --git a/packages/cursorless-org-docs/src/docs/user/languages/properties.mdx b/packages/cursorless-org-docs/src/docs/user/languages/properties.mdx new file mode 100644 index 0000000000..3f894dbaca --- /dev/null +++ b/packages/cursorless-org-docs/src/docs/user/languages/properties.mdx @@ -0,0 +1,5 @@ +import { Language } from "./components/Language"; + +# Properties + + From 24a47ca365d68479d67930a2b03f4a77c2445256 Mon Sep 17 00:00:00 2001 From: Andreas Arvidsson Date: Fri, 29 Aug 2025 19:21:43 +0200 Subject: [PATCH 3/7] Fix lint errors --- packages/common/src/scopeSupportFacets/languageScopeSupport.ts | 1 + packages/common/src/scopeSupportFacets/properties.ts | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/packages/common/src/scopeSupportFacets/languageScopeSupport.ts b/packages/common/src/scopeSupportFacets/languageScopeSupport.ts index a013bc2e1b..5c9407868c 100644 --- a/packages/common/src/scopeSupportFacets/languageScopeSupport.ts +++ b/packages/common/src/scopeSupportFacets/languageScopeSupport.ts @@ -53,6 +53,7 @@ export const languageScopeSupport: StringRecord = markdown: markdownScopeSupport, php: phpScopeSupport, properties: propertiesScopeSupport, + // eslint-disable-next-line @typescript-eslint/naming-convention "java-properties": propertiesScopeSupport, python: pythonScopeSupport, r: rScopeSupport, diff --git a/packages/common/src/scopeSupportFacets/properties.ts b/packages/common/src/scopeSupportFacets/properties.ts index d957a72128..2408f06458 100644 --- a/packages/common/src/scopeSupportFacets/properties.ts +++ b/packages/common/src/scopeSupportFacets/properties.ts @@ -1,7 +1,7 @@ import type { LanguageScopeSupportFacetMap } from "./scopeSupportFacets.types"; import { ScopeSupportFacetLevel } from "./scopeSupportFacets.types"; -const { supported, unsupported, notApplicable } = ScopeSupportFacetLevel; +const { supported, notApplicable } = ScopeSupportFacetLevel; export const propertiesScopeSupport: LanguageScopeSupportFacetMap = { "statement.variable": supported, From 9916dd224af88076166c9bd3ac20d3a0954b3b51 Mon Sep 17 00:00:00 2001 From: Andreas Arvidsson Date: Fri, 29 Aug 2025 19:25:17 +0200 Subject: [PATCH 4/7] Remove java-properties language page --- .../src/docs/user/languages/java-properties.mdx | 5 ----- packages/meta-updater/src/updateLanguageMdx.ts | 5 +++++ 2 files changed, 5 insertions(+), 5 deletions(-) delete mode 100644 packages/cursorless-org-docs/src/docs/user/languages/java-properties.mdx diff --git a/packages/cursorless-org-docs/src/docs/user/languages/java-properties.mdx b/packages/cursorless-org-docs/src/docs/user/languages/java-properties.mdx deleted file mode 100644 index 7755242c74..0000000000 --- a/packages/cursorless-org-docs/src/docs/user/languages/java-properties.mdx +++ /dev/null @@ -1,5 +0,0 @@ -import { Language } from "./components/Language"; - -# Java-properties - - diff --git a/packages/meta-updater/src/updateLanguageMdx.ts b/packages/meta-updater/src/updateLanguageMdx.ts index c2f7969646..ca77c86dc0 100644 --- a/packages/meta-updater/src/updateLanguageMdx.ts +++ b/packages/meta-updater/src/updateLanguageMdx.ts @@ -14,6 +14,11 @@ export function updateLanguageMdx( return actual; } + // This is just an alias for `properties` so don't need a separate page + if (languageId === "java-properties") { + return null; + } + const expected = ` import { Language } from "./components/Language"; From 53314a3db73f4cc4fa8ae624a90745176a4d71be Mon Sep 17 00:00:00 2001 From: Andreas Arvidsson Date: Fri, 29 Aug 2025 19:32:47 +0200 Subject: [PATCH 5/7] Trim trailing whitespace --- queries/java-properties.scm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/queries/java-properties.scm b/queries/java-properties.scm index 47c0498a6a..bbcff4af12 100644 --- a/queries/java-properties.scm +++ b/queries/java-properties.scm @@ -1,3 +1,3 @@ -;; These files can have language id "properties" or `java-properties` +;; These files can have language id "properties" or `java-properties` ;; import properties.scm From ebdef7e801d41858debe266772d22ac3393733b5 Mon Sep 17 00:00:00 2001 From: Andreas Arvidsson Date: Fri, 29 Aug 2025 19:38:42 +0200 Subject: [PATCH 6/7] Add missing scope facets --- packages/common/src/scopeSupportFacets/properties.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/packages/common/src/scopeSupportFacets/properties.ts b/packages/common/src/scopeSupportFacets/properties.ts index 2408f06458..3a830f6521 100644 --- a/packages/common/src/scopeSupportFacets/properties.ts +++ b/packages/common/src/scopeSupportFacets/properties.ts @@ -75,6 +75,8 @@ export const propertiesScopeSupport: LanguageScopeSupportFacetMap = { "argument.formal.method.multiLine": notApplicable, "argument.formal.method.iteration": notApplicable, "argumentList.actual.method.multiLine": notApplicable, + "argumentList.actual.method.singleLine": notApplicable, + "argumentList.actual.method.empty": notApplicable, "argumentList.formal.method.empty": notApplicable, "argumentList.formal.method.singleLine": notApplicable, "argumentList.formal.method.multiLine": notApplicable, From b36eae7fd8222bfb7f1e7b3258e1f81d71625efa Mon Sep 17 00:00:00 2001 From: Andreas Arvidsson Date: Fri, 29 Aug 2025 19:55:43 +0200 Subject: [PATCH 7/7] Remove scope support for Java properties --- data/fixtures/scopes/java-properties/index.json | 3 --- .../common/src/scopeSupportFacets/languageScopeSupport.ts | 2 -- packages/meta-updater/src/updateLanguageMdx.ts | 5 ----- 3 files changed, 10 deletions(-) delete mode 100644 data/fixtures/scopes/java-properties/index.json diff --git a/data/fixtures/scopes/java-properties/index.json b/data/fixtures/scopes/java-properties/index.json deleted file mode 100644 index ff5508f47e..0000000000 --- a/data/fixtures/scopes/java-properties/index.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "imports": ["properties"] -} diff --git a/packages/common/src/scopeSupportFacets/languageScopeSupport.ts b/packages/common/src/scopeSupportFacets/languageScopeSupport.ts index 5c9407868c..31778fa1a2 100644 --- a/packages/common/src/scopeSupportFacets/languageScopeSupport.ts +++ b/packages/common/src/scopeSupportFacets/languageScopeSupport.ts @@ -53,8 +53,6 @@ export const languageScopeSupport: StringRecord = markdown: markdownScopeSupport, php: phpScopeSupport, properties: propertiesScopeSupport, - // eslint-disable-next-line @typescript-eslint/naming-convention - "java-properties": propertiesScopeSupport, python: pythonScopeSupport, r: rScopeSupport, ruby: rubyScopeSupport, diff --git a/packages/meta-updater/src/updateLanguageMdx.ts b/packages/meta-updater/src/updateLanguageMdx.ts index ca77c86dc0..c2f7969646 100644 --- a/packages/meta-updater/src/updateLanguageMdx.ts +++ b/packages/meta-updater/src/updateLanguageMdx.ts @@ -14,11 +14,6 @@ export function updateLanguageMdx( return actual; } - // This is just an alias for `properties` so don't need a separate page - if (languageId === "java-properties") { - return null; - } - const expected = ` import { Language } from "./components/Language";