VSCodium: Difference between revisions

From NixOS Wiki
imported>Alexnortung
mNo edit summary
imported>Wackbyte
m fix broken syntax highlighting and formatting
Line 5: Line 5:
Install the `vscodium` package.
Install the `vscodium` package.


<syntaxhighlight lang="nix>
<syntaxhighlight lang="nix">
  environment.systemPackages = with pkgs; [ vscodium ];
environment.systemPackages = with pkgs; [ vscodium ];
</syntaxhighlight>
</syntaxhighlight>


or ad-hoc
or ad-hoc


<syntaxhighlight>
<syntaxhighlight lang="console">
  nix-env -iA nixos.vscodium
$ nix-env -iA nixos.vscodium
</syntaxhighlight>
</syntaxhighlight>


Line 19: Line 19:
Extensions can be managed using the 'vscode-with-extensions' package, mostly like for [[Vscode]]:
Extensions can be managed using the 'vscode-with-extensions' package, mostly like for [[Vscode]]:


<syntaxHighlight lang=nix>
<syntaxhighlight lang="nix">
{ pkgs, ... }:
{ pkgs, ... }:


Line 44: Line 44:
   ];
   ];
}
}
</syntaxHighlight>
</syntaxhighlight>


Please note that some Visual Studio Code extensions have licenses that restrict their use to the official Visual Studio Code builds and therefore do not work with VSCodium. See [https://github.com/VSCodium/vscodium/blob/master/DOCS.md#proprietary-debugging-tools this note on the VSCodium docs page] for what's been found so far and possible workarounds.
Please note that some Visual Studio Code extensions have licenses that restrict their use to the official Visual Studio Code builds and therefore do not work with VSCodium. See [https://github.com/VSCodium/vscodium/blob/master/DOCS.md#proprietary-debugging-tools this note on the VSCodium docs page] for what's been found so far and possible workarounds.
In particular [https://marketplace.visualstudio.com/items?itemName=ms-vscode-remote.remote-ssh remote-ssh] does not work yet with vscodium.
In particular [https://marketplace.visualstudio.com/items?itemName=ms-vscode-remote.remote-ssh remote-ssh] does not work yet with vscodium.

Revision as of 01:37, 2 March 2022

VSCodium is a build of Vscode without the proprietary bits that are included in the official Vscode distribution. See https://github.com/VSCodium/vscodium#readme for more background.

Install

Install the `vscodium` package.

environment.systemPackages = with pkgs; [ vscodium ];

or ad-hoc

$ nix-env -iA nixos.vscodium

Managing extensions

Extensions can be managed using the 'vscode-with-extensions' package, mostly like for Vscode:

{ pkgs, ... }:

let
  extensions = (with pkgs.vscode-extensions; [
      bbenoist.Nix
      ms-python.python
      ms-azuretools.vscode-docker
    ]) ++ pkgs.vscode-utils.extensionsFromVscodeMarketplace [
    {
      name = "remote-ssh-edit";
      publisher = "ms-vscode-remote";
      version = "0.47.2";
      sha256 = "1hp6gjh4xp2m1xlm1jsdzxw9d8frkiidhph6nvl24d0h8z34w49g";
    }
  ];
  vscodium-with-extensions = pkgs.vscode-with-extensions.override {
    vscode = pkgs.vscodium;
    vscodeExtensions = extensions;
  };
in {
  environment.systemPackages = [
    vscodium-with-extensions
  ];
}

Please note that some Visual Studio Code extensions have licenses that restrict their use to the official Visual Studio Code builds and therefore do not work with VSCodium. See this note on the VSCodium docs page for what's been found so far and possible workarounds. In particular remote-ssh does not work yet with vscodium.