diff --git a/home/applications/vscode/default.nix b/home/applications/vscode/default.nix index 42ae82b..d7649a4 100644 --- a/home/applications/vscode/default.nix +++ b/home/applications/vscode/default.nix @@ -10,8 +10,10 @@ in { imports = [ ./javascript.nix + ./latex.nix ./markdown.nix ./nix.nix + ./rust.nix ]; programs.vscode = { @@ -35,58 +37,51 @@ in { enableUpdateCheck = false; enableExtensionUpdateCheck = false; - extensions = with plugins; - [ - # General extensions + extensions = with plugins; [ + # General extensions - ## Code Completion - # github.copilot - # github.copilot-chat - continue.continue + ## Code Completion + # github.copilot + # github.copilot-chat + continue.continue - ## Development Environment - ms-toolsai.jupyter - ms-vscode-remote.remote-containers + ## Development Environment + ms-toolsai.jupyter + ms-vscode-remote.remote-containers - ## Error Checking - usernamehw.errorlens + ## Error Checking + usernamehw.errorlens - ## Export and Visualisation - ibm.output-colorizer - nobuhito.printcode - pnp.polacode + ## Export and Visualisation + ibm.output-colorizer + nobuhito.printcode + pnp.polacode - ## Git - lamartire.git-indicators - mhutchie.git-graph + ## Git + lamartire.git-indicators + mhutchie.git-graph - ## Miscelaneous - britesnow.vscode-toggle-quotes - mrmlnc.vscode-duplicate - qcz.text-power-tools + ## Miscelaneous + britesnow.vscode-toggle-quotes + mrmlnc.vscode-duplicate + qcz.text-power-tools - # Language extensions + # Language extensions - ## CSV - mechatroner.rainbow-csv + ## CSV + mechatroner.rainbow-csv - ## Python - ms-python.python + ## Python + ms-python.python - ## Rust language extensions - serayuzgur.crates - tamasfe.even-better-toml - vadimcn.vscode-lldb + ## Rust language extensions + serayuzgur.crates + tamasfe.even-better-toml + vadimcn.vscode-lldb - ## SVG - jock.svg - - ## Tex - james-yu.latex-workshop - ] - ++ [ - pkgs.vscode-extensions.rust-lang.rust-analyzer - ]; + ## SVG + jock.svg + ]; userSettings = { "editor.linkedEditing" = true; "window.menuBarVisibility" = "toggle"; diff --git a/home/applications/vscode/latex.nix b/home/applications/vscode/latex.nix new file mode 100644 index 0000000..f0e5fee --- /dev/null +++ b/home/applications/vscode/latex.nix @@ -0,0 +1,37 @@ +{ + pkgs, + lib, + ... +}: let + plugins = (import ./extensions.lock) { + pkgs = pkgs; + lib = lib; + }; +in { + programs.vscode = { + extensions = with plugins; [ + # General + james-yu.latex-workshop + ]; + userSettings = { + "latex-workshop.latex.recipe.default" = "tectonic"; + "latex-workshop.latex.autoBuild.run" = "onSave"; + "latex-workshop.latex.outDir" = "%WORKSPACE_FOLDER%/build/index"; + "latex-workshop.view.pdf.viewer" = "tab"; + "latex-workshop.latex.recipes" = [ + { + "name" = "tectonic"; + "tools" = ["tectonic"]; + } + ]; + "latex-workshop.latex.tools" = [ + { + "name" = "tectonic"; + "command" = "tectonic"; + "args" = ["-X" "build" "--keep-intermediates" "--keep-logs"]; + "env" = {}; + } + ]; + }; + }; +} diff --git a/home/applications/vscode/rust.nix b/home/applications/vscode/rust.nix new file mode 100644 index 0000000..171a81a --- /dev/null +++ b/home/applications/vscode/rust.nix @@ -0,0 +1,25 @@ +{ + pkgs, + lib, + ... +}: let + plugins = (import ./extensions.lock) { + pkgs = pkgs; + lib = lib; + }; +in { + programs.vscode = { + extensions = with plugins; + [ + # General + serayuzgur.crates + tamasfe.even-better-toml + vadimcn.vscode-lldb + ] + ++ [ + pkgs.vscode-extensions.rust-lang.rust-analyzer + ]; + userSettings = { + }; + }; +}