vlang / vls

V language server. (Old V language server - see v-analyzer)
MIT License
314 stars 53 forks source link

got unexpected token U in JSON #416

Closed veksha closed 1 year ago

veksha commented 1 year ago

Tried to make VLS work in vscode (Windows). "got unexpected token U"

it is because backslashes in JSON strings must be escaped: "C:\Users.." -> "C:\\Users.."

image

DJ-Dav commented 1 year ago

Same error here, I'm also running VSCode on Windows. This should be an easy fix for someone who knows where the code for this message is, but I can't find it.

veksha commented 1 year ago

I found this: https://github.com/vlang/v/blob/14148f3e5238d33e56db0d702227e818f9bfb8a3/cmd/tools/vls.v#L436

DJ-Dav commented 1 year ago

Thanks, i will create a fork tomorrow, hopefully fix it, and create a pull request.

DJ-Dav commented 1 year ago

Done, although i couldn't compile it to check it works, something about gcc not recognising -municode

JalonSolov commented 1 year ago

Try https://blog.vosca.dev/meet-v-analyzer/ instead, now that it is released.