Closed rhencke closed 7 years ago
that's interesting, I actually wrote this piece of code on Windows and it works for me, but what you mention is definetely a bug.
I fixed the bug you've described(I used JSON.stringify
which should cover every case, including unicode escape sequences etc.) in my fork. Can you please try, if it fixes the bug for you: https://github.com/RSDuck/vscode-nim.
For the case, you don't have the needed build tools installed, I attached a compiled version of the extension. You have to remove the .zip extension and install inside of VSCode(https://code.visualstudio.com/docs/editor/extension-gallery#_install-from-a-vsix). Make sure you deinstalled the downloaded version of the extension before.
Thank you! I uninstalled the old version, and installed the one you provided (via the zip file), and can confirm that it fixes it. Everything comes up from nimsuggest on the first try now.
Ok, I just made a pull request. It shouldn't take too long until it gets merged and a new release gets pushed.
Currently, when you attempt to invoke autocompletion in Windows, no results from nimsuggest appear.
I believe I have traced this down to the current implementation of sexp, and how replacements are handled for strings.
In the current revision of vscode-nim, sexp's toString is defined as:
In one code path, a string value of
C:\Users\rhencke\AppData\Local\Temp\vscodenimdirty.nim
is passed.This is then escaped as
C:\\Users\rhencke\AppData\Local\Temp\vscodenimdirty.nim
, because thereplace
function only will replace the first occurrence of a string, when given a string as the search parameter.If the string case is modified to:
the string value is escaped to
C:\\Users\\rhencke\\AppData\\Local\\Temp\\vscodenimdirty.nim
, and autocompletion now works.