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

Add format_on_save toggle for javascript #4183

Merged
merged 2 commits into from Apr 10, 2021

Conversation

mekanix
Copy link
Contributor

@mekanix mekanix commented Apr 10, 2021

PR Prelude

Thank you for working on SpaceVim! :)

Please complete these steps and check these boxes before filing your PR:

  • I have read and understood SpaceVim's CONTRIBUTING document.
  • I have read and understood SpaceVim's CODE_OF_CONDUCT document.
  • I understand my PR may be closed if it becomes obvious I didn't actually perform all of these steps.

Why this change is necessary and useful?

[Please explain in detail why the changes in this PR are needed.]

I used python.vim as an example how format_on_save is handled and added it to javascript.

@wsdjeg
Copy link
Member

wsdjeg commented Apr 10, 2021

in javascript layer you can use following instead:

 let s:format_on_save = get(a:var,
        \ 'format_on_save',
        \ s:format_on_save)

format-on-save is just for backword compatible in python layer.

@mekanix
Copy link
Contributor Author

mekanix commented Apr 10, 2021

It's amended.

@wsdjeg
Copy link
Member

wsdjeg commented Apr 10, 2021

Thanks, and can you update the lang#javascript layer doc.

@mekanix
Copy link
Contributor Author

mekanix commented Apr 10, 2021

Done.

@wsdjeg wsdjeg merged commit a1909e1 into SpaceVim:master Apr 10, 2021
@wsdjeg
Copy link
Member

wsdjeg commented Apr 10, 2021

Merged, thanks.

@mekanix mekanix deleted the feature/js-format branch April 10, 2021 11:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants