Skip to content
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
3cb55ab
Add first zig scope facet
Antman261 Nov 27, 2025
0abea27
Update queries/zig.scm
Antman261 Nov 27, 2025
c2fe2de
Update packages/common/src/scopeSupportFacets/zig.ts
Antman261 Nov 27, 2025
d56874b
Update packages/common/src/scopeSupportFacets/zig.ts
Antman261 Nov 27, 2025
bef3efe
Merge branch 'main' into main
Antman261 Nov 27, 2025
1f32c82
Apply suggestion from @AndreasArvidsson
Antman261 Nov 27, 2025
94a9433
add more scopes and scope tests
Antman261 Nov 27, 2025
8eb1fe7
Merge branch 'main' into main
Antman261 Nov 28, 2025
957ca92
wip: improving zig scm
Antman261 Nov 28, 2025
05929f9
Merge branch 'main' of https://github.com/Antman261/cursorless
Antman261 Nov 28, 2025
15b273c
wip: improve Zig scm
Antman261 Nov 28, 2025
1c060d3
Improve scm examples
Antman261 Dec 1, 2025
69cd67b
Update arg list test
Antman261 Dec 1, 2025
e03a4f6
wip: add more scope tests
Antman261 Dec 1, 2025
f35dd75
wip: improving argument iteration and domain
Antman261 Dec 22, 2025
35d1442
wip: function declaration argument iteration working
Antman261 Dec 22, 2025
07aed70
wip: fix variable declaration type removal of leading ":"
Antman261 Dec 22, 2025
f7dfc6f
Merge branch 'main' into main
Antman261 Dec 22, 2025
3137256
Remove unsupported arg iteration scopes
Antman261 Dec 22, 2025
55e6843
Merge branch 'main' of https://github.com/Antman261/cursorless
Antman261 Dec 22, 2025
fa4bbcd
Remove unsupported scope files
Antman261 Dec 22, 2025
86f322e
Add zig language page to docs
Antman261 Dec 22, 2025
4d093f3
Fix bug with argument actual
Antman261 Dec 22, 2025
80b9512
Merge branch 'main' into main
AndreasArvidsson Dec 23, 2025
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
10 changes: 10 additions & 0 deletions data/fixtures/scopes/zig/namedFunction.scope
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
fn someFunk() void {}
---

[Content] =
[Removal] =
[Domain] = 0:0-0:21
>---------------------<
0| fn someFunk() void {}

[Insertion delimiter] = "\n\n"
3 changes: 3 additions & 0 deletions data/playground/zig.zig
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
const bob = "bobert";

fn myFunk() void {}
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ import { typescriptScopeSupport } from "./typescript";
import { typescriptreactScopeSupport } from "./typescriptreact";
import { xmlScopeSupport } from "./xml";
import { yamlScopeSupport } from "./yaml";
import { zigScopeSupport } from "./zig";

/* eslint-disable @typescript-eslint/naming-convention */

Expand Down Expand Up @@ -69,4 +70,5 @@ export const languageScopeSupport: StringRecord<LanguageScopeSupportFacetMap> =
typescriptreact: typescriptreactScopeSupport,
xml: xmlScopeSupport,
yaml: yamlScopeSupport,
zig: zigScopeSupport,
};
30 changes: 30 additions & 0 deletions packages/common/src/scopeSupportFacets/zig.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
import type { LanguageScopeSupportFacetMap } from "./scopeSupportFacets.types";
import { ScopeSupportFacetLevel } from "./scopeSupportFacets.types";

const { supported, notApplicable, unsupported } = ScopeSupportFacetLevel;

export const zigScopeSupport: LanguageScopeSupportFacetMap = {
namedFunction: supported,
list: unsupported,

"textFragment.string.singleLine": unsupported,
"textFragment.string.multiLine": unsupported,
"textFragment.comment.line": unsupported,
"textFragment.comment.block": unsupported,

// SectionIf I Take Under
section: notApplicable,
"section.iteration.document": notApplicable,
"section.iteration.parent": notApplicable,

// Command
command: notApplicable,
"statement.command": notApplicable,
"name.command": notApplicable,
"value.command": notApplicable,
"interior.command": notApplicable,

// Notebook cell
notebookCell: notApplicable,
"interior.cell": notApplicable,
};
14 changes: 14 additions & 0 deletions queries/zig.scm
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
;;!! (fn foo() void {})
(function_declaration
"fn"
name: (identifier)
(parameters
"("
")"
)
type: (_)
body: (block
"{"
"}"
)
) @namedFunction