Visual Studio Code: Difference between revisions

imported>Nix
add Home Manager install
imported>Nix
→‎Managing extensions: more on updating extensions, clean up section
Line 84: Line 84:
</syntaxHighlight>
</syntaxHighlight>


We can retrieve an updated set for manually installed / specified packages by cloning the 'nixpkgs' repo from github, and running: 'nixpkgs/pkgs/misc/vscode-extensions/update_installed_exts.sh'
Some useful examples here: [https://github.com/search?q=extensionFromVscodeMarketplace&type=code GitHub search for "extensionFromVscodeMarketplace"]
 
=== Updating extension versions ===
 
Nixpkgs contains a script which will run <code>code --list-extensions</code>, then look for the latest available versions of those extensions, and output a list which you can add to your Nix config in a format similar to the above. To use it, clone the [https://github.com/NixOS/nixpkgs nixpkgs repo from github], and run: [https://github.com/NixOS/nixpkgs/blob/master/pkgs/misc/vscode-extensions/update_installed_exts.sh nixpkgs/pkgs/misc/vscode-extensions/update_installed_exts.sh]
 
Example output:
 
<syntaxHighlight lang=nix>
❯ ./nixpkgs/pkgs/misc/vscode-extensions/update_installed_exts.sh
... # it does some fetching and then outputs the list...
{ extensions = [
  {
    name = "project-manager";
    publisher = "alefragnani";
    version = "12.4.0";
    sha256 = "0q6zkz7pqz2prmr01h17h9a5q6cn6bjgcxggy69c84j8h2w905wy";
  }
  {
    name = "githistory";
    publisher = "donjayamanne";
    version = "0.6.18";
    sha256 = "01lc9gpqdjy6himn7jsfjrfz8xrk728c20903lxkxy5fliv232gz";
  }
... # the output for the rest of your extensions
];
}%
</syntaxHighlight>


== Remote SSH ==
== Remote SSH ==