Unable to install VisualStudioCode custom theme (.vsix) - visual-studio-code

So I made a custom theme for VScode, and I just want to install it for personal use, not to be put on the marketplace. Once I customized it, and edited the package.json and README.md files appropriately, I opened the terminal and ran these lines of code, one after the other. This is my first time making a theme and therefore first time running these commands (in case that matters):
npm i -g vsce
Next:
vsce package
I then saw the .vsix file created in my explorer on the left hand side. The text appears dim, I'm not sure if that is an indication that something is wrong... is it?
I right clicked on the file and selected 'Install Extension VSIX' on the bottom
There was no indication that anything had happened, even after clicking install several times.
After that, I tried finding the theme in the color theme searcher, and couldn't find it there either, leading me to assume that it did not install. I also tried doing it through the terminal, using:
code --install-extension dv1-0.0.1.vsix
However, I was greeted by the response: "zsh: command not found: code". I was following this video tutorial to install my custom theme: https://www.youtube.com/watch?v=QCqWzb-9Sy8
The section about installing your theme starts at 11:05. Is there something I have to download to utilize that 'code' command? Regardless I feel like the first installation method I tried should have worked.
In case this matters, I will mention that a "vsc-extension-quickstart.md" file was created as well. I did not find it helpful.
Any way in which you can help is much appreciated!
UPDATE
I installed the 'code' command, so I ran
code --install-extension dv1-0.0.1.vsix
in my terminal and this time it told me that the current VScode version was incompatible, so I went to my package.json and changed the version to 1.51.1 and I was able to install my theme. However, now when I look for the theme in the theme search, I am not seeing it. I know it was installed because it says so in the terminal.
Any idea where I can find and use my theme? Thanks

Related

Can't install neovim in windows

I want to have neovim. I installed it with choco install neovim in the PowerShell (admin). Then I followed a lot of tutorials, like the one of theprimeagen, but I can't get pass the first steps. Maybe is because I don't have Linux, as everybody does, but I don't think is that.
I created a folder like so: C:/users/myusername/.config/nvim. Then, in this folder I type nvim . to open the Explorer of neovim and start creating the .lua files. The problem is that I always get a stupid .nvimlog every time I enter neovim, I think is the reason why I can't install plugins correctly or remap some keys.
In the .nvimlog every time I enter neovim appears a new line that says:
ERR 2023-02-12T12:55:04.800 nvim.15716.0 terminfo_start 374: uv_tty_set_mode failed: invalid argument. And I swear I followed every tutorial in the exact way, and even without creating any file the .nvimlog is always there.
In windows, the default config directory is ~/AppData/Local, based on their official documentation. I don't know if there is a way to change that, but that is how i configured it.
To find out where your config directory is you can also use :echo stdpath('config').

VScode Code highlighting does not work correctly

I clean install windows on one of my devices and then I install VScode and sync all settings from my account but the it doesn't highlight code as it should be and my theme is Dark+ (default dark) and I am on Windows 10.
I want to make the first picture look like the second one.
Things I tried:
reinstall VScode
reinstall Python
reinstall PythonMagic extension
first picture (needs to fix)
second picture (I want to make the first one look like this)

NPM scripts not showing in the explorer sidebar

