Syntax highlighting in Astro Nvim - neovim

I installed the Astro Vim package. Syntax highlighting should work out of the box, but it doesn't. As soon as I write :setfiletype javascript highlighting works immediately. Is there any way to enable automatic file type detection? I executed the LspInstall and TSInstall commands after installation
Now the editor looks like this:

You are likely using Nvim v0.8.0 (released 3 days ago), which introduced several breaking changes and is incompatible with AstroNvim v1.10.0 (the current stable version; refer to this discussion).
AstroNvim v2.0 was pushed to the project's nightly branch and will support the new Nvim release; however, seeing as it is currently unstable, for now your best option would be to downgrade to Nvim 0.7.2.

Related

VSCode: How to fix Python extension version for Python 2 compatibility and prevent automatic upgrade?

I have a legacy code using Python 2. The last version of VSCode Python extension that supports Python 2 is v2022.2.1924087327
It is very easy to change the extension to an older version.
My problem is that VSCode always automatically updates the extension. Since I'm using it in a remote machine, when I loose connection, it automatically updates the extension, and I must manually downgrade it, reload the window and start it again.
Is it possible to fiz the version of my Python extension in VSCode?
I've just found how to prevent extensions to automatically upgrade.
And I just set:
{
"extensions.autoUpdate": false
}
It will now ask me for each extension upgrade, it is an annoyance, but at least I can control it.
If someone finds how to disable auto update just for the Python extension, I'll mark it as the correct answer.

vscode with neovim doesn't save file on :w command

I'm using Ubuntu Xenial (yes I know it's out of date, I'm going to upgrade it soon), neovim 0.6.0 (which apt tells me is the latest version), and vscode 1.60.1. Until recently could save files with the :w command, but all of a sudden when I use that command nothing happens. It probably happened when my version of vscode was updated, but I'm not sure. Is there a setting somewhere that controls this, or could something have overridden it? Googling it shows fairly old results, and since it was working a few weeks ago I'm not sure how helpful those ones are.
Ctrl + s works but I'm so used to using :w that I do it automatically and it takes me time to remember to do it the other way. Also, since :w works in all other vims that I use, I'd like to get vscode working the same way again.
I was running into this problem too and I found that the solution is to use neovim stable, not the prerelease 0.6.x version. Now all the editor commands work fine.
I found this solution via this GitHub issues link: https://github.com/asvetliakov/vscode-neovim/issues/736

Open External Terminal keybinding not working

I can't open a new external terminal with CTRL + SHIFT+C. Did a new update remove this function? I was able to use this shortcut before, but now I cannot.
This appears to be a bug with the current version of Visual Studio Code, as multiple users are reporting it isn't working across different operating systems:
GitHub Issue #1
GitHub Issue #2
I updated to 1.57 the other day, and it is not working for me now either. Previously it was on a slightly older version that I updated from.
Update:
The latest Visual Studio Code Insiders release (1.58) has addressed this as noted in this GitHub issue. If you really want this functionality back, you can download the Insiders edition, otherwise you'll need to wait until the next update for the main application.
Final Update:
The May Recovery update resolved this issue. Download the update, and you should be able to once again open external terminals through the command.
It was the issue vscode 1.57 which lasted for about an week.
If you upgrade to the latest version of vscode, it will work now.
Good Job VSCODE !

Custom node version to run VSCode extensions

I'm making a vscode extension for my personal use. I'd really like to use a more recent node version. However, I'm not sure how does VSCode chooses which node version to use.
The only node.js that I have installed is 8.1.3. But when I debug the extension, I see that VSCode uses 7.*.* (via process.version).
I've been searching documentation for an hour, so far, without luck. Any help is appreciated.
This is not possible. Quoting the reply of one of the team members (Andre Weinand) in #18253:
VS Code runs extensions on the node version that is built into electron (on which VS Code is based). This cannot be changed.

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.