Latex file on vs code does not autocompile on save - visual-studio-code

I use the extension Latex Workshop, however my preview does not auto update on save. I have to run pdflatex each time.
I tried uninstalling and installing the extension, deleting the extensions file, and even reinstalled vs code. Yet, the same thing persists.
Is there a specific setting, etc that needs to be changed?

Strangely for me it only seems to work when configuring
latex-workshop.latex.autoBuild.run: "onSave"

As from here the setting for this is:
latex-workshop.latex.autoBuild.run
With value "onFileChange".
Note that this is the default value for this setting, so it should detect the changes automatically, but give it a try.

Local and ssh installation:
For me the problem was that I had Latex Workshop installed on SSH but not locally. After installing locally, the LaTEX icon showed up and also auto-compile on save worked right away.

Related

Does anyone know why my vscode is behaving like this?😔

Why is my vscode ui being like this? I tried completely uninstalling and installing vscode but the issue remains same. 😒😔
Tried completely uninstalling and installing but issue remains same
Try to change theme color of your vsCode editor. And check that by mistake any unknown extension downloaded by you or not.
Other side there might be problem in your display of computer check that onece.
There is one way also,
You can completely delete old vscode version files.

VS Code - Prettier is formatting differently for me than others

Prettier is behaving differently for me compared to my team mates.
We all have same version 9.5.0 of prettier installed on our VS Code.
We all have same configuration of prettier.
Still it is formatting my typescript file differently for one particular line than others and because of this the deployment is failing when I push anything from my machine and works for everybody else.
Does anybody face this?
Which part should I check to see the difference?
Update 1
One thing we found that is different is the VS Code version.
I have version 1.67.2 installed my colleague has 1.63.2 installed.
Could this be the reason?
Update 2
This is the exact line where I am getting prettier error on my machine for wrong formatting while this same formatting is considered correct by prettier for other machines
And this is how prettier formats the line on my machine (then devops complaint that it is a wrong formatting)
I think there is a bug with the prettier extension. Although I had my default formatter set to the prettier extension in the settings UI, I had to re do it manually.
Open any file, right click in the editor screen, click Format document with and choose Prettier - Code formatter.
The local prettier config and the one vscode uses should work now
I faced the same isssue.
in my case I run
npx prettier --version
on both computer and each one return different prettier version.
so although the prettier extension in vscode was 9.5.0 for both pcs. the npm module installed for the project in node_modules was different.
I installed the same prettier module for both computer and the restart vscode and problem solved
You might have installed multiple formatters and you aren't using the correct one. Try to specify it manually in command palette. Check out this answer (Solution A)

The neovim plugin for tpope/vim-surround isn't working in VSCode

I'm looking for thoughts on how I've configured this differently this time.
I have been using this plug in previous versions.
I have the init.vim correctly configured (the plugin works with nvim) from the console.
I'm using the dein plugin manager.
I know the init.vim is being loaded from vscode.
I'm just not getting the surround functionality in vscode.
What's even stranger is it's working on my old laptop just fine, AFAIK I've copied all the settings.
The only difference is the the version of NeoVim installed, but as I mentioned - the plugin works from the console.
Leave the path to the init.vim blank. Still not sure why this works on the old laptop with this value ...

Problem with editing LaTex in VS Code with TexLive after uninstalling MikTex

I'm a noob at setting up LaTeX and I'm completely stuck. I had a broken MikTex + TexStudio setup that the previous owner of my work computer left behind (I also mention that I recently upgraded from Windows 10 to Windows 11). Unable to fix it, I decided to just wipe out everything and start clean. I uninstalled TexStudio and MikTex (also deleted all the files in AppData, etc.) and I installed TexLive (and gave the PC a restart as prescribed) to use it in VS Code (which I already had). All the guides I found say that once I install the LaTex Workshop extension in VS Code, everything should work on it's own (or at least no one mentions that there are problems that could arise).
However, when I try to compile a tex file I get the following error:
11 [0x00002528] INFO latexmk null - this process (19956) started by 'Code' with command line: latexmk -synctex=1 -interaction=nonstopmode -file-line-error -pdf "-outdir=c:/Users/.../texfile_locationfolder" "c:/Users/.../texfile"
It seems that this is a fresh TeX installation.
Please finish the setup before proceeding.
For more information, visit:
https://miktex.org/howto/install-miktex-win
The fact that it mentions MikTex makes me think something messed up and VS Code is trying to use MikTex instead of TexLive. How can I fix this?
PS: I've tried to look at the settings for the VS Code extension, but there are dozens of settings options and, fairly enough, I don't have any idea what most of them do.
I found a fix: I went into the Environment Variables list and found that MikTex was still in there. After deleting everything related to MikTex in the PATH Environment Variables, all was working well. Yeey!
I had the same issue (on Windows). Resolved by deleting a MikTex folder, found by searching for MikTex in File Explorer.
Then, I deleted this folder from the recycling bin and restarted my computer. LaTeX Workshop detected TeXLive and works as expected.

VSCode latex-workshop command not found

I just cannot find any actions to work of the latex-workshop extension in VS Code, though it worked well yesterday.
When I tried to find the actions (using Ctrl+Shift+P), it shows a choice of LaTex Workshop: All Actions. However, after click on it, an error occurs as command 'latex-workshop.actions' not found, and nothing happens. And I can't use any command by shortcut keys.
I tried to reload and reinstall the extension, but they don't help.
Does anyone know what's happening here?
I had the same problem, and followed some suggestion in this GitHub issue.
Simply reinstalling the plugin won't work, but I fixed like this:
Uninstall extension
Close VS Code (Make sure all processes are shut down, maybe restart your machine)
Open Code and reinstall the extension
For me, what solved the problem (August 2021) was to revert to an earlier version - the problem was in 8.20.2, I reverted to 8.19.2. Just click on the extension to show its menu screen and hit the drop-down arrow of the "Uninstall" button.
I solved the issue by uninstalling the extension and deleting the folder
/.vscode-oss/extensions/james-yu.latex-workshop-8.14.0/
The name may vary across distributions