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

Format on save not running #25

Open
kurapov-peter opened this issue Apr 13, 2021 · 3 comments
Open

Format on save not running #25

kurapov-peter opened this issue Apr 13, 2021 · 3 comments

Comments

@kurapov-peter
Copy link

Hi, I noticed the following config doesn't work as expected:

{
    "editor.formatOnSave": true,
    "opencl.formatting.name": "clang-format"
}

Issuing Format Document command works fine.
Is there any specific config setting I should use to enable formatting on save?

@kurapov-peter
Copy link
Author

Actually, after running the command manually, format on save started working. The issue exists only for a new window/project. I'm able to reproduce it when creating a new working directory.

@Galarius
Copy link
Owner

Hello, @kurapov-peter! I believe OpenCL formatter is not instantly available for the newly created working directory. The extension is activated only when certain conditions are met, e.g. opening file with *.cl extension or running command OpenCL: Info.

@kurapov-peter
Copy link
Author

Hi @Galarius, opening a *.cl file (for the first time in a newly created folder) doesn't seem to trigger the extension for me either, just FYI.

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