diff --git a/user/home.nix b/user/home.nix index 5ec6f01..bd3edfc 100644 --- a/user/home.nix +++ b/user/home.nix @@ -4,6 +4,7 @@ ./waybar ./helix.nix ./kakoune + ./vscode ./fish ./firefox.nix ./hyprland.nix @@ -113,7 +114,6 @@ inputs.agenix.packages.x86_64-linux.default ## Programming - vscode # rustup docker-compose diff --git a/user/vscode/default.nix b/user/vscode/default.nix new file mode 100644 index 0000000..48851a0 --- /dev/null +++ b/user/vscode/default.nix @@ -0,0 +1,18 @@ +{ pkgs, config, ... }: { + + programs.vscode = { + enable = true; + package = pkgs.vscodium; + extensions = with pkgs.vscode-extensions; [ + jnoortheen.nix-ide + github.github-vscode-theme + rust-lang.rust-analyzer + ]; + }; + + home.file = { + "${config.home.homeDirectory}/.config/VSCodium/User/keybindings.json".source = config.lib.file.mkOutOfStoreSymlink "${config.home.homeDirectory}/projects/nixos-config/user/vscode/keybindings.json"; + "${config.home.homeDirectory}/.config/VSCodium/User/settings.json".source = config.lib.file.mkOutOfStoreSymlink "${config.home.homeDirectory}/projects/nixos-config/user/vscode/settings.json"; + "${config.home.homeDirectory}/.config/VSCodium/product.json".source = config.lib.file.mkOutOfStoreSymlink "${config.home.homeDirectory}/projects/nixos-config/user/vscode/product.json"; + }; +} diff --git a/user/vscode/keybindings.json b/user/vscode/keybindings.json new file mode 100644 index 0000000..dd039b4 --- /dev/null +++ b/user/vscode/keybindings.json @@ -0,0 +1,154 @@ +// Place your key bindings in this file to override the defaults +[ + { + "key": "e", + "command": "dance.select.down.jump", + "when": "editorTextFocus && dance.mode == 'normal'" + }, + { + "key": "j", + "command": "-dance.select.down.jump", + "when": "editorTextFocus && dance.mode == 'normal'" + }, + { + "key": "shift+e", + "command": "dance.select.down.extend", + "when": "editorTextFocus && dance.mode == 'normal'" + }, + { + "key": "shift+j", + "command": "-dance.select.down.extend", + "when": "editorTextFocus && dance.mode == 'normal'" + }, + { + "key": "i", + "command": "dance.select.up.jump", + "when": "editorTextFocus && dance.mode == 'normal'" + }, + { + "key": "k", + "command": "-dance.select.up.jump", + "when": "editorTextFocus && dance.mode == 'normal'" + }, + { + "key": "shift+i", + "command": "dance.select.up.extend", + "when": "editorTextFocus && dance.mode == 'normal'" + }, + { + "key": "shift+k", + "command": "-dance.select.up.extend", + "when": "editorTextFocus && dance.mode == 'normal'" + }, + { + "key": "n", + "command": "dance.select.left.jump", + "when": "editorTextFocus && dance.mode == 'normal'" + }, + { + "key": "h", + "command": "-dance.select.left.jump", + "when": "editorTextFocus && dance.mode == 'normal'" + }, + { + "key": "shift+n", + "command": "dance.select.left.extend", + "when": "editorTextFocus && dance.mode == 'normal'" + }, + { + "key": "shift+h", + "command": "-dance.select.left.extend", + "when": "editorTextFocus && dance.mode == 'normal'" + }, + { + "key": "o", + "command": "dance.select.right.jump", + "when": "editorTextFocus && dance.mode == 'normal'" + }, + { + "key": "l", + "command": "-dance.select.right.jump", + "when": "editorTextFocus && dance.mode == 'normal'" + }, + { + "key": "shift+o", + "command": "dance.select.right.extend", + "when": "editorTextFocus && dance.mode == 'normal'" + }, + { + "key": "shift+l", + "command": "-dance.select.right.extend", + "when": "editorTextFocus && dance.mode == 'normal'" + }, + { + "key": "s", + "command": "dance.modes.insert.before", + "when": "editorTextFocus && dance.mode == 'normal'" + }, + { + "key": "i", + "command": "-dance.modes.insert.before", + "when": "editorTextFocus && dance.mode == 'normal'" + }, + { + "key": "h", + "command": "dance.edit.newLine.below.insert", + "when": "editorTextFocus && dance.mode == 'normal'" + }, + { + "key": "o", + "command": "-dance.edit.newLine.below.insert", + "when": "editorTextFocus && dance.mode == 'normal'" + }, + { + "key": "alt+h", + "command": "dance.edit.newLine.below", + "when": "editorTextFocus && dance.mode == 'normal'" + }, + { + "key": "alt+o", + "command": "-dance.edit.newLine.below", + "when": "editorTextFocus && dance.mode == 'normal'" + }, + { + "key": "shift+h", + "command": "dance.edit.newLine.above.insert", + "when": "editorTextFocus && dance.mode == 'normal'" + }, + { + "key": "shift+o", + "command": "-dance.edit.newLine.above.insert", + "when": "editorTextFocus && dance.mode == 'normal'" + }, + { + "key": "shift+alt+h", + "command": "dance.edit.newLine.above", + "when": "editorTextFocus && dance.mode == 'normal'" + }, + { + "key": "shift+alt+o", + "command": "-dance.edit.newLine.above", + "when": "editorTextFocus && dance.mode == 'normal'" + }, + { + "key": "l", + "command": "dance.search.next", + "when": "editorTextFocus && dance.mode == 'normal'" + }, + { + "key": "n", + "command": "-dance.search.next", + "when": "editorTextFocus && dance.mode == 'normal'" + }, + { + "key": "shift+l", + "command": "dance.search.next.add", + "when": "editorTextFocus && dance.mode == 'normal'" + }, + { + "key": "shift+n", + "command": "-dance.search.next.add", + "when": "editorTextFocus && dance.mode == 'normal'" + } + +] \ No newline at end of file diff --git a/user/vscode/product.json b/user/vscode/product.json new file mode 100644 index 0000000..04194a2 --- /dev/null +++ b/user/vscode/product.json @@ -0,0 +1,8 @@ +{ + "extensionsGallery": { + "serviceUrl": "https://marketplace.visualstudio.com/_apis/public/gallery", + "itemUrl": "https://marketplace.visualstudio.com/items", + "cacheUrl": "https://vscode.blob.core.windows.net/gallery/index", + "controlUrl": "" + } +} \ No newline at end of file diff --git a/user/vscode/settings.json b/user/vscode/settings.json new file mode 100644 index 0000000..972f581 --- /dev/null +++ b/user/vscode/settings.json @@ -0,0 +1,8 @@ +{ + "terminal.integrated.sendKeybindingsToShell": true, + "window.titleBarStyle": "custom", + "workbench.preferredDarkColorTheme": "GitHub Dark", + "workbench.preferredLightColorTheme": "GitHub Light", + "window.autoDetectColorScheme": true, + "workbench.colorTheme": "GitHub Light", +} \ No newline at end of file