diff --git a/modules/home/vscode/default.nix b/modules/home/vscode/default.nix index 130de61..e70ea85 100644 --- a/modules/home/vscode/default.nix +++ b/modules/home/vscode/default.nix @@ -1,7 +1,10 @@ {pkgs, ...}: { programs.vscode = { enable = true; - package = pkgs.vscode.fhsWithPackages (ps: with ps; [rustup zlib openssl.dev pkg-config]); + package = + if pkgs.hostPlatform.isDarwin + then pkgs.vscode + else pkgs.vscode.fhsWithPackages (ps: with ps; [rustup zlib openssl.dev pkg-config]); extensions = with pkgs.vscode-extensions; [ bbenoist.nix @@ -15,32 +18,40 @@ vscodevim.vim ]; - keybindings = [ - { - key = "shift+k"; - command = "editor.action.showHover"; - when = "editorTextFocus"; - } - { - key = "ctrl+k ctrl+i"; - command = "-editor.action.showHover"; - when = "editorTextFocus"; - } - ]; - userSettings = { "files.autoSave" = "afterDelay"; "editor.fontFamily" = "Maple Mono NF"; "editor.fontLigatures" = true; - "editor.fontSize" = 16; + "editor.fontSize" = + if pkgs.hostPlatform.isDarwin + then 14 + else 16; "editor.formatOnSave" = true; "editor.minimap.enabled" = false; + "git.autofetch" = true; + "git.confirmSync" = false; + "git.enableSmartCommit" = true; + "vim.camelCaseMotion.enable" = true; "vim.smartRelativeLine" = false; "vim.sneak" = true; "vim.useSystemClipboard" = true; + "vim.normalModeKeyBindingsNonRecursive" = [ + { + before = ["K"]; + commands = ["editor.action.showHover"]; + silent = true; + } + ]; + + "mesonbuild.downloadLanguageServer" = true; + + "terminal.integrated.fontSize" = + if pkgs.hostPlatform.isDarwin + then 14 + else 16; "workbench.colorTheme" = "Catppuccin Mocha"; "workbench.iconTheme" = "catppuccin-mocha";