zls icon indicating copy to clipboard operation
zls copied to clipboard

completion label sorting should unescape identifiers

Open techatrix opened this issue 1 month ago • 1 comments

Zig Version

0.17.0

ZLS Version

0.18.0-dev.29+8de40aa3

Client / Code Editor / Extensions

VSCodium (1.140.0)

Steps to Reproduce and Observed Behavior

const E = enum {
    a,
    @"b ",
    c,
};

test {
    E.<ask completion here>
}

The results are ordered like this:

  • @"b "
  • a
  • c

Expected Behavior

The expected order is this however:

  • a
  • @"b "
  • c

An escaped identifier should be ordered by the inner content b instead.

Attach ZLS log output

No response

techatrix avatar Nov 04 '26 21:11 techatrix

Related issue on whether completions should be sorted by name in the first place: #1792

techatrix avatar Nov 04 '26 21:11 techatrix