Semantic highlight does not work when remote to WSL2
See original GitHub issuewhen I use vscode in windows and remote to wsl2, semantic highlight does not work:
when I use vscode in wsl2, it works:
Logs
I[22:49:39.409] clangd version 10.0.0
I[22:49:39.409] PID: 1264
I[22:49:39.410] Working directory: /mnt/c/Users/hyuuko/.vscode/extensions/ms-vscode-remote.remote-wsl-0.44.2
I[22:49:39.410] argv[0]: /usr/sbin/clangd
I[22:49:39.410] Starting LSP over stdin/stdout
I[22:49:39.412] <-- initialize(0)
I[22:49:39.414] --> reply:initialize(0) 1 ms
I[22:49:39.416] <-- initialized
I[22:49:39.416] unhandled notification initialized
I[22:49:39.417] <-- textDocument/didOpen
I[22:49:39.421] Failed to find compilation database for /mnt/d/a.cc
I[22:49:39.421] --> textDocument/clangd.fileStatus
I[22:49:39.421] Updating file /mnt/d/a.cc with command clangd fallback
[/mnt/d]
/usr/bin/clang /mnt/d/a.cc -fsyntax-only -resource-dir=/usr/lib/clang/10.0.0
I[22:49:39.430] <-- textDocument/documentSymbol(1)
I[22:49:39.432] <-- textDocument/codeAction(2)
I[22:49:39.432] <-- textDocument/documentLink(3)
I[22:49:39.443] --> textDocument/publishDiagnostics
I[22:49:39.443] --> textDocument/semanticHighlighting
I[22:49:39.443] --> reply:textDocument/documentSymbol(1) 12 ms
I[22:49:39.443] --> reply:textDocument/codeAction(2) 11 ms
I[22:49:39.443] --> reply:textDocument/documentLink(3) 11 ms
I[22:49:39.443] --> textDocument/clangd.fileStatus
System information Clangd version: 10.0.0 clangd extension version: 0.1.6 Operating system: Windows_NT x64 10.0.19041 WSL2: Arch Linux VScode version: 1.45.1 (system setup)
Issue Analytics
- State:
- Created 3 years ago
- Comments:8 (5 by maintainers)
Top Results From Across the Web
November 2021 (version 1.63) - Visual Studio Code
This update removes support for semantic highlighting when using TypeScript 4.1 or older in your workspace. TypeScript 4.2 added native support for semantic ......
Read more >IntelliJ IDEA 2022.3 Is Out!
IntelliJ IDEA 2022.3 is now available with numerous improvements and cool new features! This blog post covers all of the noteworthy updates ...
Read more >Visual Studio 2022 version 17.0 Release Notes
Get the latest features, bug fixes, and support for Visual Studio 2022 version 17.0. Download today.
Read more >Windows with WSL - Lean Manual
... the lean extension running in WSL. It is recommended that you setup Ubuntu in WSL 2. ... lean4: Could not find Lean...
Read more >Microsoft releases Visual Studio 2022 with several new ...
You can now build and debug natively on WSL2 without establishing a SSH connection. Both cross-platform CMake projects and MSBuild-based Linux projects are...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
The semantic-highlighting implement use
vscode.extensions.all
to get color theme config. So nothing will be found in a remote environment. https://github.com/clangd/vscode-clangd/blob/d7879cb0cbac578d711f72c61c63e9c55427d4be/src/semantic-highlighting.ts#L320https://github.com/clangd/vscode-clangd/blob/d7879cb0cbac578d711f72c61c63e9c55427d4be/src/semantic-highlighting.ts#L228
Mitigated by #54.