From a770ede4059a3e1b92a20cbdd5977d22203bd8da Mon Sep 17 00:00:00 2001 From: Salar Rahmanian Date: Fri, 16 Aug 2024 19:21:56 -0700 Subject: [PATCH] update nvim config and cleanup vscode settings --- home.nix | 65 +-------------------------------- programs/default.nix | 1 + programs/vscode/default.nix | 71 +++++++++++++++++++++++++++++++++++++ 3 files changed, 73 insertions(+), 64 deletions(-) create mode 100644 programs/vscode/default.nix diff --git a/home.nix b/home.nix index ab62e54..ce120a8 100644 --- a/home.nix +++ b/home.nix @@ -204,69 +204,6 @@ }; }; - programs.vscode = { - enable = true; - enableUpdateCheck = false; - enableExtensionUpdateCheck = false; - mutableExtensionsDir = false; - extensions = with pkgs.vscode-extensions; [ - asvetliakov.vscode-neovim - baccata.scaladex-search - davidanson.vscode-markdownlint - enkia.tokyo-night - github.copilot - github.copilot-chat - github.github-vscode-theme - github.vscode-github-actions - github.vscode-pull-request-github - humao.rest-client - jnoortheen.nix-ide - mechatroner.rainbow-csv - mkhl.direnv - ms-python.python - ms-python.vscode-pylance - ms-vscode.makefile-tools - ms-toolsai.jupyter - redhat.java - redhat.vscode-yaml - rust-lang.rust-analyzer - scalameta.metals - skyapps.fish-vscode - svsool.markdown-memo - timonwong.shellcheck - usernamehw.errorlens - visualstudioexptteam.vscodeintellicode - vscode-icons-team.vscode-icons - vscjava.vscode-java-pack - xyz.local-history - yzhang.markdown-all-in-one - ]; - userSettings = { - "editor.fontFamily" = "SF Mono"; - "editor.fontSize" = 13; - "editor.copyWithSyntaxHighlighting" = true; - "extensions.experimental.affinity" = { - "asvetliakov.vscode-neovim" = 1; - }; - "files.autoSave" = "afterDelay"; - "git.autoSave" = "afterDelay"; - "git.rebaseWhenSync" = true; - "github.gitProtocol" = "ssh"; - "githubPullRequests.notifications" = "pullRequests"; - "githubPullRequests.pullBranch" = "never"; - "markdown.extension.preview.autoShowPreviewToSide" = true; - # Install paste image manually as not in nix ( https://marketplace.visualstudio.com/items?itemName=mushan.vscode-paste-image ) - "pasteImage.insertPattern" = "![[\${imageFileName}]]"; - "pasteImage.path" = "\${projectRoot}/Attachments"; - "python.analysis.extraPaths" = [ "src" ]; - "telemetry.telemetryLevel" = "off"; - "window.openFoldersInNewWindow" = "on"; - "workbench.colorTheme" = "Tokyo Night"; - "workbench.iconTheme" = "vscode-icons"; - "workbench.sideBar.location" = "right"; - }; - }; - programs.fish = { enable = true; @@ -349,6 +286,6 @@ # Neovim Configuration xdg.configFile."nvim".source = builtins.fetchGit { url = "https://code.softinio.com/softinio/nvim-config"; - rev = "11c5aecb3adc0195642ad35f89c04798f26a9076"; + rev = "e5cf7829a42592aa984eb80e8501d171f51b1dbd"; }; } diff --git a/programs/default.nix b/programs/default.nix index d39377b..36b164b 100644 --- a/programs/default.nix +++ b/programs/default.nix @@ -2,4 +2,5 @@ ./git ./tmux ./wezterm + ./vscode ] diff --git a/programs/vscode/default.nix b/programs/vscode/default.nix new file mode 100644 index 0000000..2a777ee --- /dev/null +++ b/programs/vscode/default.nix @@ -0,0 +1,71 @@ +{ config, pkgs, ... }: + +let + myExtensions = with pkgs.vscode-extensions; [ + asvetliakov.vscode-neovim + baccata.scaladex-search + davidanson.vscode-markdownlint + enkia.tokyo-night + github.copilot + github.copilot-chat + github.github-vscode-theme + github.vscode-github-actions + github.vscode-pull-request-github + humao.rest-client + jnoortheen.nix-ide + mechatroner.rainbow-csv + mkhl.direnv + ms-python.python + ms-python.vscode-pylance + ms-vscode.makefile-tools + ms-toolsai.jupyter + redhat.java + redhat.vscode-yaml + rust-lang.rust-analyzer + scalameta.metals + skyapps.fish-vscode + svsool.markdown-memo + timonwong.shellcheck + usernamehw.errorlens + visualstudioexptteam.vscodeintellicode + vscode-icons-team.vscode-icons + vscjava.vscode-java-pack + xyz.local-history + yzhang.markdown-all-in-one + + ]; + myUserSettings = { + "editor.fontFamily" = "SF Mono"; + "editor.fontSize" = 13; + "editor.copyWithSyntaxHighlighting" = true; + "extensions.experimental.affinity" = { + "asvetliakov.vscode-neovim" = 1; + }; + "files.autoSave" = "afterDelay"; + "git.autoSave" = "afterDelay"; + "git.rebaseWhenSync" = true; + "github.gitProtocol" = "ssh"; + "githubPullRequests.notifications" = "pullRequests"; + "githubPullRequests.pullBranch" = "never"; + "markdown.extension.preview.autoShowPreviewToSide" = true; + # Install paste image manually as not in nix ( https://marketplace.visualstudio.com/items?itemName=mushan.vscode-paste-image ) + "pasteImage.insertPattern" = "![[\${imageFileName}]]"; + "pasteImage.path" = "\${projectRoot}/Attachments"; + "python.analysis.extraPaths" = [ "src" ]; + "telemetry.telemetryLevel" = "off"; + "window.openFoldersInNewWindow" = "on"; + "workbench.colorTheme" = "Tokyo Night"; + "workbench.iconTheme" = "vscode-icons"; + "workbench.sideBar.location" = "right"; + }; +in +{ + programs.vscode = { + enable = true; + enableUpdateCheck = false; + enableExtensionUpdateCheck = false; + mutableExtensionsDir = false; + extensions = myExtensions; + userSettings = myUserSettings; + }; +}