diff --git a/.editorconfig b/.editorconfig new file mode 100644 index 000000000..6f334024f --- /dev/null +++ b/.editorconfig @@ -0,0 +1,44 @@ +# EditorConfig is awesome: https://EditorConfig.org + +# top-most EditorConfig file +root = true + +# Unix-style newlines with a newline ending every file +[*] +end_of_line = lf +insert_final_newline = true +trim_trailing_whitespace = true +charset = utf-8 +indent_style = space +indent_size = 4 +max_line_length = 100 + +# Python specific settings +[*.py] +indent_style = space +indent_size = 4 + +# JavaScript and TypeScript specific settings +[*.{js,ts,jsx,tsx}] +indent_style = space +indent_size = 2 + +# JSON and YAML files +[*.{json,yml,yaml}] +indent_style = space +indent_size = 2 + +# Markdown files +[*.md] +trim_trailing_whitespace = false +max_line_length = off + +# Shell scripts +[*.sh] +indent_style = space +indent_size = 2 +end_of_line = lf + +# Makefiles require tabs +[Makefile] +indent_style = tab diff --git a/.vscode/settings.json.template b/.vscode/settings.json.template index e622f0e48..fe46b99f2 100644 --- a/.vscode/settings.json.template +++ b/.vscode/settings.json.template @@ -1,9 +1,72 @@ { - "editor.formatOnSave": true, - "[python]": { - "editor.defaultFormatter": "charliermarsh.ruff", - "editor.codeActionsOnSave": { - "source.fixAll": true - } + // Editor settings + "editor.rulers": [100], + "editor.tabSize": 4, + "editor.insertSpaces": true, + "editor.detectIndentation": true, + "editor.renderWhitespace": "boundary", + "editor.wordWrap": "off", + "editor.cursorBlinking": "solid", + "editor.cursorStyle": "line", + "editor.cursorSmoothCaretAnimation": "on", + "editor.multiCursorModifier": "alt", + "editor.formatOnSave": true, + "editor.formatOnPaste": false, + "editor.suggestSelection": "first", + "editor.acceptSuggestionOnEnter": "smart", + "editor.bracketPairColorization.enabled": true, + "editor.guides.bracketPairs": true, + "editor.guides.indentation": true, + + // File settings + "files.insertFinalNewline": true, + "files.trimTrailingWhitespace": true, + "files.eol": "\n", + "files.exclude": { + "**/__pycache__": true, + "**/.pytest_cache": true, + "**/.mypy_cache": true, + "**/*.pyc": true, + "**/.DS_Store": true + }, + + // Python settings + "[python]": { + "editor.defaultFormatter": "charliermarsh.ruff", + "editor.codeActionsOnSave": { + "source.fixAll": true } + }, + "python.linting.enabled": true, + "python.linting.pylintEnabled": true, + "python.linting.mypyEnabled": true, + "python.linting.flake8Enabled": true, + + // TypeScript/JavaScript settings + "[typescript]": { + "editor.tabSize": 2, + "editor.defaultFormatter": "esbenp.prettier-vscode" + }, + "[javascript]": { + "editor.tabSize": 2, + "editor.defaultFormatter": "esbenp.prettier-vscode" + }, + "[json]": { + "editor.tabSize": 2, + "editor.defaultFormatter": "esbenp.prettier-vscode" + }, + "[yaml]": { + "editor.tabSize": 2 + }, + + // Terminal settings + "terminal.integrated.cursorBlinking": true, + "terminal.integrated.cursorStyle": "line", + + // Git settings + "git.enableSmartCommit": true, + "git.confirmSync": false, + + // EditorConfig settings + "editor.formatOnSaveMode": "file" }