I have this problem with Visual Studio Code for Windows 10: I can't see the NPM scripts in the explorer sidebar.
I deleted all the extensions, uninstalled VS Code, and installed the latest version of VS Code again with no custom options and no extensions, but it didn't solve my problem; the NPM scripts menu does not appear.
How could I fix this so that the NPM Scripts menu option is shown again?
Few places to look for the NPM-Scripts explorer :
The npm-scripts explorer can be enabled or disabled with the below settings, in VSCode's settings.json:
"npm.enableScriptExplorer": false
Default value is false, change to true and it should work. Try restarting VSCode for changes to take effect(although a restart is not often required) if it doesn't show up.
Another very hard to notice place is the three dots ... in the top right corner of your project explorer (verify if NPM scripts is checked). This is something which I had experienced personally for a different extension.
Open "File > Preferences > Settings"
Search "npm script"
Toggle "Npm: Enable Script Explorer"
Close VSCode; reopen
Version 1.59.1
Go to View -> Open View and type: npm scripts:
Appreciate I may be a bit late to answer this question. For me, this was due to npm scripts not being selected to display in explorer. Once I had selected the box, the npm scripts window was available to view.
Hopefully, this has just been fixed - see https://github.com/microsoft/vscode/issues/120279#event-4631666095 and https://github.com/microsoft/vscode/issues/120279#issuecomment-824950294 seeking test verification.
It is in the Insiders now and in Stable early May, 2021. It fixed it for me.
View/Open View...
Type NPM
Click on NPM Scripts
If it still isn't working, see https://github.com/microsoft/vscode/issues/119868
Is your package.json at the root level? Does it make any difference if you open your package.json first, and then check for the view? Or try opening another .json file (or even the Release Notes has been reported as working) and then do a Reload. Otherwise, add your info to the issue.
Work around: If I leave an editor tab open with my package.json (I have one in the root, and in two other places), close and re-open VSC, then it seems to 'find' the NPM View.
TL;DR;
My VSC (1.55.2) is inconsistently showing / not showing the NPM View.
When it starts without the view, I cannot use View->Open "npm".
No option in Explorer options (...)
When it starts with the view, View->Open has a result for "npm".
Has option in Explorer options (...)
Bug report here: https://github.com/microsoft/vscode/issues/120279
Try to delete package-lock.json and restart VSCode.
In my case it worked.
It happens to me sometimes when I open VSCODE.
Whenever it happens I simply load a package.json file.
The NPM SCRIPTS menu still appears when I close the package.json file.
If that doesn't do the trick, try installing NPM-Scripts extension.
If it worked normally before but now it does not, and you have the extension installed and enabled. Then all you have to do is open your package.json file and it will be available again.
I guess this weird behavior happens when you disable all your extensions or may happen if you're installing/removing extensions from a remote container
You can install NPM-Scripts extension which does the same as npm scripts functionality which was build into vscode.

How to open Visual Studio Code from the command line on linux?

I know I can use command "code" to open VS code or file, but I don't know what should I do to make it possible after I install VS code in Ubuntu.Thanks.
Launching from the Command Line
You can launch VS Code from the command line to quickly open a file, folder, or project. Typically, you open VS Code within the context of a folder. We find the best way to do this is to simply type:
code .
Tip: We have instructions for Mac users in our Setup topic that enable you to start VS Code from within a terminal. We add the VS Code executable to the PATH environment variable on Windows and Linux automatically during installation.
Sometimes you will want to open or create a file. If the specified files does not exist, VS Code will create them for you:
code index.html style.css readme.md
Tip: You can have as many file names as you want separated by spaces.
Source: https://code.visualstudio.com/Docs/editor/codebasics
So, there are a couple of solutions for this.
I've linked a video that shows you how to add vscode to $PATH
(which didn't work for me because I couldn't find the "shell:install path" command)
I uninstalled the vscode from my ubuntu and re-installed using sudo snap install --classic code
(This method worked for me)
Tell me which one works for you... and if you have extensions installed to your vscode then i guess you ought to make a backup or something.
Link to the video: https://youtu.be/iP5FKZXtDBs

Jupyter webpages not displaying properly

Screen shot here.
With Cntrl-Shift-I
No matter how I install Jupyter(aka IPython) I get a dud webpage. It does not display tabs or menus as expected.
The screen shot above is from a 64bit Windows Anaconda install. It was a default install. Install finished. No changes to configuration. First action after install was select IPython menu item in start menu.
Now, trust me, I have tried everything. I have tried installing IPython from pip over top my python2.7 installation, anaconda etc. No matter how I install it ends up with the same problem. I even tried 32bit installs etc.
It doesn't appear to be the browser as both IE and Chrome see the same mangled display.
It is almost like the css files are not being picked up or are not there at all.
I opted to allow the installation of the Anaconda to update my environment variables etc. so the dang blasted thing should be finding where it has put itself.
What is the likely cause? What is the fix please?
I did have a very similar issue on Windows recently. Some program has overwritten your mime type associations. For me it was Inkscape killing SVG by setting the mime type to application/svg.
Try this on terminal:
import mimetypes
mimetypes.guess('file.css')
You should get text/css. If you get application/css this is most likely your problem. My solution: Change back the mime type association. Start regedit and search for application/css in HKEY_CLASSES_ROOT. Replace it with text/css.
Please refer to this https://github.com/ipython/ipython/issues/7024 for further reference.