Skip to content

completion: dont complete function call for doctest name - #2580

Merged
techatrix merged 1 commit into
zigtools:masterfrom
dotcarmen:dotcarmen/doctest-dont-complete-fn-call
Jan 25, 2026
Merged

techatrix merged 1 commit into
zigtools:masterfrom
dotcarmen:dotcarmen/doctest-dont-complete-fn-call

Conversation

@dotcarmen

Copy link
Copy Markdown
Contributor

this has been bothering me...

when typing the name of a function for a doctest, the current behavior appends call syntax ((...)) for the doctest. for example:

fn foo() void {}
test f<complete>

the current behavior results in:

test foo()

but the behavior should be:

test foo

Comment thread src/features/completions.zig Resolved
@dotcarmen
dotcarmen marked this pull request as draft January 21, 2026 20:58
@dotcarmen
dotcarmen force-pushed the dotcarmen/doctest-dont-complete-fn-call branch 2 times, most recently from 7f9bd50 to 5f64cc4 Compare January 21, 2026 22:16
@dotcarmen
dotcarmen marked this pull request as ready for review January 21, 2026 22:32
@dotcarmen
dotcarmen force-pushed the dotcarmen/doctest-dont-complete-fn-call branch from 5f64cc4 to 88c37fe Compare January 21, 2026 23:31
@dotcarmen dotcarmen changed the title feat(completion): dont complete function call for doctest name fix(completion): dont complete function call for doctest name Jan 21, 2026
@dotcarmen dotcarmen changed the title fix(completion): dont complete function call for doctest name completion: dont complete function call for doctest name Jan 21, 2026
@dotcarmen
dotcarmen force-pushed the dotcarmen/doctest-dont-complete-fn-call branch 2 times, most recently from 47c3634 to a3c3507 Compare January 23, 2026 14:59

@techatrix techatrix left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Hover on a doctest no longer works:

test "doctest" {
    try testHover(
        \\fn foo() void {}
        \\test <cursor>foo {}
    ,
        \\```zig
        \\fn foo() void
        \\```
        \\```zig
        \\(fn () void)
        \\```
    );
}
``

Comment thread src/features/completions.zig Resolved
Comment thread src/features/completions.zig Resolved
@dotcarmen
dotcarmen force-pushed the dotcarmen/doctest-dont-complete-fn-call branch from a3c3507 to ee316c8 Compare January 25, 2026 13:25
@dotcarmen
dotcarmen force-pushed the dotcarmen/doctest-dont-complete-fn-call branch from ee316c8 to 7b16ae1 Compare January 25, 2026 13:30
@dotcarmen
dotcarmen requested a review from techatrix January 25, 2026 13:30
@techatrix
techatrix merged commit 3bed1cc into zigtools:master Jan 25, 2026
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants