Rust autocompletion not shown for items from the standard library - autocomplete

I can't get working autocompletion on VS Code on Ubuntu 16.04.
I've installed rustup from https://www.rustup.rs/ and installed the "rust-lang.rust" package. This extension installed rustfmt and tried to use both stable and nightly toolchains.
If I type std:: no suggestions are shown. Suggestions show on local mod import but not with the standard library. I tried to reinstall by removing via uninstall.sh and manually removing ~/.multirust and ~/.cargo and then installed again, but nothing changed.
What did I do wrong?

I didn't have the RUST_SRC_PATH variable set. In my VS Code settings, I added
"rust.rustLangSrcPath": "/home/ilya/.rustup/toolchains/**your_toolchain**/lib/rustlib/src/rust/src/"
and it did the job. This option comes from the kalitaalexey.vscode-rust package.

Related

Playwright VSCode gives `No tests found` message

I've installed the Playwright vscode extension but when I go to the testing area I get a "No tests have been found in this workspace" message. But when I run $> playwright test on the CLI it works like a charm. The weird thing is, that some time ago it was perfectly working in VSCode.
When I click the reload icon I get
But then after a couple of seconds I get back where I started.
When I click the blue button I go to the list of extension
I'm not very sure what I am suppose to install here. Also, it did work in the past already.
This is the extension I installed for Playwright:
Any suggestion what is going on here in my VSCode?
I had the same issue, the only thing that helps me is VS code update, this extension works only on the latest version on VS code.
tests section
I had the Microsoft extension installed and latest VSCode and got the same message in the Testing panel after using the "Install Playwright" command.
For me it was restarting VSCode completely that made the extension work. Note this was a full app restart and not just the "Developer: Reload Window" command.
Update Node on your system to the latest and it will resolve it. I had the same issue and by updating node, Vs Code immidiately detected all the test files and it works like a charm.
Check that you're using a supported version of playwright.
In the "details" section, the extention I have installed says
This extension works with Playwright Test version v1.19+ or newer.
I was using Playwright version 1.17, and faced this same issue. Updating to use version 1.19 fixed it.
I had the same issue with Playwright version 1.26.0
I actually had a github issue open
https://github.com/microsoft/playwright/issues/17687
Updating to Playwright version 1.26.1 solved the problem and tests were found once again.
I've had the same issue with a vs code which has been installed on a ubuntu box using the "ubuntu software" installer. This only installs snaps, which probably caused the issue. First I uninstalled the snap and deleted the .vscode folder in the users home directory.
After using apt for installation ( as explained here https://linuxize.com/post/how-to-install-visual-studio-code-on-ubuntu-20-04/ ), the playwright plugin worked without any issues.
Please update your Playwright version (Version 1.28.1 at the time of this post) to the latest, (Steps below),
First Check your current version
npx #playwright/test --version
Update to the latest version
npm install #playwright/test#latest
Install Browsers
npx playwright install
Check the updated version
npx #playwright/test --version
And also install/update the latest version of the Playwright Test for VSCode (v1.0.1 at the time of this post) and reload the IDE.
This can be done by simply as follows,
Go to Extensions
Search for "Playwright Test for VSCode"
Update or install the given latest version
It Worked for me.
I had the same issue when trying to use existing tests and the latest available version of VSCode and NodeJS just installed on my PC. It that the issue is in the lock files (yarn.lock and parameters-lock.json) contained conflicting requirements, I left only those files that already were with the tests and everything immediately worked after clicking the "update tests" button.

VSCode Intellisense Not Working In Jupyter Notebook Extension(MacOS)

I have an issue with VS Code which I recently installed in my MacOS BigSur.
I tried out the Jupyter Notebook extension and in their documentation it says that they have full intellisense support for this extension as well.
Intellisense in Jupyter Notebook in VSCode works well for completing variables, functions,methods,etc....
The only issue I have is that I am not able to get the arguments/parameter information, though it is working fine with the python extension of VSCode
I tried out things like Shift+TAB...which works in JupyterNotebooks(not the VS Code version).
Is this a bug that I am facing...or is it just like that. Can you also please suggest as to how to make this work.
Edit May 12, 2021: With the Pylance language server (now the default), I now get parameters and type hints.
According to this issue on GitHub, the arg/param info is not supported on stable VS Code. It looks like you need to use the "Native Notebook" in VS Code Insiders (the beta) and use the "Pylance" language server Extension.
I haven't tried this solution myself (not sure I want to install Insiders), but just changing the language server to "Pylance" at least gives you signatures.

VS Code - pylint is not running

I have a workspace setup in VS Code where I do python development. I have linting enabled, pylint enabled as the provider, and lint on save enabled, but I continue to see no errors in the Problems panel. When I run pylint via the command line in the virtual environment i see a bunch of issues - so I know pylint works. I am also using black formatting(on save) which works without issue. I have tried using both the default pylint path as well as updating it manually to the exact location and still no results. When I look at the Output panel for python it looks like pylint is never even running (i.e. I see the commands for black running there but nothing for pylint).
My pylint version is 2.4.4 and VS Code version 1.46
Any idea how to get this working?
This is due to a bug in the newer version of python extension see here.
For now you can either wait for the fix to arrive, use jedi language server or install previous version of the extension
Add
"python.linting.enabled" : true
"python.linting.lintOnSave" : true
to your settings.json
Uninstall Python Extension
Reinstall Python Extension
And with that there will will be one more extension of "Python Extension" named - "PYLANCE" don't forget to install that too.
Reload VS Code
DONE !!

VS Code - how to rollback extension/install specific extension version

Just got an update for the Golang extension and it appears to be broken, reporting an error on a package main that's literally just a list of my imports with no useful information (see screenshot below). It's refusing to lint or do anything useful which is annoying.
So I want to quickly jump back to the previous version, how can I do this in VS Code? I can't seem to find it in the docs at all.
NB: I'm using VS Code version 1.10.1 with only the golang package. The code is valid golang.
From v1.30 release notes: install previous versions of extensions.
You can now go back to a previous version of an extension if there are
issues with the current version. VS Code provides an Install Another
Version action on an installed extension which shows a dropdown of
available versions.
The option to install another version is in the context menu. Or the gear icon for each extension. Or the Extension Page in vscode: Uninstall dropdown: Install another version....
For me when I do this - without "Disable Auto Updating Extensions" (I assume that the Debugger for Chrome is such an extension) it does not auto-update on reload or close/open but shows a button for that extension to install the latest version instead.
So it appears you don't have to disable all auto-updating extensions just to revert one extension to an older version and keep it at that older version. [leave a comment if you find that isn't true, thanks]
Update for vscode v1.75:
See pinning extensions (to a specific version):
Make sure you have extension autoupdates enabled and try pinning
extensions to a specific version using following UI. Make sure
extensions are not getting auto updated after pinning.
From CLI : Install a specific version using following format -
code-insiders --install-extension eamodio.gitlens#13.1.1
From Extensions UI - Use *Install Another Version... action in the
context menu of the installed extension.
Make sure the pinned version is synced across VS Code instances - Use
Settings Sync feature to test this. To have different instances of VS
Code on same machine, open VS Code from CLI using different
user-data-dir and extensions-dir. Eg: code-insiders --user-data-dir <path> --extensions-dir <path>
Export and Import the profile with the pinned extension and make sure
in the imported profile, extension is still pinned. Export and Import
profile actions are available in the global activity context menu
(gear).
Si it appears that regardless of the Disable Auto Updating Extensions setting, pinning/reverting to a previous version of an extension should result in that extension not updating.
[EDIT] now it is supported -> see accepted answer
Currently downgrading is not (yet) supported.
However, you can uninstall the extension and then manually download and install a specific version by hand: https://code.visualstudio.com/docs/extensions/install-extension
And also this excellent answer: How to install VSCode extensions offline?

VSCode - TypeScript language service died unexpectedly 5 times in the last 5 minutes

This error message keeps sliding down from the top every few seconds. I click on the close button and it comes back again. I am not and don't plan on using TypeScript in any of my projects.
Is there a way to "silent" this warning message?
Is there a way to change the frequency that the warnings slide down on the screen?
This is happening in VSCode 1.8.1 and 1.9 on Windows 10 and Windows 8.
I work on TypeScript for VSCode.
The TypeScript language service powers language features for both TypeScript and JavaScript code. Without it, you do not get any suggestions or intellisense or any other nice language support.
Please open an issue against VSCode if you are seeing this error. You can also try upgrading the version of TypeScript that VS Code uses to pick up the latest fixes and features: https://code.visualstudio.com/Docs/languages/typescript#_using-newer-typescript-versions
(I'm also looking into a better way to handle this message since it can be very spammy when the TypeScript service crashes continually)
I resolve my problem by use this way:
first, open your typescript.tsserver.log to "verbose"
restart vscode, and open ts log
and you will find when make your tsserver so slow, as for me, jest_cache is the problem. so I add a exclude in my tsconfig.json
restart, and the problem solve.
I the same problem with VSCode using a workspace Yarn and Typescript. After a couple months without a solution, I tried updating the Yarn VSCode SDK using yarn dlx #yarnpkg/sdks vscode as part of these instructions and that fixed my problem.
you can try to install this vscode extension to make vscode use latest typescript version
To people getting here using WSL2 & Ubuntu(?)
rm -rf ./vscode-server worked for me
Disabling the "JavaScript and TypeScript Nightly" extension worked for me.
The error always said that the workspace was using an old verison of typescript and that I should upgrade although I was up to date. It looks the workspace was using the latest dev build of typescript because of the extension or something like that maybe caused the error.
For a temprary solution you need to rollback to an older version. In my case it worked with: https://code.visualstudio.com/updates/v1_39.
upgrading to TypeScript v3.7.3 and using VSCode Insider's Edition seems to fix the issue for me.
There are multiple ways to upgrade. One way is:
yarn add -D typescript#3.7.3
https://github.com/microsoft/vscode/issues/84618#issuecomment-562290275
Here is my solution which I spent 1 week.
Fallback version to Version: 1.61.2 (Universal)
Rmove your local VsCode totaly.
quit it
remove it from your Application folder
remove the file ~/.vscode
rm -rf ~/.vscode
Install the vsCode v1.61.2 and open it;
Close the aoto update. it's important
find the menu Code > preferences > settings
search keyword of update
set Application/Update/update > mode > none
Open your ts project
Hope help you
took me a few confusing days, as it kept trying to default to 16.8 which I had not installed via nvm
I installed and un-installed 16.8, set the default and system aliases (always alias to a version number without any letters ['v']
Finally I found a posting that said, no matter what you have installed for nvm MacOS will always use the system Node if there is one.
So: brew uninstall node got rid of a version that I didn't was on my mac... I've been using nvm for many years, so I don't know how it got there. Perhaps it came in as a dependency...
Since I use nvm, and always want the typescript support I pinned it to a particular version of node that I know has typescript installed globally
tsdk: /Users/ajoslin/.nvm/versions/node/v16.14.0/lib/node_modules/typescript/lib/
In my case, I didn't have the typescript compiler (tsc) installed on my system. So npm install -g typescript resolve my problem.