Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Save without Formatting does not work #3942

Closed
Piroro-hs opened this issue Feb 4, 2025 · 3 comments
Closed

Save without Formatting does not work #3942

Piroro-hs opened this issue Feb 4, 2025 · 3 comments

Comments

@Piroro-hs
Copy link

Execute File: Save without Formatting command from VS Code command palette and still whole file is formatted.

@snjeza
Copy link
Contributor

snjeza commented Feb 4, 2025

@Piroro-hs I can't reproduce the issue. Could you show your settings.json?

@Piroro-hs
Copy link
Author

Here it is.

{
    "editor.tabSize": 2,
    "files.autoSave": "onFocusChange",
    "files.eol": "\n",
    "files.insertFinalNewline": true,
    "files.trimFinalNewlines": true,
    "window.restoreWindows": "none",
    "workbench.colorTheme": "GitHub Light Default",
    "breadcrumbs.enabled": false,
    "update.mode": "none",
    "diffEditor.ignoreTrimWhitespace": false,
    "files.autoGuessEncoding": true,
    "git.allowForcePush": true,
    "git.autoStash": true,
    "remote.SSH.remotePlatform": {
        "vm": "linux",
        "vm2": "linux"
    },
    "explorer.autoReveal": "focusNoScroll",
    "editor.stickyTabStops": true,
    "remote.WSL.fileWatcher.polling": false,
    "security.workspace.trust.startupPrompt": "never",
    "security.workspace.trust.banner": "always",
    "security.workspace.trust.enabled": false,
    "settingsSync.ignoredExtensions": [
        "mathworks.language-matlab",
        "shinyypig.matlab-in-vscode",
        "platformio.platformio-ide",
        "chuckjonas.apex-pmd",
        "vscjava.vscode-java-pack",
        "vscjava.vscode-java-test",
        "vscjava.vscode-java-dependency",
        "vscjava.vscode-maven",
        "redhat.java",
        "vscjava.vscode-java-debug",
        "vscjava.vscode-gradle",
        "ilkka.google-java-format"
    ],
    "settingsSync.ignoredSettings": [
        "editor.fontFamily",
        "editor.fontLigatures",
        "editor.fontSize",
        "editor.fontWeight",
        "editor.fontVariations",
        "google-java-format.executable-path"
    ],
    "settingsSync.keybindingsPerPlatform": false,
    "window.titleBarStyle": "custom",
    "telemetry.telemetryLevel": "off",
    "[java]": {
        "editor.suggest.snippetsPreventQuickSuggestions": false,
        "editor.defaultFormatter": null
    },
    "google-java-format.executable-path": "/usr/bin/google-java-format",
    "editor.stickyScroll.enabled": true,
    "window.commandCenter": false,
    "editor.fontFamily": "Cascadia Code, Yu Gothic",
    "editor.fontLigatures": true,
    "workbench.productIconTheme": "icons-carbon",
    "bookmarks.saveBookmarksInProject": true,
    "editor.fontSize": 12,
    "editor.fontWeight": 400,
    "editor.lineHeight": 20,
    "diffEditor.maxComputationTime": 0,
    "[markdown]": {
        "editor.formatOnSave": false
    },
    "editor.formatOnSaveMode": "modificationsIfAvailable",
    "editor.formatOnSave": true,
    "[sql]": {
        "editor.formatOnSave": false
    },
    "rust-analyzer.rustfmt.rangeFormatting.enable": true,
    "workbench.editor.navigationScope": "editor",
    "editor.multiCursorModifier": "ctrlCmd",
    "workbench.panel.showLabels": false,
    "java.format.settings.url": "https://raw.githubusercontent.com/google/styleguide/gh-pages/eclipse-java-google-style.xml"
}

@Piroro-hs
Copy link
Author

The problem is that I executed the command from command palette, which obviously move focus from editor, leads to normal (with formatting) onFocusChange file save. Sorry.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants