This commit is contained in:
2025-04-25 23:10:55 +08:00
commit ccf46b865e
114 changed files with 6419 additions and 0 deletions

View File

@@ -0,0 +1,31 @@
{ pkgs, ... }:
{
imports = [
];
programs = {
vscode = {
enable = true;
profiles.default = {
extensions = with pkgs.vscode-extensions; [
bierner.markdown-mermaid
esbenp.prettier-vscode
foxundermoon.shell-format
github.copilot
github.copilot-chat
golang.go
jnoortheen.nix-ide
pkief.material-icon-theme
] ++ pkgs.vscode-utils.extensionsFromVscodeMarketplace [
];
userSettings = builtins.fromJSON (builtins.readFile ./settings.json);
};
};
};
home = {
file.".config/Code/User/keybindings.json" = {
source = ./keybindings.json;
};
};
}

View File

@@ -0,0 +1,69 @@
// Place your key bindings in this file to override the defaultsauto[]
[
{
"key": "shift+alt+f",
"command": "workbench.action.findInFiles"
},
{
"key": "ctrl+shift+f",
"command": "-workbench.action.findInFiles"
},
{
"key": "shift+alt+f",
"command": "workbench.action.terminal.searchWorkspace",
"when": "terminalFocus && terminalProcessSupported && terminalProcessSupported && terminalTextSelected"
},
{
"key": "ctrl+shift+f",
"command": "-workbench.action.terminal.searchWorkspace",
"when": "terminalFocus && terminalProcessSupported && terminalProcessSupported && terminalTextSelected"
},
{
"key": "shift+alt+f",
"command": "workbench.view.search",
"when": "!searchViewletVisible && config.search.mode == 'view'"
},
{
"key": "ctrl+shift+f",
"command": "-workbench.view.search",
"when": "!searchViewletVisible && config.search.mode == 'view'"
},
{
"key": "ctrl+shift+f",
"command": "editor.action.formatDocument",
"when": "editorHasDocumentFormattingProvider && editorTextFocus && !editorReadonly && !inCompositeEditor"
},
{
"key": "ctrl+shift+i",
"command": "-editor.action.formatDocument",
"when": "editorHasDocumentFormattingProvider && editorTextFocus && !editorReadonly && !inCompositeEditor"
},
{
"key": "ctrl+shift+f",
"command": "editor.action.formatDocument.none",
"when": "editorTextFocus && !editorHasDocumentFormattingProvider && !editorReadonly"
},
{
"key": "ctrl+shift+i",
"command": "-editor.action.formatDocument.none",
"when": "editorTextFocus && !editorHasDocumentFormattingProvider && !editorReadonly"
},
{
"key": "shift+alt+o",
"command": "workbench.action.gotoSymbol"
},
{
"key": "ctrl+shift+o",
"command": "-workbench.action.gotoSymbol"
},
{
"key": "ctrl+shift+o",
"command": "editor.action.organizeImports",
"when": "editorTextFocus && !editorReadonly && supportedCodeAction =~ /(\\s|^)source\\.organizeImports\\b/"
},
{
"key": "shift+alt+o",
"command": "-editor.action.organizeImports",
"when": "editorTextFocus && !editorReadonly && supportedCodeAction =~ /(\\s|^)source\\.organizeImports\\b/"
}
]

View File

@@ -0,0 +1,52 @@
{
"[css]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
},
"[html]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
},
"[javascript]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
},
"[json]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
},
"[jsonc]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
},
"[less]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
},
"[typescript]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
},
"[typescriptreact]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
},
"[vue]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
},
"[nix]": {
"editor.defaultFormatter": "jnoortheen.nix-ide"
},
"editor.formatOnPaste": false,
"editor.largeFileOptimizations": false,
"editor.tabSize": 4,
"editor.unicodeHighlight.allowedLocales": {
"zh-hans": true
},
"editor.unicodeHighlight.nonBasicASCII": false,
"explorer.confirmDelete": false,
"git.enableSmartCommit": true,
"javascript.updateImportsOnFileMove.enabled": "always",
"nix.formatterPath": "nixpkgs-fmt",
"security.workspace.trust.untrustedFiles": "open",
"terminal.integrated.fontFamily": "'Source Code Pro', 'JetBrainsMono Nerd Font'",
"terminal.integrated.tabs.location": "left",
"typescript.updateImportsOnFileMove.enabled": "always",
"workbench.iconTheme": "material-icon-theme",
"workbench.colorTheme": "Default Light Modern",
"augment.chat.userGuidelines": "Always response in 中文",
"augment.completions.enableAutomaticCompletions": true,
"editor.fontFamily": "'Droid Sans Mono', 'monospace', monospace, 'JetBrainsMono Nerd Font'"
}