-
-
Notifications
You must be signed in to change notification settings - Fork 7.9k
gopls language server fails to send semantic tokens to zed. #51620
Copy link
Copy link
Labels
area:languages/goGo programming language supportGo programming language supportarea:semantic tokensSemantic token highlightingSemantic token highlightingfrequency:uncommonBugs that happen for a small subset of users, special configurations, rare circumstances, etcBugs that happen for a small subset of users, special configurations, rare circumstances, etcpriority:P2Average run-of-the-mill bugsAverage run-of-the-mill bugsstate:needs reproNeeds reproduction steps and/or someone to reproduceNeeds reproduction steps and/or someone to reproduce
Metadata
Metadata
Assignees
Labels
area:languages/goGo programming language supportGo programming language supportarea:semantic tokensSemantic token highlightingSemantic token highlightingfrequency:uncommonBugs that happen for a small subset of users, special configurations, rare circumstances, etcBugs that happen for a small subset of users, special configurations, rare circumstances, etcpriority:P2Average run-of-the-mill bugsAverage run-of-the-mill bugsstate:needs reproNeeds reproduction steps and/or someone to reproduceNeeds reproduction steps and/or someone to reproduce
Type
Fields
Give feedbackNo fields configured for Bug.
This bug is tangentially related to #51430 and subsequent investigation of the semantic token behavior. It seems that while many LSPs (intentionally) only send semantic tokens for certain elements or types of code object or simply do not support semantic tokens, gopls is simply broken. This simple fix may be a slight bandaid, but so far I haven't pinned down other lsps that are similarly broken in order to develop a broader theory of why, so far it just seems that gopls is a bit more finicky about it than most.
Reproduction steps
semantic_tokenstotrueand observe a complete lack of syntax highlights.Current vs. Expected behavior
current behavior:
expected behavior (i have already fixed this):
Zed version and system specs
Zed: 0.229.0+nightly.2289.e79429b51b626e0120278b694351cd34a83386be
OS: MacOS 26.3
Memory: 16 GB
Arch: aarch64
Attach Zed log file
gopls startup log
Relevant Zed settings
No response
Relevant Keymap
(for AI issues) Model provider details
No response
If you are using WSL on Windows, what flavor of Linux are you using?
None