dwyl / dev-setup

✈️ A quick-start guide for new engineers on how to set up their Dev environment

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

VSCodium is VSCode without "Telemetry" (Tracking!)

nelsonic opened this issue · comments

"Microsoft’s vscode source code is open source (MIT-licensed), but the product available for download (Visual Studio Code) is licensed under this not-FLOSS license and contains telemetry/tracking."

https://vscodium.com
image

Either grab the latest release from: https://github.com/VSCodium/vscodium/releases

Or follow the download/install instructions on the website.
e.g: on Mac:

brew cask install vscodium

Output

==> Verifying SHA-256 checksum for Cask 'vscodium'.
==> Installing Cask vscodium
==> Moving App 'VSCodium.app' to '/Applications/VSCodium.app'.
==> Linking Binary 'code' to '/usr/local/bin/code'.
🍺  vscodium was successfully installed!

If you see the following warning:
image

Open the Security & Privacy tab in your System Preferences and click "Open Anyway":
security-privacy-settings-open-anyway

The next time you open the app you will see:
image

Click on "Open" to continue opening VSCodium

You will see:
image

VSCodium is compatible with all the plugins/extensions that you know and love in VSCode.
Just install and VSCodium and pickup exactly where you left off.

using the code shortcut in your terminal will open VSCodium e.g:

code .

No more tracking from Microsoft. 🎉

One thing that I've found annoying about Vscodium is for some reason the Elixir Language Support (syntax highlighting and formatting) is not available when searched for in the extensions search:
image

It means my Elixir code looks like this lame grey:

vscodium-no-elixir-syntax-higlighting

It appears that VSCodium has a separate extensions library so it does not display the default ones.
More detail + instructions available in:
https://github.com/VSCodium/vscodium/blob/master/DOCS.md#extensions-marketplace

image

"Modify the extensionsGallery section of the product.json file" ...

I searched for "product.json vscodium":
image

The results were useless so I kept refining (adding detail) to my query: "where is product.json in vscodium" and obviously the results were still useless.
image

So I went digging in finder on my Mac ... 📁 🔍
But I did not find a product.json file ... 😞
Apparently the brew version is a compiled binary so there is no product.json file ...
See: https://stackoverflow.com/questions/44057402/using-extensions-in-compiled-vscode

What I did find were the extensions for both .vscode (the Microsoft one that tracks your keystrokes!)
and .vscode_oss (VSCodium)
image

To get back to this, simply open your terminal and type:

cd ~/

That will take you to the "home" directory of your "user" on the OS.
If you ls (list the contents of the directory), you will see both .vscode and .vscode-oss (VSCodium):
iterm-home-showing-vscode-vscod-oss

I simply copied over the extensions from ~/.vscode/extensions to ~/.vscode_oss/extensions

cp -R ~/.vscode/extensions/* ~/.vscode_oss/extensions

and that gave me Elixir Syntax highlighting: 🎉
vscodium-sintax-higlighting

This is obviously not a good longterm solution and it won't work for people who haven't previously used VSCode.
So we still need a more robust solution. 💭
I'm going to get back to my code for now, but if I ever need to install just VSCodium on a new computer,
I will investigate this further. 👍

Found it! Open your terminal/iTerm and go to:

cd /Applications/VSCodium.app/Contents/Resources/app
ls -lath

found-product-json-vscodium

Edit the file using VSCodium:

code product.json

If you search for "extensionsGallery" you should see:

vscodium-default-extensionsGallery

Replace:

  "extensionsGallery": {
    "serviceUrl": "https://open-vsx.org/vscode/gallery",
    "itemUrl": "https://open-vsx.org/vscode/item"
  },

With:

"extensionsGallery": {
    "serviceUrl": "https://marketplace.visualstudio.com/_apis/public/gallery",
    "itemUrl": "https://marketplace.visualstudio.com/items"
},

So you now have this:

vscodium-updated-extensionsGallery

After restarting VSCodium, if we open the Extensions Marketplace:
vscodium-open-extensions-marketplace

If you search for your favourite extension or programming language, you will see all of them:
vscodium-full-extention-marketplace

Attempting to launch/run VSCodium from terminal with code or codium but get:

zsh: command not found: code

or

zsh: command not found: codium

according to VSCodium/vscodium#190 (comment)
open the Command Palette: P (Shift Apple P)

image

Type: "install cod" and press the Enter key to activate the command:
image

Now in your terminal, you can type codium . to start the VSCodium program with the CWD as the project.

Just tried setting up on a new mac and got the following error:

/usr/local/bin/code: line 6: python: command not found
/usr/local/bin/code: line 10: ./MacOS/Electron: No such file or directory

Going to do a bit of Googling ... 🔍

Known issue: microsoft/vscode#141738
Hot fix solution: microsoft/vscode#141738 (comment)

vi /usr/local/bin/code

change python => python3 on the following line

- function realpath() { python -c ...
+ function realpath() { python3 -c ...

using python3 works. ✅

The last comment in the thread is actually a more elegant solution: microsoft/vscode#141738 (comment)

I had python3 installed through brew so I simply ran:
ln -s /opt/homebrew/bin/python3 /opt/homebrew/bin/python