Skip to content

zls is running successfully but autocomplete (ctrl+space) doesn't show anything useful on VSCode/Mac #586

@timfayz

Description

@timfayz

Hi everyone!

I'm trying to setup my first Zig experience with zls + vscode. Everything seems to be working...namely, on hovering elements I get good suggestions. For example:

image

image

However, when I'm trying to get autocomplete (say, by pressing Ctrl+Space), I get the following:

image

Output from the extension on startup:

Attempting to use zls @ /Users/timfayz/zls/zls
[Info  - 7:15:52 PM] [info-main] Using zig executable /opt/homebrew/bin/zig
[Info  - 7:15:52 PM] [info-main] Using zig lib path '/opt/homebrew/Cellar/zig/0.9.1_1/lib/zig'
[Info  - 7:15:52 PM] [info-main] zls initialized
[Info  - 7:15:52 PM] [info-main] ClientCapabilities{ .supports_snippets = true, .supports_semantic_tokens = true, .hover_supports_md = true, .completion_doc_supports_md = true }
[Info  - 7:15:52 PM] [info-main] Using offset encoding: utf16

Environment:

(VSCode)
Version: 1.70.2 (Universal)
Commit: e4503b30fc78200f846c62cf8091b76ff5547662
Date: 2022-08-16T05:36:37.829Z (3 days ago)
Electron: 18.3.5
Chromium: 100.0.4896.160
Node.js: 16.13.2
V8: 10.0.139.17-electron.0
OS: Darwin arm64 21.1.0, 12.0.1 (21A559)

VSCode is purely installed just today with two extensions: "Zig Language Server (zls) for VSCode" + "Zig".

Any ideas?

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions