From 90a9f72b2eb19223453ea8f4cde52f6cba538cb0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Charlotte=20=F0=9F=A6=9D=20Delenk?= Date: Wed, 26 Oct 2022 14:41:20 +0100 Subject: [PATCH] Revert "remove vscode once again" This reverts commit 69daa9ec91cc670e396d3dd98f6cb05062ca8cd2. --- config/home-manager/darkkirb.nix | 1 + config/programs/vscode/default.nix | 93 +++++++++++ config/programs/vscode/extensions.nix | 232 ++++++++++++++++++++++++++ 3 files changed, 326 insertions(+) create mode 100644 config/programs/vscode/default.nix create mode 100644 config/programs/vscode/extensions.nix diff --git a/config/home-manager/darkkirb.nix b/config/home-manager/darkkirb.nix index 2e3d2d4a..7db86e58 100644 --- a/config/home-manager/darkkirb.nix +++ b/config/home-manager/darkkirb.nix @@ -26,6 +26,7 @@ ../programs/keybase.nix ../programs/keepass.nix ../programs/kicad.nix + ../programs/vscode ../programs/misc.nix ../programs/mail.nix ../programs/kitty.nix diff --git a/config/programs/vscode/default.nix b/config/programs/vscode/default.nix new file mode 100644 index 00000000..720be5af --- /dev/null +++ b/config/programs/vscode/default.nix @@ -0,0 +1,93 @@ +{ + pkgs, + lib, + ... +}: { + programs.vscode = { + enable = true; + mutableExtensionsDir = true; + extensions = with pkgs.vscode-extensions; + [ + rust-lang.rust-analyzer + xaver.clang-format + github.vscode-pull-request-github + redhat.java + ] + ++ pkgs.vscode-utils.extensionsFromVscodeMarketplace (import ./extensions.nix).extensions; + userSettings = { + "diffEditor.codeLens" = true; + "editor.bracketPairColorization.enabled" = true; + "editor.cursorSmoothCaretAnimation" = true; + "editor.cursorSurroundingLines" = 3; + "editor.foldingImportsByDefault" = true; + "editor.fontFamily" = "'FiraCode Nerd Font Mono', 'Noto Sans Mono CJK', monospace"; + "editor.fontLigatures" = true; + "editor.formatOnPaste" = true; + "editor.formatOnSave" = true; + "editor.formatOnType" = true; + "editor.guides.bracketPairs" = true; + "editor.inlineSuggest.enabled" = true; + "editor.renderWhitespace" = "all"; + "editor.smoothScrolling" = true; + "editor.suggest.localityBonus" = true; + "editor.suggest.preview" = true; + "editor.suggest.shareSuggestSelections" = true; + "editor.tabCompletion" = "on"; + "editor.tabSize" = 2; + "editor.multiCursorModifier" = "ctrlCmd"; # Multi-Cursor won’t work otherwise + "explorer.experimental.fileNesting.enabled" = true; + "files.insertFinalNewline" = true; + "files.trimFinalNewlines" = true; + "files.trimTrailingWhitespace" = true; + "git.autoStash" = true; + "git.enableCommitSigning" = true; + "git.enableSmartCommit" = true; + "git.fetchOnPull" = true; + "git.rebaseWhenSync" = true; + "nix.enableLanguageServer" = true; + "nix.serverPath" = "${pkgs.rnix-lsp}/bin/rnix-lsp"; + "search.smartCase" = true; + "telemetry.telemetryLevel" = "off"; + "update.mode" = "none"; + "workbench.colorTheme" = "Monokai"; + "workbench.commandPalette.preserveInput" = true; + "workbench.iconTheme" = "material-icon-theme"; + "workbench.list.smoothScrolling" = true; + "C_Cpp.intelliSenseEngine" = "Disabled"; + "C_Cpp.autocomplete" = "Disabled"; + "C_Cpp.errorSquiggles" = "Disabled"; + "clang-tidy.executable" = "${pkgs.llvmPackages_latest.clang-unwrapped}/bin/clang-tidy"; + "cmake.cmakePath" = "${pkgs.cmake}/bin/cmake"; + "github.copilot.enable" = {"*" = true;}; + "crates.listPreReleases" = true; + "css.format.spaceAroundSelectorSeparator" = true; + "less.format.spaceAroundSelectorSeparator" = true; + "scss.format.spaceAroundSelectorSeparator" = true; + "vscode-dhall-lsp-server.executable" = "${pkgs.dhall-lsp-server}/bin/dhall-lsp-server"; + "doxdocgen.generic.useGitUserEmail" = true; + "doxdocgen.generic.useGitUserName" = true; + "git.confirmSync" = false; + "clangd.path" = "${pkgs.llvmPackages_latest.clang-unwrapped}/bin/clangd"; + "verilog.ctags.path" = "${pkgs.ctags}/bin/ctags"; + "verilog.languageServer" = "${pkgs.svls}/bin/svls"; + "verilog.linting.linter" = "${pkgs.verilator}/bin/verilator"; + "redhat.telemetry.enabled" = false; # FUCK OFF + }; + }; + home.activation.vscode-server = lib.hm.dag.entryAfter ["write-boundary"] '' + if test -f ~/.vscode-server; then + if test -f "~/.vscode/extensions"; then + if ! test -L "~/.vscode-server/extensions"; then + $DRY_RUN_CMD ln -s $VERBOSE_ARG ~/.vscode/extensions ~/.vscode-server/ + fi + fi + if test -f "~/vscode-server/bin"; then + for f in ~/.vscode-server/bin/*/node; do + if ! test -L $f; then + $DRY_RUN_CMD ln -sf $VERBOSE_ARG ${pkgs.nodejs}/bin/node $f + fi + done + fi + fi + ''; +} diff --git a/config/programs/vscode/extensions.nix b/config/programs/vscode/extensions.nix new file mode 100644 index 00000000..64d61c4f --- /dev/null +++ b/config/programs/vscode/extensions.nix @@ -0,0 +1,232 @@ +{ + extensions = [ + { + name = "vscode-openapi"; + publisher = "42Crunch"; + version = "4.11.4"; + sha256 = "10k5bb98jxdz248x6a8km62jx95lb4g00rp448mky88km9y3i1lm"; + } + { + name = "Nix"; + publisher = "bbenoist"; + version = "1.0.1"; + sha256 = "0zd0n9f5z1f0ckzfjr38xw2zzmcxg1gjrava7yahg5cvdcw6l35b"; + } + { + name = "direnv"; + publisher = "mkhl"; + version = "0.6.1"; + sha256 = "sha256-5/Tqpn/7byl+z2ATflgKV1+rhdqj+XMEZNbGwDmGwLQ="; + } + { + name = "pioasm"; + publisher = "chris-hock"; + version = "1.0.0"; + sha256 = "09p7cbk7hnhl9q4viscfy45fq1gv16xf0dm97s8hfpcz2w6fmw1q"; + } + { + name = "doxdocgen"; + publisher = "cschlosser"; + version = "1.4.0"; + sha256 = "1d95znf2vsdzv9jqiigh9zm62dp4m9jz3qcfaxn0n0pvalbiyw92"; + } + { + name = "dhall-lang"; + publisher = "dhall"; + version = "0.0.4"; + sha256 = "0sa04srhqmngmw71slnrapi2xay0arj42j4gkan8i11n7bfi1xpf"; + } + { + name = "vscode-dhall-lsp-server"; + publisher = "dhall"; + version = "0.0.4"; + sha256 = "1zin7s827bpf9yvzpxpr5n6mv0b5rhh3civsqzmj52mdq365d2js"; + } + { + name = "gitlens"; + publisher = "eamodio"; + version = "12.1.2"; + sha256 = "0wpmfrfpi6wl9v3dknx2qr2m74azpcw8bvhac21v67w6jxnl3jd9"; + } + { + name = "EditorConfig"; + publisher = "EditorConfig"; + version = "0.16.4"; + sha256 = "0fa4h9hk1xq6j3zfxvf483sbb4bd17fjl5cdm3rll7z9kaigdqwg"; + } + { + name = "copilot"; + publisher = "GitHub"; + version = "1.34.6280"; + sha256 = "05yh66zjgafas1svyjk73nibjnsfq6yvcb3sikkhr8s8d2dsdiy8"; + } + { + name = "vscode-test-explorer"; + publisher = "hbenl"; + version = "2.21.1"; + sha256 = "022lnkq278ic0h9ggpqcwb3x3ivpcqjimhgirixznq0zvwyrwz3w"; + } + { + name = "discord-vscode"; + publisher = "icrawl"; + version = "5.8.0"; + sha256 = "0r9n2g5rif4y2619wccjqh3pn9rljb3yhblz09pdksmfi2ifakr1"; + } + { + name = "better-cpp-syntax"; + publisher = "jeff-hykin"; + version = "1.15.19"; + sha256 = "13v1lqqfvgkf5nm89b39hci65fnz4j89ngkg9p103l1p1fhncr41"; + } + { + name = "nix-ide"; + publisher = "jnoortheen"; + version = "0.1.20"; + sha256 = "16mmivdssjky11gmih7zp99d41m09r0ii43n17d4i6xwivagi9a3"; + } + { + name = "rust-doc-viewer"; + publisher = "JScearcy"; + version = "3.0.2"; + sha256 = "08nrgy2h67w762plz5z8vbipcf3di7wzqn7b3bq72f5xgh96xwlw"; + } + { + name = "python"; + publisher = "ms-python"; + version = "2022.11.12031009"; + sha256 = "18wnb4cqk9c94fy0a9k35vn2p64hq1rax7mpi3diihm9wsaxfxrx"; + } + { + name = "remote-ssh"; + publisher = "ms-vscode-remote"; + version = "0.85.2022071315"; + sha256 = "195c22wvvw727li8wf0nhfpccgynx9sd48gzz39j8wxmi7qqvjli"; + } + { + name = "cmake-tools"; + publisher = "ms-vscode"; + version = "1.12.15"; + sha256 = "0mj3q655flczw0b2blj9alpyrqs75lhwpmk17z45009n14ri8j4n"; + } + { + name = "cpptools"; + publisher = "ms-vscode"; + version = "1.11.4"; + sha256 = "sha256-DE7IcpQhOnQtsb0DmJvUfrI2/OWJtuf+JqFkLRGkQtM="; + } + { + name = "cpptools-themes"; + publisher = "ms-vscode"; + version = "1.0.0"; + sha256 = "0nds0bx9zsnfgfqgpzlbd79wwnjnhsivf0qbnbiakhj2z8c0niqk"; + } + { + name = "test-adapter-converter"; + publisher = "ms-vscode"; + version = "0.1.6"; + sha256 = "0pj4ln8g8dzri766h9grdvhknz2mdzwv0lmzkpy7l9w9xx8jsbsh"; + } + { + name = "veriloghdl"; + publisher = "mshr-h"; + version = "1.5.4"; + sha256 = "1i8qcfx5v4d30gkyy00a4d8l6ss828va6lp69h9i1ynrgqzl85av"; + } + { + name = "clang-tidy"; + publisher = "notskm"; + version = "0.5.1"; + sha256 = "0z44hbrbzlhxbzf1j55xpl5fb7gic9avvcz4dvljrwz4qqdjzq4x"; + } + { + name = "cargo"; + publisher = "panicbit"; + version = "0.2.3"; + sha256 = "0idcbri4kpva0yxni0ql6l14knc3h6izxza5d49jidrh9xj0njh7"; + } + { + name = "material-icon-theme"; + publisher = "PKief"; + version = "4.19.0"; + sha256 = "1azkkp4bnd7n8v0m4325hfrr6p6ikid88xbxaanypji25pnyq5a4"; + } + { + name = "vscode-yaml"; + publisher = "redhat"; + version = "1.9.1"; + sha256 = "10m70sahl7vf8y82gqz9yk6bk4k4b923xn5rk7fax1nqw0pkln2w"; + } + { + name = "LiveServer"; + publisher = "ritwickdey"; + version = "5.7.5"; + sha256 = "0afjp8jr1s0f3ag0q8kw5d8cyd5fh6vzkfx2wdqq4pihm7ivp9xc"; + } + { + name = "scala"; + publisher = "scala-lang"; + version = "0.5.5"; + sha256 = "1gqgamm97sq09za8iyb06jf7hpqa2mlkycbx6zpqwvlwd3a92qr1"; + } + { + name = "crates"; + publisher = "serayuzgur"; + version = "0.5.10"; + sha256 = "1dbhd6xbawbnf9p090lpmn8i5gg1f7y8xk2whc9zhg4432kdv3vd"; + } + { + name = "signageos-vscode-sops"; + publisher = "signageos"; + version = "0.6.0"; + sha256 = "0naphf81r8nk32bvngxz6nw21sgbl99iqvn8rknja4kck686kv8r"; + } + { + name = "vscode-rust-test-adapter"; + publisher = "Swellaby"; + version = "0.11.0"; + sha256 = "111vhl71zzh4il1kh21l49alwlllzcvmdbsxyvk9bq3r24hxq1r2"; + } + { + name = "even-better-toml"; + publisher = "tamasfe"; + version = "0.16.5"; + sha256 = "01x4p1wxxdasabixqa9pifp93qgca38z8cb4qw8351a6qrg245d5"; + } + { + name = "cmake"; + publisher = "twxs"; + version = "0.0.17"; + sha256 = "11hzjd0gxkq37689rrr2aszxng5l9fwpgs9nnglq3zhfa1msyn08"; + } + { + name = "markdown-all-in-one"; + publisher = "yzhang"; + version = "3.4.3"; + sha256 = "0z0sdb5vmx1waln5k9fk6s6lj1pzpcm3hwm4xc47jz62iq8930m3"; + } + { + name = "vscode-java-debug"; + publisher = "vscjava"; + version = "0.42.0"; + sha256 = "sha256-Zk2sPws0LRdBzO1R7C1qp7z9Q3OX702JbpAKhWWO16U="; + } + { + name = "vscode-maven"; + publisher = "vscjava"; + version = "0.36.0"; + sha256 = "sha256-o8eWYF5J21WM6nXZ2kE6Blxv9svLYJTOi2ePqqQOGPg="; + } + { + name = "vscode-java-test"; + publisher = "vscjava"; + version = "0.35.2"; + sha256 = "sha256-uSy0Ao1qL3Vi+WRycd7Fw9R52lDjHpXOJFWIpNW1wUo="; + } + { + name = "vscode-java-dependency"; + publisher = "vscjava"; + version = "0.20.0"; + sha256 = "sha256-YD+TSpGaLMxLT38Fe/Xa46o+plepKKjYPLsyXBOvM3c="; + } + ]; +}