增加自动开发和配置

This commit is contained in:
skong 2024-01-10 22:58:48 +08:00
parent d33f9a460c
commit 0ca4aa6e1b
2 changed files with 302 additions and 0 deletions

30
.air.toml Normal file
View File

@ -0,0 +1,30 @@
root = "."
[build]
cmd = "make api && go build -o ./bin/ ./..."
args_bin = ["-conf", "./configs/config.yaml"]
delay = 1000
bin = "bin/manage"
exclude_dir = ["tmp", "bin", "api"]
log = "air.log"
stop_on_error = true
send_interrupt = false
kill_delay = 500 # ms
[restart]
delay = 1000
cmd = "./bin/manage -conf ./configs/config.yaml"
exclude_ext = [".tpl", ".log"]
include_ext = [".go", ".mod", ".sum", "api"]
[log]
time = false
[color]
main = "magenta"
watcher = "cyan"
build = "yellow"
runner = "green"
[misc]
clean_on_exit = true

272
.vscode/settings.json vendored Executable file
View File

@ -0,0 +1,272 @@
{
//
"editor.tokenColorCustomizations": {
"comments": {
"foreground": "#43827a"
}
},
//
"editor.emptySelectionClipboard": true,
//
"editor.mouseWheelZoom": true,
//
"files.associations": {
"*.js": "javascript",
"*.json": "jsonc",
"*.cjson": "jsonc",
"*.wxss": "css",
"*.wxs": "javascript",
"*.lua": "lua"
},
// //
// "files.exclude": {
// "**/.DS_Store": true,
// "**/.git": true,
// "**/.hg": true,
// "**/.svn": true,
// "**/CVS": true,
// "**/node_modules": false,
// "**/tmp": true
// },
// "background.customImages": [
// "file:///C:/Users/skong/Documents/BackGround.jpg"
// ],
// Todo Tree plugin config
"todo-tree.highlights.defaultHighlight": {
"type": "text",
"foreground": "#ffff00",
"background": "#aaa",
"opacity": 0.5,
"iconColour": "#ffff00",
"gutterIcon": true
},
//
"todo-tree.filtering.includeGlobs": ["**/manage/*/**"],
"todo-tree.highlights.customHighlight": {
"BUG": {
"icon": "bug",
"foreground": "#F56C6C",
"type": "line"
},
"FIXME": {
"icon": "flame",
"foreground": "#FF9800",
"type": "line"
},
"TODO": {
"foreground": "#FFEB38",
"type": "line"
},
"NOTE": {
"icon": "note",
"foreground": "#67C23A",
"type": "line"
},
"INFO": {
"icon": "info",
"foreground": "#909399",
"type": "line"
},
"TAG": {
"icon": "tag",
"foreground": "#409EFF",
"type": "line"
},
"HACK": {
"icon": "versions",
"foreground": "#E040FB",
"type": "line"
},
"XXX": {
"icon": "unverified",
"foreground": "#E91E63",
"type": "line"
}
},
"todo-tree.general.tags": [
"BUG",
"HACK",
"FIXME",
"TODO",
"INFO",
"NOTE",
"TAG",
"XXX"
],
"todo-tree.general.statusBar": "total",
"background.style": {
//
"content": "''",
"pointer-events": "none",
"position": "absolute",
"z-index": "99999",
"width": "100%",
"height": "100%",
"background-position": "100% 100%",
"background-repeat": "no-repeat",
"opacity": 0.1,
"background-size": "100%"
},
"editor.tabSize": 4,
"editor.fontWeight": "300",
"editor.tabCompletion": "on",
"editor.fontFamily": "Fira code, Consolas, JetBrains Moon", // Firacode , JetBrains Moon
"editor.minimap.enabled": true,
"javascript.format.semicolons": "remove",
// *.vue vetur
"[vue]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
},
//
"javascript.format.insertSpaceBeforeFunctionParenthesis": true,
"prettier.singleQuote": true,
"prettier.semi": false,
// react
// tab
"emmet.triggerExpansionOnTab": true,
"emmet.showAbbreviationSuggestions": true,
"emmet.includeLanguages": {
// jsx
"javascript": "javascriptreact",
"vue-html": "html",
"vue": "html",
"wxml": "html"
},
// end
"[jsonc]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
},
"security.workspace.trust.untrustedFiles": "open",
"git.ignoreMissingGitWarning": true,
"editor.suggest.snippetsPreventQuickSuggestions": false,
//
"editor.fontSize": 14,
"editor.suggestSelection": "recentlyUsedByPrefix",
// import
"files.encoding": "utf8",
"files.autoSave": "afterDelay",
"editor.lineNumbers": "on",
"editor.formatOnType": true,
"editor.formatOnSave": true,
"editor.formatOnPaste": true,
"editor.cursorStyle": "line-thin",
"editor.cursorSmoothCaretAnimation": "on",
"terminal.integrated.cursorStyle": "line",
"terminal.integrated.cursorBlinking": true,
"terminal.integrated.copyOnSelection": true,
"code-runner.clearPreviousOutput": true,
"code-runner.saveFileBeforeRun": true,
"code-runner.runInTerminal": true,
"explorer.confirmDelete": false,
"explorer.compactFolders": true,
"explorer.confirmDragAndDrop": false,
//
"editor.accessibilityPageSize": 700,
"editor.quickSuggestionsDelay": 80,
"editor.linkedEditing": true,
"editor.suggest.preview": true,
"editor.colorDecorators": true,
"editor.suggest.showColors": true,
"editor.guides.bracketPairs": true,
"editor.suggest.showSnippets": true,
"editor.snippets.codeActions.enabled": true,
"editor.bracketPairColorization.enabled": true,
"editor.cursorBlinking": "phase",
"editor.snippetSuggestions": "bottom",
"editor.scrollbar.horizontal": "visible",
"editor.autoClosingBrackets": "beforeWhitespace",
"editor.autoClosingQuotes": "beforeWhitespace",
"editor.selectionHighlight": true,
"editor.bracketPairColorization.independentColorPoolPerBracketType": true,
// terminal
"terminal.integrated.inheritEnv": false,
"terminal.integrated.enableMultiLinePasteWarning": false,
"terminal.integrated.defaultProfile.windows": "Command Prompt",
"terminal.integrated.fontFamily": " Consolas",
"workbench.startupEditor": "none",
"workbench.settings.editor": "json",
//
"files.eol": "\n",
"update.mode": "none",
"extensions.autoUpdate": true,
"extensions.ignoreRecommendations": false,
//
"remote.SSH.remotePlatform": {
"100.100.100.101": "linux",
"Docker-CentOS7": "linux",
"192.168.85.128": "linux",
"100.100.100.103": "linux",
"1.117.154.114": "linux",
"100.100.100.102": "linux",
"testkong.work": "linux",
"123.207.17.178": "linux",
"fromsko-screenshottocod-cavaxuxk8qy.vss.gitpod.io": "linux"
},
//
/* golang */
"go.useLanguageServer": true,
"go.formatTool": "goformat",
"[go.mod]": {
"editor.formatOnSave": true,
"editor.codeActionsOnSave": {
"source.organizeImports": true
}
},
/* python */
"[python]": {
"editor.formatOnType": true,
"editor.formatOnPaste": true,
"editor.rulers": [120]
},
"workbench.colorCustomizations": {
"editorRuler.foreground": "#ff1ea9"
},
"editor.rulers": [100],
// Git
"git.autofetch": true,
"git.confirmSync": false,
"git.enableSmartCommit": true,
"git.openRepositoryInParentFolders": "never",
"workbench.iconTheme": "material-icon-theme",
"go.toolsManagement.autoUpdate": true,
"javascript.updateImportsOnFileMove.enabled": "always",
"git.ignoreLegacyWarning": true,
"excalidraw.theme": "light",
"markdown.preview.breaks": true,
"editor.unicodeHighlight.includeStrings": false,
"editor.unicodeHighlight.allowedLocales": {
"ja": true
},
"workbench.editorAssociations": {
"*.sbt": "default"
},
"workbench.colorTheme": "One Dark Pro",
"remote.SSH.defaultExtensions": ["gitpod.gitpod-remote-ssh"],
"CodeGPT.model": "gpt-3.5-turbo",
"CodeGPT.query.language": "Chinese",
"CodeGPT.temperature": 0.5,
"CodeGPT.Autocomplete.maxTokens": 2000,
"CodeGPT.maxTokens": 3000,
"gopls": {
"ui.semanticTokens": true
},
"[proto3]": { "editor.defaultFormatter": "zxh404.vscode-proto3" },
"workbench.productIconTheme": "emoji-product-icons",
"dev.containers.executeInWSL": true,
"[html]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
},
"tabnine.experimentalAutoImports": true,
"window.zoomLevel": 1,
"[javascript]": {
"editor.defaultFormatter": "vscode.typescript-language-features"
},
"editor.codeActionsOnSave": {
"source.fixAll": true,
"source.organizeImports": true
},
"go.toolsEnvVars": {
"GOROOT": "/usr/local/go"
}
}