created gui dir
This commit is contained in:
17
users/richie/home/gui/vscode/default.nix
Normal file
17
users/richie/home/gui/vscode/default.nix
Normal file
@ -0,0 +1,17 @@
|
||||
{ config, pkgs, ... }:
|
||||
let
|
||||
vscode_dir = "/home/richie/projects/nix-dotfiles/users/richie/home/gui/vscode";
|
||||
in
|
||||
{
|
||||
# mutable symlinks to key binds and settings
|
||||
xdg.configFile."Code/User/settings.json".source = config.lib.file.mkOutOfStoreSymlink "${vscode_dir}/settings.json";
|
||||
xdg.configFile."Code/User/keybindings.json".source = config.lib.file.mkOutOfStoreSymlink "${vscode_dir}/keybindings.json";
|
||||
|
||||
home.packages = with pkgs; [ nil ];
|
||||
|
||||
programs.vscode = {
|
||||
enable = true;
|
||||
package = pkgs.vscode;
|
||||
mutableExtensionsDir = true;
|
||||
};
|
||||
}
|
45
users/richie/home/gui/vscode/extension_installer.py
Normal file
45
users/richie/home/gui/vscode/extension_installer.py
Normal file
@ -0,0 +1,45 @@
|
||||
from subprocess import run
|
||||
|
||||
|
||||
def main():
|
||||
extensions = (
|
||||
# vscode
|
||||
"ms-vscode-remote.remote-ssh",
|
||||
"ms-vscode-remote.remote-containers",
|
||||
"ms-azuretools.vscode-docker",
|
||||
"ms-vsliveshare.vsliveshare",
|
||||
"ms-vscode.hexeditor",
|
||||
"oderwat.indent-rainbow",
|
||||
"usernamehw.errorlens",
|
||||
"streetsidesoftware.code-spell-checker",
|
||||
"github.copilot",
|
||||
# git
|
||||
"eamodio.gitlens",
|
||||
"codezombiech.gitignore",
|
||||
# python
|
||||
"charliermarsh.ruff",
|
||||
"ms-python.python",
|
||||
"ms-python.vscode-pylance",
|
||||
# rust
|
||||
"rust-lang.rust-analyzer",
|
||||
# MD
|
||||
"yzhang.markdown-all-in-one",
|
||||
# configs
|
||||
"tamasfe.even-better-toml",
|
||||
"redhat.vscode-yaml",
|
||||
# shell
|
||||
"timonwong.shellcheck",
|
||||
"foxundermoon.shell-format",
|
||||
# nix
|
||||
"jnoortheen.nix-ide",
|
||||
# other
|
||||
"esbenp.prettier-vscode",
|
||||
"mechatroner.rainbow-csv",
|
||||
)
|
||||
|
||||
for extension in extensions:
|
||||
run(f"code --install-extension {extension} --force".split(), check=True)
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
main()
|
20
users/richie/home/gui/vscode/keybindings.json
Normal file
20
users/richie/home/gui/vscode/keybindings.json
Normal file
@ -0,0 +1,20 @@
|
||||
[
|
||||
{
|
||||
"key": "shift+alt+f",
|
||||
"command": "editor.action.formatDocument",
|
||||
"when": "editorHasDocumentFormattingProvider && editorTextFocus && !editorReadonly && !inCompositeEditor"
|
||||
},
|
||||
{
|
||||
"key": "alt+a d",
|
||||
"command": "cSpell.addWordToWorkspaceSettings"
|
||||
},
|
||||
{
|
||||
"key": "ctrl+shift+`",
|
||||
"command": "workbench.action.createTerminalEditor"
|
||||
},
|
||||
{
|
||||
"key": "ctrl+shift+`",
|
||||
"command": "-workbench.action.terminal.new",
|
||||
"when": "terminalProcessSupported || terminalWebExtensionContributedProfile"
|
||||
}
|
||||
]
|
69
users/richie/home/gui/vscode/settings.json
Normal file
69
users/richie/home/gui/vscode/settings.json
Normal file
@ -0,0 +1,69 @@
|
||||
{
|
||||
// vscode settings
|
||||
"editor.formatOnSave": true,
|
||||
"editor.minimap.renderCharacters": false,
|
||||
"editor.minimap.showSlider": "always",
|
||||
"explorer.confirmDelete": false,
|
||||
"explorer.confirmDragAndDrop": false,
|
||||
"files.autoSave": "afterDelay",
|
||||
"git.autofetch": true,
|
||||
"git.confirmSync": false,
|
||||
"git.fetchOnPull": true,
|
||||
"git.pruneOnFetch": true,
|
||||
"update.mode": "none",
|
||||
"workbench.colorTheme": "Default Dark+",
|
||||
|
||||
// turns off all sounds and announcements
|
||||
"accessibility.signals.terminalCommandFailed": {
|
||||
"sound": "off",
|
||||
"announcement": "off"
|
||||
},
|
||||
"accessibility.signals.terminalQuickFix": {
|
||||
"sound": "off",
|
||||
"announcement": "off"
|
||||
},
|
||||
"accessibility.signals.terminalBell": {
|
||||
"sound": "off",
|
||||
"announcement": "off"
|
||||
},
|
||||
|
||||
// formatters
|
||||
"[jsonc]": {
|
||||
"editor.defaultFormatter": "esbenp.prettier-vscode"
|
||||
},
|
||||
"[markdown]": {
|
||||
"editor.defaultFormatter": "esbenp.prettier-vscode"
|
||||
},
|
||||
"[yaml]": {
|
||||
"editor.defaultFormatter": "redhat.vscode-yaml"
|
||||
},
|
||||
"[python]": {
|
||||
"editor.defaultFormatter": "charliermarsh.ruff"
|
||||
},
|
||||
"[nix]": {
|
||||
"editor.defaultFormatter": "jnoortheen.nix-ide"
|
||||
},
|
||||
|
||||
// spell check
|
||||
"cSpell.enabled": true,
|
||||
"cSpell.language": "en,en-US",
|
||||
"cSpell.enableFiletypes": ["bat", "csv", "nix", "toml"],
|
||||
"cSpell.userWords": ["Cahill", "syncthing"],
|
||||
|
||||
// nix
|
||||
"nix.enableLanguageServer": true,
|
||||
"nix.serverPath": "nil",
|
||||
|
||||
// force the use of rust-analyzer from dev shell
|
||||
"rust-analyzer.server.path": "rust-analyzer",
|
||||
|
||||
// other
|
||||
"python.analysis.typeCheckingMode": "basic",
|
||||
"redhat.telemetry.enabled": true,
|
||||
"gitlens.plusFeatures.enabled": false,
|
||||
"github.copilot.editor.enableAutoCompletions": true,
|
||||
"explorer.confirmPasteNative": false,
|
||||
"github.copilot.enable": {
|
||||
"*": false
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user