Closed FlatMapIO closed 1 year ago
Could you share your VS Code configuration? Do you have Ruff configured to run "onType"?
You need to turn it off by yourself. The configuration lint.run
defaults to onType
.
Checkout the readme for more information
Could you share your VS Code configuration? Do you have Ruff configured to run "onType"?
{
"workbench.editor.revealIfOpen": true,
"workbench.startupEditor": "none",
"security.workspace.trust.startupPrompt": "never",
"security.workspace.trust.enabled": false,
"editor.semanticHighlighting.enabled": true,
"editor.bracketPairColorization.enabled": true,
"chat.editor.fontFamily": "Monaspace Krypton Var",
// Krypton
"editor.fontFamily": "Monaspace Krypton Var",
"editor.fontLigatures": true,
"editor.formatOnPaste": false,
"editor.formatOnType": false,
"editor.find.cursorMoveOnType": true,
"editor.largeFileOptimizations": true,
"editor.quickSuggestions": {
"other": true,
"comments": false,
"strings": false
},
// "editor.language.colorizedBracketPairs": [],
"editor.linkedEditing": true,
"explorer.confirmDragAndDrop": false,
"explorer.autoReveal": false,
"window.closeWhenEmpty": true,
"terminal.integrated.gpuAcceleration": "auto",
"terminal.explorerKind": "external",
"terminal.external.osxExec": "warp.app",
"explorer.confirmDelete": false,
"terminal.integrated.fontFamily": "Hack Nerd Font Mono",
"terminal.integrated.fontSize": 16,
"terminal.integrated.defaultProfile.osx": "fish",
"terminal.integrated.defaultProfile.linux": "fish",
"terminal.integrated.profiles.osx": {
"fish": {
"path": "/opt/homebrew/bin/fish",
"args": [
"-l"
]
}
},
"css.validate": true,
"diffEditor.codeLens": true,
"breadcrumbs.showTypeParameters": true,
"git.autofetch": true,
"settingsSync.ignoredSettings": [],
"emmet.excludeLanguages": [
"markdown",
"typescriptreact"
],
"typescript.locale": "en",
"[javascript]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
},
"npm.packageManager": "pnpm",
"js/ts.implicitProjectConfig.experimentalDecorators": true,
"js/ts.implicitProjectConfig.checkJs": false,
"js/ts.implicitProjectConfig.strictNullChecks": true,
"js/ts.implicitProjectConfig.module": "ESNext",
"js/ts.implicitProjectConfig.target": "ESNext",
"[go]": {
"editor.defaultFormatter": "golang.go-nightly",
"editor.codeActionsOnSave": {
"source.organizeImports": "explicit"
}
},
"files.exclude": {
"**/node_modules/.pnpm": true,
"**/node_modules/**/test": true,
"**/node_modules/**/.eslint*": true,
"**/node_modules/**/tests": true,
"**/node_modules/**/node_modules": true,
"**/*.min.js": true,
"**/*.map": true,
".idea": true,
"**/.next": true
},
"files.trimTrailingWhitespace": true,
"terminal.integrated.commandsToSkipShell": [
"language-julia.interrupt"
],
"files.autoSave": "onFocusChange",
"editor.inlineSuggest.enabled": true,
"git.confirmSync": false,
"extensions.ignoreRecommendations": true,
"editor.accessibilitySupport": "off",
"terminal.integrated.env.osx": {},
"terminal.integrated.enableMultiLinePasteWarning": false,
"editor.stickyScroll.enabled": true,
"diffEditor.diffAlgorithm": "advanced",
"terminal.integrated.smoothScrolling": true,
"editor.smoothScrolling": true,
"vim.camelCaseMotion.enable": true,
"vim.highlightedyank.enable": true,
"vim.sneak": false,
"vim.foldfix": true,
"vim.replaceWithRegister": true,
"vim.easymotion": true,
"vim.easymotionMarkerForegroundColorOneChar": "white",
"vim.easymotionMarkerForegroundColorTwoCharFirst": "white",
"vim.easymotionKeys": "hklyuiopnmqwertzxcvbasdgjf",
"vim.autoSwitchInputMethod.enable": true,
// 自动切换输入法已经失效了
// "vim.autoSwitchInputMethod.enable": true,
// "vim.autoSwitchInputMethod.obtainIMCmd": "/opt/homebrew/bin/im-select",
// "vim.autoSwitchInputMethod.defaultIM": "com.apple.keylayout.ABC",
// "vim.autoSwitchInputMethod.switchIMCmd": "/opt/homebrew/bin/im-select {im}",
"vim.normalModeKeyBindingsNonRecursive": [
{
"before": [
"s"
],
"after": [
"leader",
"leader",
"s"
]
},
{
"before": [
"f"
],
"after": [
"leader",
"leader",
"2",
"s"
]
}
],
"typescript.updateImportsOnFileMove.enabled": "always",
"javascript.updateImportsOnFileMove.enabled": "always",
"editor.tabSize": 2,
"workbench.editor.closeOnFileDelete": true,
"search.exclude": {
"**/node_modules": true,
"**/bower_components": true,
"**/*.code-search": true,
"**/pnpm-lock.yaml": true,
"**/package-lock.json": true,
"**/go.sum": true
},
"[typescript]": {
"editor.codeActionsOnSave": {
"source.organizeImports": "explicit"
},
"editor.defaultFormatter": "esbenp.prettier-vscode"
},
"[typescriptreact]": {
"editor.codeActionsOnSave": {
"source.organizeImports": "never"
},
"editor.defaultFormatter": "esbenp.prettier-vscode"
},
"[json]": {
"editor.defaultFormatter": "vscode.json-language-features"
},
"typescript.autoClosingTags": true,
"html.autoClosingTags": true,
"[jsonc]": {
"editor.defaultFormatter": "vscode.json-language-features"
},
"typescript.implementationsCodeLens.enabled": true,
"typescript.referencesCodeLens.showOnAllFunctions": true,
"typescript.preferences.quoteStyle": "single",
"typescript.preferences.importModuleSpecifier": "shortest",
"typescript.suggest.completeFunctionCalls": false,
"typescript.suggest.jsdoc.generateReturns": false,
"typescript.suggest.completeJSDocs": false,
"typescript.preferences.useAliasesForRenames": false,
"editor.wordBasedSuggestions": true,
// vscode-postfix-ts depende this
// "editor.snippetSuggestions": "none",
"editor.acceptSuggestionOnCommitCharacter": false,
"editor.defaultColorDecorators": true,
"[python]": {
"editor.defaultFormatter": "charliermarsh.ruff"
},
"markdown.preview.typographer": true,
"scm.defaultViewMode": "tree",
"markdown.updateLinksOnFileMove.enabled": "always",
"workbench.colorTheme": "Sublime Material Theme - Dark",
"codeium.enableSearch": true,
"codeium.enableConfig": {
"*": true,
"dockercompose": true,
"properties": true,
"prisma": true,
"markdown": true,
"fish": true,
"plaintext": true,
"mojo": true
},
"inlineChat.mode": "livePreview",
"[svg]": {
"editor.defaultFormatter": "jock.svg"
},
"editor.tokenColorCustomizations": {
"textMateRules": [
{
"scope": "keyword.other.dotenv",
"settings": {
"foreground": "#FF000000"
}
}
]
},
"zig.zls.path": "/opt/local/bin/zls",
"zig.zls.zigLibPath": "/opt/local/lib/zig",
"zig.zigPath": "/opt/local/bin/zig",
"zig.zls.includeAtInBuiltins": true,
"zig.astCheckProvider": "zls",
"zig.formattingProvider": "zls",
"zig.zls.checkForUpdate": false,
"panda.color-hints.color-preview.enabled": true,
"panda.hovers.semantic-colors.enabled": true,
"panda.hovers.tokens.css-preview.enabled": true,
"panda.hovers.instances.enabled": true,
"panda.hovers.tokens.conditions.enabled": true,
"panda.rem-to-px.enabled": true,
"remote.SSH.remotePlatform": {
"sandbox.p6vxp5.csb": "linux"
},
"editor.fontSize": 16,
"go.toolsManagement.autoUpdate": true,
"window.commandCenter": false,
"window.zoomLevel": -1,
"files.associations": {
"*.excalidraw": "json",
"*.excalidrawlib": "json",
".env*": "dotenv"
},
"python.languageServer": "Pylance",
"python.analysis.autoFormatStrings": true,
"mojo.modularHomePath": "${userHome}/.modular",
"workbench.iconTheme": "material-icon-theme",
"[fish]": {
"editor.defaultFormatter": "bmalehorn.vscode-fish"
},
}
You can add "ruff.lint.run": "onSave"
to your configuration to avoid running Ruff on every change. Let me know if you run into any issues!
I checked the log of the ruff extension, and I found that it outputs a full formatted log every time I type a character in the Editor. Of course, it doesn't actually format my code, and if it did, it would seem extremely unreasonable.