From 601ccbaf14375702dfd9d2a11d6b9dfbf1e96964 Mon Sep 17 00:00:00 2001 From: Anthony Axenov Date: Wed, 12 Nov 2025 19:03:13 +0800 Subject: [PATCH] vscode --- .gitignore | 7 + vscode/.config/Code/User/keybindings.json | 260 ++++++++++++++++ vscode/.config/Code/User/settings.json | 289 ++++++++++++++++++ vscode/.config/Code/User/snippets/css.json | 15 + .../Code/User/snippets/global.code-snippets | 32 ++ .../Code/User/snippets/shellscript.json | 96 ++++++ 6 files changed, 699 insertions(+) create mode 100644 .gitignore create mode 100644 vscode/.config/Code/User/keybindings.json create mode 100644 vscode/.config/Code/User/settings.json create mode 100644 vscode/.config/Code/User/snippets/css.json create mode 100644 vscode/.config/Code/User/snippets/global.code-snippets create mode 100644 vscode/.config/Code/User/snippets/shellscript.json diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..858d2f3 --- /dev/null +++ b/.gitignore @@ -0,0 +1,7 @@ +*.backup +*.bak +*.log +*._ +*.tmp +*.tmp* +*.vscdb diff --git a/vscode/.config/Code/User/keybindings.json b/vscode/.config/Code/User/keybindings.json new file mode 100644 index 0000000..fbd6e39 --- /dev/null +++ b/vscode/.config/Code/User/keybindings.json @@ -0,0 +1,260 @@ +[ + { + "key": "tab", + "command": "editor.action.indentLines", + "when": "editorHasSelection && editorTextFocus && !hasOtherSuggestions && !inSnippetMode && !suggestWidgetVisible" + }, + { + "key": "ctrl+]", + "command": "-editor.action.indentLines", + "when": "editorTextFocus && !editorReadonly" + }, + { + "key": "ctrl+shift+k ctrl+shift+l", + "command": "workbench.action.editor.changeLanguageMode" + }, + { + "key": "ctrl+k m", + "command": "-workbench.action.editor.changeLanguageMode" + }, + { + "key": "ctrl+shift+k ctrl+shift+m", + "command": "workbench.action.editor.changeEncoding" + }, + { + "key": "ctrl+shift+d", + "command": "editor.action.insertCursorAtEndOfEachLineSelected", + "when": "editorTextFocus" + }, + { + "key": "shift+alt+i", + "command": "-editor.action.insertCursorAtEndOfEachLineSelected", + "when": "editorTextFocus" + }, + { + "key": "ctrl+alt+s", + "command": "workbench.action.openSettings" + }, + { + "key": "ctrl+,", + "command": "-workbench.action.openSettings" + }, + { + "key": "ctrl+numpad_subtract", + "command": "-workbench.action.zoomOut" + }, + { + "key": "ctrl+numpad_add", + "command": "-workbench.action.zoomIn" + }, + { + "key": "ctrl+numpad_subtract", + "command": "editor.fold", + "when": "editorTextFocus && foldingEnabled" + }, + { + "key": "ctrl+shift+[", + "command": "-editor.fold", + "when": "editorTextFocus && foldingEnabled" + }, + { + "key": "ctrl+numpad_add", + "command": "editor.unfold", + "when": "editorTextFocus && foldingEnabled" + }, + { + "key": "ctrl+shift+]", + "command": "-editor.unfold", + "when": "editorTextFocus && foldingEnabled" + }, + { + "key": "ctrl+shift+numpad_subtract", + "command": "editor.foldRecursively", + "when": "editorTextFocus && foldingEnabled" + }, + { + "key": "ctrl+k ctrl+[", + "command": "-editor.foldRecursively", + "when": "editorTextFocus && foldingEnabled" + }, + { + "key": "ctrl+shift+numpad_add", + "command": "editor.unfoldRecursively", + "when": "editorTextFocus && foldingEnabled" + }, + { + "key": "ctrl+k ctrl+]", + "command": "-editor.unfoldRecursively", + "when": "editorTextFocus && foldingEnabled" + }, + { + "key": "ctrl+q", + "command": "-workbench.action.quit" + }, + { + "key": "ctrl+shift+down", + "command": "-editor.action.insertCursorBelow", + "when": "editorTextFocus" + }, + { + "key": "ctrl+shift+up", + "command": "-editor.action.insertCursorAbove", + "when": "editorTextFocus" + }, + { + "key": "ctrl+shift+down", + "command": "editor.action.moveLinesDownAction", + "when": "editorTextFocus && !editorReadonly" + }, + { + "key": "alt+down", + "command": "-editor.action.moveLinesDownAction", + "when": "editorTextFocus && !editorReadonly" + }, + { + "key": "ctrl+shift+up", + "command": "editor.action.moveLinesUpAction", + "when": "editorTextFocus && !editorReadonly" + }, + { + "key": "alt+up", + "command": "-editor.action.moveLinesUpAction", + "when": "editorTextFocus && !editorReadonly" + }, + { + "key": "ctrl+r", + "command": "-workbench.action.openRecent" + }, + { + "key": "ctrl+r", + "command": "editor.action.startFindReplaceAction", + "when": "editorFocus || editorIsOpen" + }, + { + "key": "ctrl+h", + "command": "-editor.action.startFindReplaceAction", + "when": "editorFocus || editorIsOpen" + }, + { + "key": "shift+f6", + "command": "editor.action.refactor", + "when": "editorHasCodeActionsProvider && editorTextFocus && !editorReadonly" + }, + { + "key": "ctrl+shift+r", + "command": "-editor.action.refactor", + "when": "editorHasCodeActionsProvider && editorTextFocus && !editorReadonly" + }, + { + "key": "ctrl+shift+r", + "command": "-rerunSearchEditorSearch", + "when": "inSearchEditor" + }, + { + "key": "ctrl+shift+r", + "command": "workbench.action.replaceInFiles" + }, + { + "key": "ctrl+shift+h", + "command": "-workbench.action.replaceInFiles" + }, + { + "key": "ctrl+shift+l", + "command": "-editor.action.selectHighlights", + "when": "editorFocus" + }, + { + "key": "alt+d", + "command": "editor.action.selectHighlights" + }, + { + "key": "ctrl+shift+b", + "command": "-workbench.action.tasks.build", + "when": "taskCommandsRegistered" + }, + { + "key": "ctrl+shift+b", + "command": "git.checkout" + }, + { + "key": "ctrl+q", + "command": "editor.action.showDefinitionPreviewHover" + }, + { + "key": "ctrl+shift+/", + "command": "editor.action.blockComment", + "when": "editorTextFocus && !editorReadonly" + }, + { + "key": "ctrl+shift+a", + "command": "-editor.action.blockComment", + "when": "editorTextFocus && !editorReadonly" + }, + { + "key": "ctrl+shift+p", + "command": "workbench.action.showCommands" + }, + { + "key": "ctrl+shift+p", + "command": "-workbench.action.showCommands" + }, + { + "key": "alt+f12", + "command": "workbench.action.terminal.toggleTerminal", + "when": "terminal.active" + }, + { + "key": "ctrl+`", + "command": "-workbench.action.terminal.toggleTerminal", + "when": "terminal.active" + }, + { + "key": "alt+right", + "command": "editor.action.inlineSuggest.acceptNextWord", + "when": "editorTextFocus && inlineSuggestionVisible" + }, + { + "key": "meta+right", + "command": "-editor.action.inlineSuggest.acceptNextWord", + "when": "editorTextFocus && inlineSuggestionVisible" + }, + { + "key": "ctrl+o", + "command": "workbench.action.files.openFile" + }, + { + "key": "ctrl+o", + "command": "-workbench.action.files.openFile", + "when": "true" + }, + { + "key": "ctrl+o", + "command": "-workbench.action.files.openFileFolder", + "when": "isMacNative && openFolderWorkspaceSupport" + }, + { + "key": "ctrl+o", + "command": "-workbench.action.files.openFolderViaWorkspace", + "when": "!openFolderWorkspaceSupport && workbenchState == 'workspace'" + }, + { + "key": "ctrl+p ctrl+p", + "command": "workbench.profiles.actions.switchProfile" + }, + { + "key": "f4", + "command": "git.openFile" + }, + { + "key": "ctrl+e", + "command": "workbench.action.openRecent" + }, + { + "key": "alt+space", + "command": "localaipilot.codeComplete" + }, + { + "key": "shift+alt+w", + "command": "-localaipilot.codeComplete" + } +] diff --git a/vscode/.config/Code/User/settings.json b/vscode/.config/Code/User/settings.json new file mode 100644 index 0000000..a95e7e7 --- /dev/null +++ b/vscode/.config/Code/User/settings.json @@ -0,0 +1,289 @@ +{ + //---------------------------------------------------------------- + // appearence + //---------------------------------------------------------------- + + "workbench.colorTheme": "Atom One Dark", + "workbench.preferredDarkColorTheme": "Atom One Dark", + "workbench.iconTheme": "material-icon-theme", + // "workbench.tree.indent": 10, + "workbench.tree.renderIndentGuides": "always", + "workbench.view.alwaysShowHeaderActions": true, + "workbench.editor.alwaysShowEditorActions": true, + "workbench.colorCustomizations": { + "editor.lineHighlightBackground": "#1073cf2d", + // "editor.lineHighlightBorder": "#9fced11f", + "editorGhostText.foreground": "#7A8E96" + }, + + "editor.fontFamily": "'JetBrainsMono Nerd Font', 'DejaVu Sans Mono', 'Liberation Mono', 'Noto Mono', 'Ubuntu Mono', 'Droid Sans Mono', 'Droid Sans Fallback', monospace", + "editor.fontSize": 13, + "editor.fontLigatures": true, + "editor.lineHeight": 1.75, + "editor.cursorBlinking": "smooth", + "editor.inlineSuggest.showToolbar": "always", + "editor.mouseWheelZoom": true, + "editor.minimap.maxColumn": 150, + "editor.minimap.renderCharacters": false, + "editor.minimap.showSlider": "always", + + "window.title": "${dirty}${activeEditorShort}${separator}${rootName}${separator}${appName}", + "window.titleSeparator": " | ", + "chat.commandCenter.enabled": false, + "window.enableMenuBarMnemonics": false, + "window.restoreFullscreen": true, + "window.newWindowProfile": "По умолчанию", + "window.customTitleBarVisibility": "auto", + "window.commandCenter": false, + "window.menuBarVisibility": "compact", + + "debug.toolBarLocation": "docked", + "testing.coverageToolbarEnabled": true, + + "material-icon-theme.opacity": 0.8, + + "statusbar_command.applicationCommands": [ + { + "text": "$(arrow-left)", + "tooltip": "Назад", + "id": "nav-back", + "name": "Назад", + "priority": 1, + "alignment": "left", + "command": "workbench.action.navigateBack" + }, + { + "text": "$(arrow-right)", + "tooltip": "Вперёд", + "id": "nav-forw", + "name": "Вперёд", + "priority": 1, + "alignment": "left", + "command": "workbench.action.navigateForward" + } + ], + + //---------------------------------------------------------------- + // workbench + //---------------------------------------------------------------- + + "workbench.startupEditor": "newUntitledFile", + "workbench.editor.empty.hint": "hidden", + "workbench.editor.pinnedTabsOnSeparateRow": true, + "workbench.editor.revealIfOpen": true, + "workbench.editor.enablePreview": false, + "workbench.editor.defaultBinaryEditor": "hexEditor.hexedit", + // "workbench.editor.historyBasedLanguageDetection": true, + + //---------------------------------------------------------------- + // editor + //---------------------------------------------------------------- + + // "breadcrumbs.enabled": false, + + "editor.showFoldingControls": "always", + "editor.renderControlCharacters": true, + "editor.wordWrap": "off", + "editor.inlayHints.enabled": "off", + "editor.selectionClipboard": false, + "editor.defaultFormatter": "esbenp.prettier-vscode", + "editor.scrollbar.horizontal": "hidden", + "editor.scrollbar.vertical": "hidden", + "editor.foldingImportsByDefault": true, + "editor.unicodeHighlight.nonBasicASCII": false, + "editor.inlineSuggest.syntaxHighlightingEnabled": true, + "editor.quickSuggestions": { + "comments": "on", + "strings": "on", + "other": "on" + }, + + //---------------------------------------------------------------- + // terminal + //---------------------------------------------------------------- + + "terminal.integrated.fontFamily": "Jetbrains Mono, MesloLGS NF, Ubuntu Mono", + "terminal.integrated.fontSize": 13, + "terminal.integrated.cursorStyle": "line", + "terminal.integrated.defaultProfile.linux": "zsh", + "terminal.integrated.cursorBlinking": true, + "terminal.integrated.mouseWheelZoom": false, + "terminal.integrated.scrollback": 1000000, + "terminal.integrated.enableImages": true, + "terminal.integrated.fontLigatures": true, + "terminal.integrated.shellIntegration.enabled": false, + "terminal.integrated.tabs.focusMode": "singleClick", + "terminal.integrated.tabs.location": "left", + + //---------------------------------------------------------------- + // files + //---------------------------------------------------------------- + + "explorer.confirmDelete": false, + "explorer.confirmDragAndDrop": false, + "explorer.expandSingleFolderWorkspaces": false, + "explorer.fileNesting.enabled": true, + + "files.autoSave": "onFocusChange", + "files.insertFinalNewline": true, + "files.trimTrailingWhitespace": true, + "files.associations": { + "*.inc": "php", + "*.desktop": "ini", + "*.env": "env", + ".env.*": "env", + }, + "files.exclude": { + "**/.git": false + }, + "[markdown]": { + "files.trimTrailingWhitespace": false + }, + "[lua]": { + "editor.defaultFormatter": "sumneko.lua" + }, + "[xml]": { + "editor.defaultFormatter": "DotJoshJohnson.xml" + }, + "[json]": { + "editor.defaultFormatter": "vscode.json-language-features" + }, + // "[awk]": { + // "editor.semanticHighlighting.enabled": true + // } + + //---------------------------------------------------------------- + // git + //---------------------------------------------------------------- + + "git.allowForcePush": true, + "git.allowNoVerifyCommit": true, + "git.autofetch": true, + "git.autoStash": true, + "git.enableCommitSigning": true, + "git.inputValidationSubjectLength": null, + "git.confirmSync": false, + "git.branchProtection": [ + "master", + "develop", + "dev", + ], + + "gitPrefix.replacement": "$1: ", + + "gitlens.showWelcomeOnInstall": false, + "gitlens.views.repositories.files.layout": "tree", + + //---------------------------------------------------------------- + // docker + //---------------------------------------------------------------- + + "docker.volumes.groupBy": "CreatedTime", + + //---------------------------------------------------------------- + // diffs + //---------------------------------------------------------------- + + "merge-conflict.autoNavigateNextConflict.enabled": true, + + "diffEditor.experimental.showMoves": true, + "diffEditor.ignoreTrimWhitespace": false, + "diffEditor.renderSideBySide": true, + "diffEditor.wordWrap": "off", + "diffEditor.hideUnchangedRegions.enabled": true, + + "partialDiff.commandsOnContextMenu": { + "markSection1": true, + "markSection2AndTakeDiff": true, + "diffSelectionWithClipboard": false, + "diffVisibleEditors": true, + "togglePreComparisonTextNormalizationRules": false + }, + + //---------------------------------------------------------------- + // other + //---------------------------------------------------------------- + + "telemetry.telemetryLevel": "error", + "security.workspace.trust.untrustedFiles": "open", + + //---------------------------------------------------------------- + // php + //---------------------------------------------------------------- + + "php.suggest.basic": true, + "php.validate.enable": true, + "php.validate.run": "onType", + "php.completion.autoimport-docblock": "auto-import", + "php.debug.port": [ + "9003", + "9000" + ], + "php.linkedEditing.variables": true, + "php.problems.excludeGitIgnore": true, + "php.format.rules.arrayInitializersAlignKeyValuePairs": false, + + //---------------------------------------------------------------- + // golang + //---------------------------------------------------------------- + + "go.toolsManagement.autoUpdate": true, + + //---------------------------------------------------------------- + // shell + //---------------------------------------------------------------- + + "bashIde.highlightParsingErrors": true, + + //---------------------------------------------------------------- + // ai assistance + //---------------------------------------------------------------- + + "gigacode.common.contextManager": true, + "gigacode.maxSuggestions": 5, + + //---------------------------------------------------------------- + // unsorted + //---------------------------------------------------------------- + + "extensions.ignoreRecommendations": true, + + "prettier.tabWidth": 4, + "prettier.semi": false, + "prettier.singleQuote": true, + "prettier.printWidth": 120, + "prettier.arrowParens": "avoid", + + "autoscroll.autoEnableForLogs": true, + + "nginx-conf-hint.format.align": true, + "nginx-conf-hint.syntax": "sublime", + + "emmet.excludeLanguages": [ + "markdown", + "php" + ], + "redhat.telemetry.enabled": true, + "markdown.extension.toc.unorderedList.marker": "*", + "markdown.extension.toc.levels": "2..4", + "window.customMenuBarAltFocus": false, + "githubLocalActions.workflowsDirectory": ".gitea/workflows", + "privy.model": "custom", + "privy.syntaxHighlighting.useVisualStudioCodeColors": true, + "docker.extension.enableComposeLanguageServer": false, + "[dockercompose]": { + "editor.insertSpaces": true, + "editor.tabSize": 2, + "editor.autoIndent": "advanced", + "editor.defaultFormatter": "redhat.vscode-yaml" + }, + "[github-actions-workflow]": { + "editor.defaultFormatter": "redhat.vscode-yaml" + }, + "kilo-code.allowedCommands": [ + "git log", + "git diff", + "git show" + ], + "kilo-code.deniedCommands": [] +} diff --git a/vscode/.config/Code/User/snippets/css.json b/vscode/.config/Code/User/snippets/css.json new file mode 100644 index 0000000..c6b1fce --- /dev/null +++ b/vscode/.config/Code/User/snippets/css.json @@ -0,0 +1,15 @@ +{ + // Place your snippets for css here. Each snippet is defined under a snippet name and has a prefix, body and + // description. The prefix is what is used to trigger the snippet and the body will be expanded and inserted. Possible variables are: + // $1, $2 for tab stops, $0 for the final cursor position, and ${1:label}, ${2:another} for placeholders. Placeholders with the + // same ids are connected. + // Example: + // "Print to console": { + // "prefix": "log", + // "body": [ + // "console.log('$1');", + // "$2" + // ], + // "description": "Log output to console" + // } +} \ No newline at end of file diff --git a/vscode/.config/Code/User/snippets/global.code-snippets b/vscode/.config/Code/User/snippets/global.code-snippets new file mode 100644 index 0000000..1242f6a --- /dev/null +++ b/vscode/.config/Code/User/snippets/global.code-snippets @@ -0,0 +1,32 @@ +{ + // Place your GLOBAL snippets here. Each snippet is defined under a snippet name and has a scope, prefix, body and + // description. Add comma separated ids of the languages where the snippet is applicable in the scope field. If scope + // is left empty or omitted, the snippet gets applied to all languages. The prefix is what is + // used to trigger the snippet and the body will be expanded and inserted. Possible variables are: + // $1, $2 for tab stops, $0 for the final cursor position, and ${1:label}, ${2:another} for placeholders. + // Placeholders with the same ids are connected. + // Example: + // "Print to console": { + // "scope": "javascript,typescript", + // "prefix": "log", + // "body": [ + // "console.log('$1');", + // "$2" + // ], + // "description": "Log output to console" + // } + "One line TODO": { + "prefix": ["todo", "туду", "nele", "ещвщ"], + "body": [ + "${LINE_COMMENT} TODO: ${0}", + ], + }, + "Muliline TODO": { + "prefix": ["todom", "тудум", "nelev", "ещвщм"], + "body": [ + "${BLOCK_COMMENT_START}", + "${LINE_COMMENT} TODO: ${0}", + "${BLOCK_COMMENT_END}" + ], + } +} diff --git a/vscode/.config/Code/User/snippets/shellscript.json b/vscode/.config/Code/User/snippets/shellscript.json new file mode 100644 index 0000000..fcb30bf --- /dev/null +++ b/vscode/.config/Code/User/snippets/shellscript.json @@ -0,0 +1,96 @@ +{ + "DocBlock": { + "description": "Комментарий для функции", + "prefix": ["doc", "док", "вщс", "ljr"], + "body": [ + "", + "${LINE_COMMENT}purpose\t${1}", + "${LINE_COMMENT}argument\t\\$1 - ${2}", + "${LINE_COMMENT}exitcode\t0 - ${3}", + "${LINE_COMMENT}returns\t${4}", + "${LINE_COMMENT}usage\t\t${0}", + ], + }, + "Condition: if": { + "description": "Условие (простое)", + "prefix": ["if", "ша"], + "body": [ + "if ${1}; then", + " ${0}", + "fi", + ], + }, + "Condition: if []": { + "description": "Условие (со скобками [])", + "prefix": ["if2", "ша"], + "body": [ + "if [ ${1} ]; then", + " ${0}", + "fi", + ], + }, + "Condition: if [[]]": { + "description": "Условие (со скобками [[]])", + "prefix": ["if3", "ша"], + "body": [ + "if [[ ${1} ]]; then", + " ${0}", + "fi", + ], + }, + "Condition: if ... else ...": { + "description": "Условие (с двумя ветками)", + "prefix": ["ifel", "шауд"], + "body": [ + "if [ ${1} ]; then", + " ${2}", + "else", + " ${0}", + "fi", + ], + }, + "Loop: for": { + "description": "Цикл по счётчику", + "prefix": ["for", "ащк"], + "body": [ + "for ((idx=${1:0}; idx<${2:\\$limit}; ++idx)) do", + " ${0}", + "done", + ], + }, + "Loop: for in": { + "description": "Цикл по массиву", + "prefix": ["forin", "ащкшт"], + "body": [ + "for var in \"${${1:array}[@]}\"; do", + " ${0:}", + "done", + ], + }, + "Loop: while": { + "description": "Цикл", + "prefix": ["while", "цршду"], + "body": [ + "while ${1:true}; do", + " ${0}", + "done" + ], + }, + "Function": { + "description": "Функция", + "prefix": ["func", "агтс"], + "body": [ + "${1:myfunc}() {", + " ${0}", + "}" + ], + }, + "Hashbang": { + "description": "Hashbang", + "prefix": ["bb", "#!"], + "body": [ + "#!/usr/bin/env bash" + ], + + } +}