created gui dir

This commit is contained in:
Richie Cahill
2024-06-09 10:29:30 -04:00
parent 5ec4863d2b
commit 8b87c80c79
8 changed files with 55 additions and 12 deletions

View 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;
};
}

View 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()

View 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"
}
]

View 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
}
}