Created
March 5, 2024 20:25
-
-
Save jabbalaci/ff36bd0146887c2aec55478d46821682 to your computer and use it in GitHub Desktop.
My settings for VS Code and Ruff
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
My `settings.json` for VS Code | |
------------------------------ | |
{ | |
"files.eol": "\n", | |
"workbench.colorTheme": "Visual Studio Light", | |
"workbench.colorCustomizations": { | |
"editor.background": "#fcf5e3", | |
"sideBar.background": "#f9edcd", | |
// "editor.lineHighlightBackground": "#e9f2fa", | |
"editor.lineHighlightBackground": "#efefef", | |
// "editor.lineHighlightBorder": "#9292ac" | |
"editor.lineHighlightBorder": "#c5c5c5" | |
}, | |
"customWindowZoom.zoomLevelChangeValue": 0.2, // my setting: 1.5 | |
"window.zoomLevel": 1, // to increase font in File Explorer on the left side | |
"editor.fontSize": 21, | |
"fontshortcuts.step": 1, // my setting: 1 | |
"editor.mouseWheelZoom": true, | |
"editor.fontFamily": "Hack, Consolas, 'Courier New', monospace", | |
"terminal.integrated.fontFamily": "Hack", | |
"terminal.integrated.fontSize": 18, // my setting: 16 | |
"code-runner.clearPreviousOutput": true, | |
"code-runner.showExecutionMessage": false, | |
// "code-runner.runInTerminal": true, | |
"workbench.iconTheme": "material-icon-theme", | |
"trailing-spaces.trimOnSave": true, | |
"files.insertFinalNewline": true, | |
"files.trimFinalNewlines": true, | |
"editor.roundedSelection": false, | |
"editor.find.autoFindInSelection": "multiline", | |
"files.exclude": { | |
"**/.git/": true, | |
".idea/": true, | |
".dart_tool/": true, | |
".vscode/": true, | |
"**/.gradle/": true, | |
"**/__pycache__/": true, | |
"**/**/*.pyc": true, | |
"**/.classpath": true, | |
"**/.project": true, | |
"**/.settings": true, | |
"**/.factorypath": true, | |
"**/**/*.class": true, | |
"server-*.log": true | |
}, | |
"macros": { | |
"commentLine": [ | |
"editor.action.commentLine", | |
"cursorDown" | |
] | |
}, | |
"editor.multiCursorModifier": "ctrlCmd", | |
"workbench.startupEditor": "newUntitledFile", | |
"editor.renderControlCharacters": false, | |
"explorer.confirmDelete": true, | |
"dart.checkForSdkUpdates": false, | |
"tabnine.experimentalAutoImports": true, | |
"editor.renderWhitespace": "none", | |
"editor.rulers": [ | |
100 | |
], | |
"black-formatter.args": [ | |
"--line-length", | |
"100" | |
], | |
// add `# noqa` to ignore just one line | |
"flake8.args": [ | |
"--max-line-length=100", | |
"--ignore=E203,F401,F841,E712", | |
// "--ignore=E501,W503,W504,E203", | |
"--max-complexity=10", | |
], | |
// "python.linting.pylintEnabled": true, | |
"[python]": { | |
"editor.tabSize": 4, | |
"editor.insertSpaces": true, | |
// "editor.defaultFormatter": "ms-python.black-formatter", | |
"editor.defaultFormatter": "charliermarsh.ruff", | |
"editor.formatOnSave": true, | |
"editor.codeActionsOnSave": { | |
"source.organizeImports": "explicit" | |
}, | |
"editor.formatOnType": true | |
}, | |
"[nim]": { | |
"editor.renderWhitespace": "boundary" | |
}, | |
// "d.servedPath": "/home/jabba/.local/share/code-d/bin/serve-d", | |
"editor.suggestSelection": "first", | |
"vsintellicode.modify.editor.suggestSelection": "automaticallyOverrodeDefaultValue", | |
"python.languageServer": "Pylance", | |
// https://dartcode.org/docs/recommended-settings/ | |
"[dart]": { | |
"editor.formatOnSave": true, | |
"editor.formatOnType": true, | |
"editor.rulers": [ | |
80 | |
], | |
"editor.selectionHighlight": false, | |
"editor.suggest.snippetsPreventQuickSuggestions": false, | |
"editor.suggestSelection": "first", | |
"editor.tabCompletion": "onlySnippets", | |
"editor.wordBasedSuggestions": "off" | |
}, | |
"code-runner.executorMap": { | |
"csharp": "dotnet run", | |
"odin": "odin run $fileName", | |
"elixir": "elixir $fileName" | |
// "dart": "dart $fileName" | |
}, | |
"editor.lineHeight": 0, | |
"workbench.tree.indent": 12, | |
"workbench.tree.renderIndentGuides": "always", | |
"java.refactor.renameFromFileExplorer": "autoApply", | |
"workbench.editorAssociations": { | |
"*.ipynb": "jupyter-notebook" | |
}, | |
// https://github.com/OmniSharp/omnisharp-vscode | |
// The .NET 5 SDK requires version 16.8 of MSBuild. | |
// For Windows users who have Visual Studio installed, | |
// this means you will need to be on the latest Visual Studio 16.8 Preview. | |
// For MacOS and Linux users who have Mono installed, | |
// this means you will need to set omnisharp.useGlobalMono to never | |
// until a version of Mono ships with MSBuild 16.8. | |
// "omnisharp.useGlobalMono": "never", | |
"csharp.suppressBuildAssetsNotification": true, | |
"code-runner.showRunCommandInExplorerContextMenu": false, | |
"python.analysis.typeCheckingMode": "basic", | |
// https://code.visualstudio.com/docs/editor/workspace-trust | |
"security.workspace.trust.enabled": false, | |
"notebook.cellToolbarLocation": { | |
"default": "right", | |
"jupyter-notebook": "left" | |
}, | |
"editor.bracketPairColorization.enabled": true, | |
"editor.suggest.preview": false, | |
"open-in-vim.useNeovim": true, | |
"editor.guides.bracketPairs": true, | |
"editor.defaultFormatter": null, | |
"[javascript]": { | |
"editor.defaultFormatter": "esbenp.prettier-vscode" | |
}, | |
"[typescript]": { | |
"editor.defaultFormatter": "esbenp.prettier-vscode" | |
}, | |
"terminal.integrated.commandsToSkipShell": [ | |
"language-julia.interrupt" | |
], | |
"julia.symbolCacheDownload": true, | |
"julia.enableTelemetry": false, | |
"[html]": { | |
"editor.defaultFormatter": "vscode.html-language-features" | |
}, | |
"[json]": { | |
"editor.defaultFormatter": "vscode.json-language-features" | |
}, | |
"julia.lint.run": false, | |
"[elixir]": { | |
"editor.formatOnSave": true | |
}, | |
"[nushell]": { | |
"editor.tabSize": 2 | |
}, | |
"editor.minimap.showSlider": "always", | |
// "todohighlight.keywords": [ | |
// { | |
// "text": " !", | |
// "color": "#000000", | |
// }, | |
// ], | |
"highlight.regexes": { | |
"( !)[^=]": [ | |
{ | |
"color": "black", | |
"backgroundColor": "#ffe300", | |
"fontWeight": "bold" | |
} | |
] | |
}, | |
"[jsonc]": { | |
"editor.defaultFormatter": "vscode.json-language-features" | |
}, | |
"editor.stickyScroll.enabled": true, | |
"lldb.suppressUpdateNotifications": true, | |
"go.survey.prompt": false, | |
"go.toolsManagement.autoUpdate": true, | |
"editor.inlineSuggest.enabled": true, | |
"github.copilot.enable": { | |
"*": false, | |
"plaintext": false, | |
"markdown": false, | |
"scminput": false, | |
"yaml": false | |
}, | |
"git.openRepositoryInParentFolders": "never", | |
"redhat.telemetry.enabled": false, | |
"python.venvFolders": [ | |
"~/.virtualenvs" | |
], | |
"[vue]": { | |
"editor.defaultFormatter": "octref.vetur" | |
}, | |
"java.inlayHints.parameterNames.enabled": "none", | |
"java.configuration.runtimes": [ | |
{ | |
"name": "JavaSE-17", | |
"path": "/usr/lib/jvm/java-17-openjdk", | |
"default": true | |
}, | |
], | |
"editor.unicodeHighlight.ambiguousCharacters": false, | |
"files.associations": { | |
"*.Rmd": "markdown" | |
}, | |
"pascal.formatter.engine": "ptop", | |
"pascal.formatter.enginePath": "/bin/ptop", | |
"pascal.format.indent": 4, | |
"lldb.library": "/usr/lib/swift/lib/liblldb.so", | |
"lldb.launch.expressions": "native", | |
"emeraldwalk.runonsave": { | |
"commands": [ | |
{ | |
"match": "\\.swift$", | |
"isAsync": false, | |
"cmd": "cd '${fileDirname}' && swift-format -i --configuration ~/.swift-format.json '${fileBasename}'" | |
} | |
] | |
}, | |
"[css]": { | |
"editor.defaultFormatter": "esbenp.prettier-vscode" | |
}, | |
// "carbon.theme": "seti", | |
"carbon.theme": "dracula", | |
"carbon.lineNumbers": true, | |
"carbon.fontFamily": "Hack", | |
} | |
My `ruff.toml` file | |
------------------- | |
# on Linux: ~/.config/ruff/ruff.toml | |
# on Windows: C:\Users\Alice\AppData\Roaming\ruff\ruff.toml | |
line-length = 100 | |
[lint] | |
# rule IDs: https://docs.astral.sh/ruff/rules/ | |
# ignore = ["E203","F401","F841","E712","E722"] | |
ignore = ["E722"] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This gist belongs to this video: https://www.youtube.com/watch?v=agjrP7DgDd4 (in Hungarian).