VSCodium: Difference between revisions
m
Category:Applications
imported>SuperSamus (Added info) |
m (Category:Applications) |
||
(5 intermediate revisions by 5 users not shown) | |||
Line 13: | Line 13: | ||
<syntaxHighlight lang=nix> | <syntaxHighlight lang=nix> | ||
environment.systemPackages = with pkgs; [ | environment.systemPackages = with pkgs; [ | ||
vscode-with-extensions.override { | (vscode-with-extensions.override { | ||
vscode = vscodium; | vscode = vscodium; | ||
vscodeExtensions = with vscode-extensions; [ | vscodeExtensions = with vscode-extensions; [ | ||
Line 28: | Line 28: | ||
} | } | ||
]; | ]; | ||
} | }) | ||
]; | ]; | ||
</syntaxHighlight> | </syntaxHighlight> | ||
Some examples here: [https://github.com/search?q=extensionFromVscodeMarketplace&type=code GitHub search for "extensionFromVscodeMarketplace"] | Some examples here: [https://github.com/search?q=extensionFromVscodeMarketplace&type=code GitHub search for "extensionFromVscodeMarketplace"] | ||
{{ic|extensionsFromVscodeMarketplace}} is a manual way to fetch extensions. However, to keep updated from upstream, [https://github.com/nix-community/nix-vscode-extensions nix-community/nix-vscode-extensions] provides the Nix expressions for the majority of available extensions from Open VSX and VSCode Marketplace. A GitHub Action updates the extensions daily. | |||
It's also possible to install VSCodium via [[Home Manager]]: | It's also possible to install VSCodium via [[Home Manager]]: | ||
Line 84: | Line 86: | ||
programs.vscode.package = pkgs.vscodium.fhsWithPackages (ps: with ps; [ rustup zlib ]); | programs.vscode.package = pkgs.vscodium.fhsWithPackages (ps: with ps; [ rustup zlib ]); | ||
</syntaxHighlight> | </syntaxHighlight> | ||
== Creating development environments using nix-shell == | |||
Instead of using configuration.nix to add packages (e.g. Python or NodeJS) for developing code on VSCode, you can instead use nix-shell. This will allow you to seamlessly create development environments with the correct packages for your project, without rebuilding and restarting NixOS. See [[Development_environment_with_nix-shell | this page]] for further instructions in building nix-shell development environments. | |||
The extension [https://marketplace.visualstudio.com/items?itemName=arrterian.nix-env-selector nix-env-selector] will make switching between different nix-shell environments within VSCode so you can switch between different coding projects easily. It has a guide for setting up nix-shell environments for VSCode. | |||
== Troubleshooting == | |||
=== Issues running Vscodium on Wayland === | |||
In case of a broken graphical interface while running Vscodium on [[Wayland]], removing following cache directories might resolve the issues: | |||
<syntaxHighlight lang="console"> | |||
$ rm -r ~/.config/VSCodium/GPUCache ~/.config/VSCodium/Crashpad | |||
</syntaxHighlight> | |||
An other workaround is to run Vscodium without GPU acceleration | |||
<syntaxHighlight lang="console"> | |||
$ codium --disable-gpu | |||
</syntaxHighlight> | |||
[[Category:Applications]] |